Merge "Merge RP1A.200407.001" into r-keystone-qcom-dev
diff --git a/api/system-current.txt b/api/system-current.txt
index 776b56e..7d5e41c 100755
--- a/api/system-current.txt
+++ b/api/system-current.txt
@@ -7060,6 +7060,7 @@
     field public static final int BAND_5GHZ = 2; // 0x2
     field public static final int BAND_6GHZ = 4; // 0x4
     field public static final int BAND_ANY = 7; // 0x7
+    field public static final int BAND_DUAL = 8; // 0x8
     field public static final int SECURITY_TYPE_OWE = 4; // 0x4
     field public static final int SECURITY_TYPE_SAE = 5; // 0x5
   }
diff --git a/services/core/java/com/android/server/am/ActivityManagerService.java b/services/core/java/com/android/server/am/ActivityManagerService.java
index f6a7169..719e380 100644
--- a/services/core/java/com/android/server/am/ActivityManagerService.java
+++ b/services/core/java/com/android/server/am/ActivityManagerService.java
@@ -5130,7 +5130,7 @@
 
         EventLogTags.writeAmProcBound(app.userId, app.pid, app.processName);
 
-        if (mUxPerf != null && app.hostingRecord != null && "activity".equals(app.hostingRecord.getType())) {
+        if (mUxPerf != null && app.hostingRecord != null && app.hostingRecord.isTopApp()) {
             mUxPerf.perfHint(BoostFramework.VENDOR_HINT_FIRST_LAUNCH_BOOST, app.processName, app.pid, BoostFramework.Launch.TYPE_ATTACH_APPLICATION);
         }
 
diff --git a/services/core/java/com/android/server/audio/AudioDeviceInventory.java b/services/core/java/com/android/server/audio/AudioDeviceInventory.java
index a40fa39..6cbab4b 100644
--- a/services/core/java/com/android/server/audio/AudioDeviceInventory.java
+++ b/services/core/java/com/android/server/audio/AudioDeviceInventory.java
@@ -356,7 +356,7 @@
 
             if (event == BtHelper.EVENT_ACTIVE_DEVICE_CHANGE) {
                 // Device is connected
-
+                mApmConnectedDevices.replace(AudioSystem.DEVICE_OUT_BLUETOOTH_A2DP, key);
                 if (a2dpVolume != -1) {
                     mDeviceBroker.postSetVolumeIndexOnDevice(AudioSystem.STREAM_MUSIC,
                             // convert index to internal representation in VolumeStreamState
diff --git a/telephony/java/android/telephony/AccessNetworkConstants.java b/telephony/java/android/telephony/AccessNetworkConstants.java
index 39a7543..b3f3626 100644
--- a/telephony/java/android/telephony/AccessNetworkConstants.java
+++ b/telephony/java/android/telephony/AccessNetworkConstants.java
@@ -22,6 +22,7 @@
 import android.hardware.radio.V1_1.GeranBands;
 import android.hardware.radio.V1_5.AccessNetwork;
 import android.hardware.radio.V1_5.EutranBands;
+import android.hardware.radio.V1_5.RadioAccessNetworks;
 import android.hardware.radio.V1_5.UtranBands;
 
 import java.lang.annotation.Retention;
@@ -112,6 +113,28 @@
                 default: return Integer.toString(type);
             }
         }
+
+        /**
+         * Converts from RadioAccessNetworks in HAL to AccessNetworkType in frameworks.
+         * @hide
+         */
+        public static int convertRanToAnt(int ran) {
+            switch (ran) {
+                case RadioAccessNetworks.GERAN:
+                    return AccessNetworkType.GERAN;
+                case RadioAccessNetworks.UTRAN:
+                    return AccessNetworkType.UTRAN;
+                case RadioAccessNetworks.EUTRAN:
+                    return AccessNetworkType.EUTRAN;
+                case RadioAccessNetworks.NGRAN:
+                    return AccessNetworkType.NGRAN;
+                case RadioAccessNetworks.CDMA2000:
+                    return AccessNetworkType.CDMA2000;
+                case RadioAccessNetworks.UNKNOWN:
+                default:
+                    return AccessNetworkType.UNKNOWN;
+           }
+        }
     }
 
     /**
diff --git a/telephony/java/android/telephony/CellInfoNr.java b/telephony/java/android/telephony/CellInfoNr.java
index a7e79f9..e01e8f0 100644
--- a/telephony/java/android/telephony/CellInfoNr.java
+++ b/telephony/java/android/telephony/CellInfoNr.java
@@ -29,9 +29,16 @@
 public final class CellInfoNr extends CellInfo {
     private static final String TAG = "CellInfoNr";
 
-    private final CellIdentityNr mCellIdentity;
+    private CellIdentityNr mCellIdentity;
     private final CellSignalStrengthNr mCellSignalStrength;
 
+    /** @hide */
+    public CellInfoNr() {
+        super();
+        mCellIdentity = new CellIdentityNr();
+        mCellSignalStrength = new CellSignalStrengthNr();
+    }
+
     private CellInfoNr(Parcel in) {
         super(in);
         mCellIdentity = CellIdentityNr.CREATOR.createFromParcel(in);
@@ -71,6 +78,11 @@
         return mCellIdentity;
     }
 
+    /** @hide */
+    public void setCellIdentity(CellIdentityNr cid) {
+        mCellIdentity = cid;
+    }
+
     /**
      * @return a {@link CellSignalStrengthNr} instance.
      */
diff --git a/wifi/Android.bp b/wifi/Android.bp
index 94c315a..99beb7b 100644
--- a/wifi/Android.bp
+++ b/wifi/Android.bp
@@ -67,7 +67,6 @@
     "//external/robolectric-shadows:__subpackages__",
     "//frameworks/base/packages/SettingsLib/tests/integ",
     "//external/sl4a:__subpackages__",
-    "//packages/apps/Settings:__subpackages__",
 ]
 
 // wifi-service needs pre-jarjared version of framework-wifi so it can reference copied utility
diff --git a/wifi/api/system-current.txt b/wifi/api/system-current.txt
index eb0d6ab..ced2263 100644
--- a/wifi/api/system-current.txt
+++ b/wifi/api/system-current.txt
@@ -262,6 +262,7 @@
     field public static final int BAND_5GHZ = 2; // 0x2
     field public static final int BAND_6GHZ = 4; // 0x4
     field public static final int BAND_ANY = 7; // 0x7
+    field public static final int BAND_DUAL = 8; // 0x8
     field public static final int SECURITY_TYPE_OWE = 4; // 0x4
     field public static final int SECURITY_TYPE_SAE = 5; // 0x5
   }
diff --git a/wifi/java/android/net/wifi/SoftApConfiguration.java b/wifi/java/android/net/wifi/SoftApConfiguration.java
index 09c2f60..187e590 100644
--- a/wifi/java/android/net/wifi/SoftApConfiguration.java
+++ b/wifi/java/android/net/wifi/SoftApConfiguration.java
@@ -90,6 +90,7 @@
      * 2GHz + 5GHz or 2GHz + 6GHz concurrent Dual band.
      * @hide
      */
+    @SystemApi
     public static final int BAND_DUAL = 1 << 3;
 
     /**