Merge "Add a wifi hal interface to read-back the APF memory."
diff --git a/audio/common/2.0/default/OWNERS b/audio/common/2.0/default/OWNERS
new file mode 100644
index 0000000..6fdc97c
--- /dev/null
+++ b/audio/common/2.0/default/OWNERS
@@ -0,0 +1,3 @@
+elaurent@google.com
+krocard@google.com
+mnaganov@google.com
diff --git a/audio/common/4.0/default/OWNERS b/audio/common/4.0/default/OWNERS
new file mode 100644
index 0000000..6fdc97c
--- /dev/null
+++ b/audio/common/4.0/default/OWNERS
@@ -0,0 +1,3 @@
+elaurent@google.com
+krocard@google.com
+mnaganov@google.com
diff --git a/audio/core/4.0/default/OWNERS b/audio/core/4.0/default/OWNERS
new file mode 100644
index 0000000..6fdc97c
--- /dev/null
+++ b/audio/core/4.0/default/OWNERS
@@ -0,0 +1,3 @@
+elaurent@google.com
+krocard@google.com
+mnaganov@google.com
diff --git a/audio/effect/4.0/default/OWNERS b/audio/effect/4.0/default/OWNERS
new file mode 100644
index 0000000..6fdc97c
--- /dev/null
+++ b/audio/effect/4.0/default/OWNERS
@@ -0,0 +1,3 @@
+elaurent@google.com
+krocard@google.com
+mnaganov@google.com
diff --git a/authsecret/1.0/vts/functional/VtsHalAuthSecretV1_0TargetTest.cpp b/authsecret/1.0/vts/functional/VtsHalAuthSecretV1_0TargetTest.cpp
index a610a75..255d4de 100644
--- a/authsecret/1.0/vts/functional/VtsHalAuthSecretV1_0TargetTest.cpp
+++ b/authsecret/1.0/vts/functional/VtsHalAuthSecretV1_0TargetTest.cpp
@@ -17,18 +17,35 @@
 #include <android/hardware/authsecret/1.0/IAuthSecret.h>
 
 #include <VtsHalHidlTargetTestBase.h>
+#include <VtsHalHidlTargetTestEnvBase.h>
 
 using ::android::hardware::hidl_vec;
 using ::android::hardware::authsecret::V1_0::IAuthSecret;
 using ::android::sp;
 
+// Test environment for Boot HIDL HAL.
+class AuthSecretHidlEnvironment : public ::testing::VtsHalHidlTargetTestEnvBase {
+   public:
+    // get the test environment singleton
+    static AuthSecretHidlEnvironment* Instance() {
+        static AuthSecretHidlEnvironment* instance = new AuthSecretHidlEnvironment;
+        return instance;
+    }
+
+    virtual void registerTestServices() override { registerTestService<IAuthSecret>(); }
+
+   private:
+    AuthSecretHidlEnvironment() {}
+};
+
 /**
  * There is no expected behaviour that can be tested so these tests check the
  * HAL doesn't crash with different execution orders.
  */
 struct AuthSecretHidlTest : public ::testing::VtsHalHidlTargetTestBase {
     virtual void SetUp() override {
-        authsecret = ::testing::VtsHalHidlTargetTestBase::getService<IAuthSecret>();
+        authsecret = ::testing::VtsHalHidlTargetTestBase::getService<IAuthSecret>(
+            AuthSecretHidlEnvironment::Instance()->getServiceName<IAuthSecret>());
         ASSERT_NE(authsecret, nullptr);
 
         // All tests must enroll the correct secret first as this cannot be changed
@@ -69,3 +86,12 @@
     // Secret provisioned by SetUp()
     authsecret->primaryUserCredential(WRONG_SECRET);
 }
+
+int main(int argc, char** argv) {
+    ::testing::AddGlobalTestEnvironment(AuthSecretHidlEnvironment::Instance());
+    ::testing::InitGoogleTest(&argc, argv);
+    AuthSecretHidlEnvironment::Instance()->init(&argc, argv);
+    int status = RUN_ALL_TESTS();
+    ALOGI("Test result = %d", status);
+    return status;
+}
diff --git a/camera/device/3.4/default/ExternalCameraDeviceSession.cpp b/camera/device/3.4/default/ExternalCameraDeviceSession.cpp
index 01d7371..5569439 100644
--- a/camera/device/3.4/default/ExternalCameraDeviceSession.cpp
+++ b/camera/device/3.4/default/ExternalCameraDeviceSession.cpp
@@ -15,6 +15,7 @@
  */
 #define LOG_TAG "ExtCamDevSsn@3.4"
 //#define LOG_NDEBUG 0
+#define ATRACE_TAG ATRACE_TAG_CAMERA
 #include <log/log.h>
 
 #include <inttypes.h>
@@ -22,6 +23,7 @@
 
 #include "android-base/macros.h"
 #include <utils/Timers.h>
+#include <utils/Trace.h>
 #include <linux/videodev2.h>
 #include <sync/sync.h>
 
@@ -357,6 +359,7 @@
 }
 
 Return<Status> ExternalCameraDeviceSession::flush() {
+    ATRACE_CALL();
     Mutex::Autolock _il(mInterfaceLock);
     Status status = initStatus();
     if (status != Status::OK) {
@@ -468,6 +471,7 @@
 }
 
 Status ExternalCameraDeviceSession::processOneCaptureRequest(const CaptureRequest& request)  {
+    ATRACE_CALL();
     Status status = initStatus();
     if (status != Status::OK) {
         return status;
@@ -633,6 +637,7 @@
 //TODO: refactor with processCaptureResult
 Status ExternalCameraDeviceSession::processCaptureRequestError(
         const std::shared_ptr<HalRequest>& req) {
+    ATRACE_CALL();
     // Return V4L2 buffer to V4L2 buffer queue
     enqueueV4l2Frame(req->frameIn);
 
@@ -673,6 +678,7 @@
 }
 
 Status ExternalCameraDeviceSession::processCaptureResult(std::shared_ptr<HalRequest>& req) {
+    ATRACE_CALL();
     // Return V4L2 buffer to V4L2 buffer queue
     enqueueV4l2Frame(req->frameIn);
 
@@ -1449,6 +1455,7 @@
         HalStreamBuffer &halBuf,
         const std::shared_ptr<HalRequest>& req)
 {
+    ATRACE_CALL();
     int ret;
     auto lfail = [&](auto... args) {
         ALOGE(args...);
@@ -1656,8 +1663,8 @@
     uint8_t* inData;
     size_t inDataSize;
     req->frameIn->map(&inData, &inDataSize);
-    // TODO: profile
     // TODO: in some special case maybe we can decode jpg directly to gralloc output?
+    ATRACE_BEGIN("MJPGtoI420");
     int res = libyuv::MJPGToI420(
             inData, inDataSize,
             static_cast<uint8_t*>(mYu12FrameLayout.y),
@@ -1668,6 +1675,7 @@
             mYu12FrameLayout.cStride,
             mYu12Frame->mWidth, mYu12Frame->mHeight,
             mYu12Frame->mWidth, mYu12Frame->mHeight);
+    ATRACE_END();
 
     if (res != 0) {
         // For some webcam, the first few V4L2 frames might be malformed...
@@ -1729,17 +1737,21 @@
                         (outputFourcc >> 24) & 0xFF);
 
                 YCbCrLayout cropAndScaled;
+                ATRACE_BEGIN("cropAndScaleLocked");
                 int ret = cropAndScaleLocked(
                         mYu12Frame,
                         Size { halBuf.width, halBuf.height },
                         &cropAndScaled);
+                ATRACE_END();
                 if (ret != 0) {
                     lk.unlock();
                     return onDeviceError("%s: crop and scale failed!", __FUNCTION__);
                 }
 
                 Size sz {halBuf.width, halBuf.height};
+                ATRACE_BEGIN("formatConvertLocked");
                 ret = formatConvertLocked(cropAndScaled, outLayout, sz, outputFourcc);
+                ATRACE_END();
                 if (ret != 0) {
                     lk.unlock();
                     return onDeviceError("%s: format coversion failed!", __FUNCTION__);
@@ -1850,6 +1862,7 @@
 }
 
 void ExternalCameraDeviceSession::OutputThread::flush() {
+    ATRACE_CALL();
     auto parent = mParent.promote();
     if (parent == nullptr) {
        ALOGE("%s: session has been disconnected!", __FUNCTION__);
@@ -1867,6 +1880,7 @@
         }
     }
 
+    ALOGV("%s: flusing inflight requests", __FUNCTION__);
     lk.unlock();
     for (const auto& req : reqs) {
         parent->processCaptureRequestError(req);
@@ -1875,6 +1889,7 @@
 
 void ExternalCameraDeviceSession::OutputThread::waitForNextRequest(
         std::shared_ptr<HalRequest>* out) {
+    ATRACE_CALL();
     if (out == nullptr) {
         ALOGE("%s: out is null", __FUNCTION__);
         return;
@@ -2079,6 +2094,7 @@
 
 int ExternalCameraDeviceSession::configureV4l2StreamLocked(
         const SupportedV4L2Format& v4l2Fmt, double requestFps) {
+    ATRACE_CALL();
     int ret = v4l2StreamOffLocked();
     if (ret != OK) {
         ALOGE("%s: stop v4l2 streaming failed: ret %d", __FUNCTION__, ret);
@@ -2210,6 +2226,7 @@
 }
 
 sp<V4L2Frame> ExternalCameraDeviceSession::dequeueV4l2FrameLocked(/*out*/nsecs_t* shutterTs) {
+    ATRACE_CALL();
     sp<V4L2Frame> ret = nullptr;
 
     if (shutterTs == nullptr) {
@@ -2264,6 +2281,7 @@
 }
 
 void ExternalCameraDeviceSession::enqueueV4l2Frame(const sp<V4L2Frame>& frame) {
+    ATRACE_CALL();
     {
         // Release mLock before acquiring mV4l2BufferLock to avoid potential
         // deadlock
@@ -2289,6 +2307,7 @@
 
 Status ExternalCameraDeviceSession::configureStreams(
         const V3_2::StreamConfiguration& config, V3_3::HalStreamConfiguration* out) {
+    ATRACE_CALL();
     if (config.operationMode != StreamConfigurationMode::NORMAL_MODE) {
         ALOGE("%s: unsupported operation mode: %d", __FUNCTION__, config.operationMode);
         return Status::ILLEGAL_ARGUMENT;
diff --git a/compatibility_matrices/compatibility_matrix.current.xml b/compatibility_matrices/compatibility_matrix.current.xml
index 002ff31..464b4a3 100644
--- a/compatibility_matrices/compatibility_matrix.current.xml
+++ b/compatibility_matrices/compatibility_matrix.current.xml
@@ -178,9 +178,11 @@
     <hal format="hidl" optional="false">
         <name>android.hardware.keymaster</name>
         <version>3.0</version>
+        <version>4.0</version>
         <interface>
             <name>IKeymasterDevice</name>
             <instance>default</instance>
+	    <!-- TODO: strongbox here? -->
         </interface>
     </hal>
     <hal format="hidl" optional="true">
diff --git a/configstore/1.0/default/surfaceflinger.mk b/configstore/1.0/default/surfaceflinger.mk
index 3ce768a..f7487d5 100644
--- a/configstore/1.0/default/surfaceflinger.mk
+++ b/configstore/1.0/default/surfaceflinger.mk
@@ -17,6 +17,10 @@
     LOCAL_CFLAGS += -DUSE_CONTEXT_PRIORITY=1
 endif
 
+ifeq ($(TARGET_USE_CONTEXT_PRIORITY),true)
+    LOCAL_CFLAGS += -DUSE_CONTEXT_PRIORITY=1
+endif
+
 ifeq ($(TARGET_HAS_WIDE_COLOR_DISPLAY),true)
     LOCAL_CFLAGS += -DHAS_WIDE_COLOR_DISPLAY
 endif
diff --git a/keymaster/4.0/vts/functional/keymaster_hidl_hal_test.cpp b/keymaster/4.0/vts/functional/keymaster_hidl_hal_test.cpp
index dbf5ece..602355b 100644
--- a/keymaster/4.0/vts/functional/keymaster_hidl_hal_test.cpp
+++ b/keymaster/4.0/vts/functional/keymaster_hidl_hal_test.cpp
@@ -664,7 +664,7 @@
  */
 TEST_F(SigningOperationsTest, RsaSuccess) {
     ASSERT_EQ(ErrorCode::OK, GenerateKey(AuthorizationSetBuilder()
-                                             .RsaSigningKey(1024, 3)
+                                             .RsaSigningKey(1024, 65537)
                                              .Digest(Digest::NONE)
                                              .Padding(PaddingMode::NONE)
                                              .Authorization(TAG_NO_AUTH_REQUIRED)));
@@ -680,7 +680,7 @@
  */
 TEST_F(SigningOperationsTest, RsaPssSha256Success) {
     ASSERT_EQ(ErrorCode::OK, GenerateKey(AuthorizationSetBuilder()
-                                             .RsaSigningKey(1024, 3)
+                                             .RsaSigningKey(1024, 65537)
                                              .Digest(Digest::SHA_2_256)
                                              .Padding(PaddingMode::RSA_PSS)
                                              .Authorization(TAG_NO_AUTH_REQUIRED)));
@@ -698,7 +698,7 @@
  */
 TEST_F(SigningOperationsTest, RsaPaddingNoneDoesNotAllowOther) {
     ASSERT_EQ(ErrorCode::OK, GenerateKey(AuthorizationSetBuilder()
-                                             .RsaSigningKey(1024, 3)
+                                             .RsaSigningKey(1024, 65537)
                                              .Digest(Digest::NONE)
                                              .Authorization(TAG_NO_AUTH_REQUIRED)
                                              .Padding(PaddingMode::NONE)));
@@ -720,7 +720,7 @@
  */
 TEST_F(SigningOperationsTest, NoUserConfirmation) {
     ASSERT_EQ(ErrorCode::OK, GenerateKey(AuthorizationSetBuilder()
-                                             .RsaSigningKey(1024, 3)
+                                             .RsaSigningKey(1024, 65537)
                                              .Digest(Digest::NONE)
                                              .Padding(PaddingMode::NONE)
                                              .Authorization(TAG_NO_AUTH_REQUIRED)
@@ -741,7 +741,7 @@
  */
 TEST_F(SigningOperationsTest, RsaPkcs1Sha256Success) {
     ASSERT_EQ(ErrorCode::OK, GenerateKey(AuthorizationSetBuilder()
-                                             .RsaSigningKey(1024, 3)
+                                             .RsaSigningKey(1024, 65537)
                                              .Digest(Digest::SHA_2_256)
                                              .Authorization(TAG_NO_AUTH_REQUIRED)
                                              .Padding(PaddingMode::RSA_PKCS1_1_5_SIGN)));
@@ -758,7 +758,7 @@
  */
 TEST_F(SigningOperationsTest, RsaPkcs1NoDigestSuccess) {
     ASSERT_EQ(ErrorCode::OK, GenerateKey(AuthorizationSetBuilder()
-                                             .RsaSigningKey(1024, 3)
+                                             .RsaSigningKey(1024, 65537)
                                              .Digest(Digest::NONE)
                                              .Authorization(TAG_NO_AUTH_REQUIRED)
                                              .Padding(PaddingMode::RSA_PKCS1_1_5_SIGN)));
@@ -776,7 +776,7 @@
  */
 TEST_F(SigningOperationsTest, RsaPkcs1NoDigestTooLong) {
     ASSERT_EQ(ErrorCode::OK, GenerateKey(AuthorizationSetBuilder()
-                                             .RsaSigningKey(1024, 3)
+                                             .RsaSigningKey(1024, 65537)
                                              .Digest(Digest::NONE)
                                              .Authorization(TAG_NO_AUTH_REQUIRED)
                                              .Padding(PaddingMode::RSA_PKCS1_1_5_SIGN)));
@@ -804,7 +804,7 @@
  */
 TEST_F(SigningOperationsTest, RsaPssSha512TooSmallKey) {
     ASSERT_EQ(ErrorCode::OK, GenerateKey(AuthorizationSetBuilder()
-                                             .RsaSigningKey(1024, 3)
+                                             .RsaSigningKey(1024, 65537)
                                              .Digest(Digest::SHA_2_512)
                                              .Authorization(TAG_NO_AUTH_REQUIRED)
                                              .Padding(PaddingMode::RSA_PSS)));
@@ -822,7 +822,7 @@
  */
 TEST_F(SigningOperationsTest, RsaNoPaddingTooLong) {
     ASSERT_EQ(ErrorCode::OK, GenerateKey(AuthorizationSetBuilder()
-                                             .RsaSigningKey(1024, 3)
+                                             .RsaSigningKey(1024, 65537)
                                              .Digest(Digest::NONE)
                                              .Authorization(TAG_NO_AUTH_REQUIRED)
                                              .Padding(PaddingMode::RSA_PKCS1_1_5_SIGN)));
@@ -856,7 +856,7 @@
  */
 TEST_F(SigningOperationsTest, RsaAbort) {
     ASSERT_EQ(ErrorCode::OK, GenerateKey(AuthorizationSetBuilder()
-                                             .RsaSigningKey(1024, 3)
+                                             .RsaSigningKey(1024, 65537)
                                              .Digest(Digest::NONE)
                                              .Authorization(TAG_NO_AUTH_REQUIRED)
                                              .Padding(PaddingMode::NONE)));
@@ -881,7 +881,7 @@
  */
 TEST_F(SigningOperationsTest, RsaUnsupportedPadding) {
     ASSERT_EQ(ErrorCode::OK, GenerateKey(AuthorizationSetBuilder()
-                                             .RsaSigningKey(1024, 3)
+                                             .RsaSigningKey(1024, 65537)
                                              .Authorization(TAG_NO_AUTH_REQUIRED)
                                              .Digest(Digest::SHA_2_256 /* supported digest */)
                                              .Padding(PaddingMode::PKCS7)));
@@ -898,7 +898,7 @@
  */
 TEST_F(SigningOperationsTest, RsaNoDigest) {
     ASSERT_EQ(ErrorCode::OK, GenerateKey(AuthorizationSetBuilder()
-                                             .RsaSigningKey(1024, 3)
+                                             .RsaSigningKey(1024, 65537)
                                              .Authorization(TAG_NO_AUTH_REQUIRED)
                                              .Digest(Digest::NONE)
                                              .Padding(PaddingMode::RSA_PSS)));
@@ -919,7 +919,7 @@
 TEST_F(SigningOperationsTest, RsaNoPadding) {
     // Padding must be specified
     ASSERT_EQ(ErrorCode::OK, GenerateKey(AuthorizationSetBuilder()
-                                             .RsaKey(1024, 3)
+                                             .RsaKey(1024, 65537)
                                              .Authorization(TAG_NO_AUTH_REQUIRED)
                                              .SigningKey()
                                              .Digest(Digest::NONE)));
@@ -935,7 +935,7 @@
 TEST_F(SigningOperationsTest, RsaTooShortMessage) {
     ASSERT_EQ(ErrorCode::OK, GenerateKey(AuthorizationSetBuilder()
                                              .Authorization(TAG_NO_AUTH_REQUIRED)
-                                             .RsaSigningKey(1024, 3)
+                                             .RsaSigningKey(1024, 65537)
                                              .Digest(Digest::NONE)
                                              .Padding(PaddingMode::NONE)));
 
@@ -956,7 +956,7 @@
 TEST_F(SigningOperationsTest, RsaSignWithEncryptionKey) {
     ASSERT_EQ(ErrorCode::OK, GenerateKey(AuthorizationSetBuilder()
                                              .Authorization(TAG_NO_AUTH_REQUIRED)
-                                             .RsaEncryptionKey(1024, 3)
+                                             .RsaEncryptionKey(1024, 65537)
                                              .Digest(Digest::NONE)
                                              .Padding(PaddingMode::NONE)));
     ASSERT_EQ(ErrorCode::INCOMPATIBLE_PURPOSE,
@@ -973,7 +973,7 @@
 TEST_F(SigningOperationsTest, RsaSignTooLargeMessage) {
     ASSERT_EQ(ErrorCode::OK, GenerateKey(AuthorizationSetBuilder()
                                              .Authorization(TAG_NO_AUTH_REQUIRED)
-                                             .RsaSigningKey(1024, 3)
+                                             .RsaSigningKey(1024, 65537)
                                              .Digest(Digest::NONE)
                                              .Padding(PaddingMode::NONE)));
 
@@ -1044,9 +1044,9 @@
 TEST_F(SigningOperationsTest, EcdsaNoDigestHugeData) {
     ASSERT_EQ(ErrorCode::OK, GenerateKey(AuthorizationSetBuilder()
                                              .Authorization(TAG_NO_AUTH_REQUIRED)
-                                             .EcdsaSigningKey(224)
+                                             .EcdsaSigningKey(256)
                                              .Digest(Digest::NONE)));
-    string message(2 * 1024, 'a');
+    string message(1 * 1024, 'a');
     SignMessage(message, AuthorizationSetBuilder().Digest(Digest::NONE));
 }
 
@@ -1291,7 +1291,7 @@
 TEST_F(VerificationOperationsTest, RsaSuccess) {
     ASSERT_EQ(ErrorCode::OK, GenerateKey(AuthorizationSetBuilder()
                                              .Authorization(TAG_NO_AUTH_REQUIRED)
-                                             .RsaSigningKey(1024, 3)
+                                             .RsaSigningKey(1024, 65537)
                                              .Digest(Digest::NONE)
                                              .Padding(PaddingMode::NONE)));
     string message = "12345678901234567890123456789012";
@@ -1310,7 +1310,7 @@
     ASSERT_EQ(ErrorCode::OK,
               GenerateKey(AuthorizationSetBuilder()
                               .Authorization(TAG_NO_AUTH_REQUIRED)
-                              .RsaSigningKey(2048, 3)
+                              .RsaSigningKey(2048, 65537)
                               .Digest(Digest::NONE, Digest::MD5, Digest::SHA1, Digest::SHA_2_224,
                                       Digest::SHA_2_256, Digest::SHA_2_384, Digest::SHA_2_512)
                               .Padding(PaddingMode::NONE)
@@ -1534,7 +1534,7 @@
  */
 TEST_F(ExportKeyTest, RsaUnsupportedKeyFormat) {
     ASSERT_EQ(ErrorCode::OK, GenerateKey(AuthorizationSetBuilder()
-                                             .RsaSigningKey(1024, 3)
+                                             .RsaSigningKey(1024, 65537)
                                              .Digest(Digest::NONE)
                                              .Padding(PaddingMode::NONE)));
     HidlBuf export_data;
@@ -1550,7 +1550,7 @@
 TEST_F(ExportKeyTest, RsaCorruptedKeyBlob) {
     ASSERT_EQ(ErrorCode::OK, GenerateKey(AuthorizationSetBuilder()
                                              .Authorization(TAG_NO_AUTH_REQUIRED)
-                                             .RsaSigningKey(1024, 3)
+                                             .RsaSigningKey(1024, 65537)
                                              .Digest(Digest::NONE)
                                              .Padding(PaddingMode::NONE)));
     for (size_t i = 0; i < key_blob_.size(); ++i) {
@@ -1939,7 +1939,7 @@
 TEST_F(EncryptionOperationsTest, RsaNoPaddingSuccess) {
     ASSERT_EQ(ErrorCode::OK, GenerateKey(AuthorizationSetBuilder()
                                              .Authorization(TAG_NO_AUTH_REQUIRED)
-                                             .RsaEncryptionKey(1024, 3)
+                                             .RsaEncryptionKey(1024, 65537)
                                              .Padding(PaddingMode::NONE)));
 
     string message = string(1024 / 8, 'a');
@@ -1962,7 +1962,7 @@
 TEST_F(EncryptionOperationsTest, RsaNoPaddingShortMessage) {
     ASSERT_EQ(ErrorCode::OK, GenerateKey(AuthorizationSetBuilder()
                                              .Authorization(TAG_NO_AUTH_REQUIRED)
-                                             .RsaEncryptionKey(1024, 3)
+                                             .RsaEncryptionKey(1024, 65537)
                                              .Padding(PaddingMode::NONE)));
 
     string message = "1";
@@ -1991,7 +1991,7 @@
 TEST_F(EncryptionOperationsTest, RsaNoPaddingTooLong) {
     ASSERT_EQ(ErrorCode::OK, GenerateKey(AuthorizationSetBuilder()
                                              .Authorization(TAG_NO_AUTH_REQUIRED)
-                                             .RsaEncryptionKey(1024, 3)
+                                             .RsaEncryptionKey(1024, 65537)
                                              .Padding(PaddingMode::NONE)));
 
     string message(1024 / 8 + 1, 'a');
@@ -2011,7 +2011,7 @@
 TEST_F(EncryptionOperationsTest, RsaNoPaddingTooLarge) {
     ASSERT_EQ(ErrorCode::OK, GenerateKey(AuthorizationSetBuilder()
                                              .Authorization(TAG_NO_AUTH_REQUIRED)
-                                             .RsaEncryptionKey(1024, 3)
+                                             .RsaEncryptionKey(1024, 65537)
                                              .Padding(PaddingMode::NONE)));
 
     HidlBuf exported;
@@ -2057,7 +2057,7 @@
     size_t key_size = 2048;  // Need largish key for SHA-512 test.
     ASSERT_EQ(ErrorCode::OK, GenerateKey(AuthorizationSetBuilder()
                                              .Authorization(TAG_NO_AUTH_REQUIRED)
-                                             .RsaEncryptionKey(key_size, 3)
+                                             .RsaEncryptionKey(key_size, 65537)
                                              .Padding(PaddingMode::RSA_OAEP)
                                              .Digest(digests)));
 
@@ -2105,7 +2105,7 @@
 TEST_F(EncryptionOperationsTest, RsaOaepInvalidDigest) {
     ASSERT_EQ(ErrorCode::OK, GenerateKey(AuthorizationSetBuilder()
                                              .Authorization(TAG_NO_AUTH_REQUIRED)
-                                             .RsaEncryptionKey(1024, 3)
+                                             .RsaEncryptionKey(1024, 65537)
                                              .Padding(PaddingMode::RSA_OAEP)
                                              .Digest(Digest::NONE)));
     string message = "Hello World!";
@@ -2123,7 +2123,7 @@
 TEST_F(EncryptionOperationsTest, RsaOaepDecryptWithWrongDigest) {
     ASSERT_EQ(ErrorCode::OK, GenerateKey(AuthorizationSetBuilder()
                                              .Authorization(TAG_NO_AUTH_REQUIRED)
-                                             .RsaEncryptionKey(1024, 3)
+                                             .RsaEncryptionKey(1024, 65537)
                                              .Padding(PaddingMode::RSA_OAEP)
                                              .Digest(Digest::SHA_2_256, Digest::SHA_2_224)));
     string message = "Hello World!";
@@ -2149,7 +2149,7 @@
 TEST_F(EncryptionOperationsTest, RsaOaepTooLarge) {
     ASSERT_EQ(ErrorCode::OK, GenerateKey(AuthorizationSetBuilder()
                                              .Authorization(TAG_NO_AUTH_REQUIRED)
-                                             .RsaEncryptionKey(1024, 3)
+                                             .RsaEncryptionKey(1024, 65537)
                                              .Padding(PaddingMode::RSA_OAEP)
                                              .Digest(Digest::SHA1)));
     constexpr size_t digest_size = 160 /* SHA1 */ / 8;
@@ -2171,7 +2171,7 @@
 TEST_F(EncryptionOperationsTest, RsaPkcs1Success) {
     ASSERT_EQ(ErrorCode::OK, GenerateKey(AuthorizationSetBuilder()
                                              .Authorization(TAG_NO_AUTH_REQUIRED)
-                                             .RsaEncryptionKey(1024, 3)
+                                             .RsaEncryptionKey(1024, 65537)
                                              .Padding(PaddingMode::RSA_PKCS1_1_5_ENCRYPT)));
 
     string message = "Hello World!";
@@ -2210,7 +2210,7 @@
 TEST_F(EncryptionOperationsTest, RsaPkcs1TooLarge) {
     ASSERT_EQ(ErrorCode::OK, GenerateKey(AuthorizationSetBuilder()
                                              .Authorization(TAG_NO_AUTH_REQUIRED)
-                                             .RsaEncryptionKey(1024, 3)
+                                             .RsaEncryptionKey(1024, 65537)
                                              .Padding(PaddingMode::RSA_PKCS1_1_5_ENCRYPT)));
     string message(1024 / 8 - 10, 'a');
 
@@ -3229,7 +3229,7 @@
     std::cout << "Hello" << std::endl;
 
     auto auths = AuthorizationSetBuilder()
-                     .TripleDesEncryptionKey(112)
+                     .TripleDesEncryptionKey(168)
                      .BlockMode(BlockMode::ECB)
                      .Padding(PaddingMode::NONE);
 
@@ -3257,7 +3257,7 @@
  */
 TEST_F(EncryptionOperationsTest, TripleDesEcbNotAuthorized) {
     ASSERT_EQ(ErrorCode::OK, GenerateKey(AuthorizationSetBuilder()
-                                             .TripleDesEncryptionKey(112)
+                                             .TripleDesEncryptionKey(168)
                                              .BlockMode(BlockMode::CBC)
                                              .Padding(PaddingMode::NONE)));
 
@@ -3272,7 +3272,7 @@
  */
 TEST_F(EncryptionOperationsTest, TripleDesEcbPkcs7Padding) {
     ASSERT_EQ(ErrorCode::OK, GenerateKey(AuthorizationSetBuilder()
-                                             .TripleDesEncryptionKey(112)
+                                             .TripleDesEncryptionKey(168)
                                              .BlockMode(BlockMode::ECB)
                                              .Padding(PaddingMode::PKCS7)));
 
@@ -3294,7 +3294,7 @@
  */
 TEST_F(EncryptionOperationsTest, TripleDesEcbNoPaddingKeyWithPkcs7Padding) {
     ASSERT_EQ(ErrorCode::OK, GenerateKey(AuthorizationSetBuilder()
-                                             .TripleDesEncryptionKey(112)
+                                             .TripleDesEncryptionKey(168)
                                              .BlockMode(BlockMode::ECB)
                                              .Padding(PaddingMode::NONE)));
     for (size_t i = 0; i < 32; ++i) {
@@ -3311,7 +3311,7 @@
  */
 TEST_F(EncryptionOperationsTest, TripleDesEcbPkcs7PaddingCorrupted) {
     ASSERT_EQ(ErrorCode::OK, GenerateKey(AuthorizationSetBuilder()
-                                             .TripleDesEncryptionKey(112)
+                                             .TripleDesEncryptionKey(168)
                                              .BlockMode(BlockMode::ECB)
                                              .Padding(PaddingMode::PKCS7)));
 
@@ -3347,49 +3347,6 @@
 // the NIST vectors are multiples of the block size.
 static const TripleDesTestVector kTripleDesTestVectors[] = {
     {
-        "TECBMMT2 Encrypt 0", KeyPurpose::ENCRYPT, BlockMode::ECB, PaddingMode::NONE,
-        "ad192fd064b5579e7a4fb3c8f794f22a",  // key
-        "",                                  // IV
-        "13bad542f3652d67",                  // input
-        "908e543cf2cb254f",                  // output
-    },
-    {
-        "TECBMMT2 Encrypt 0 PKCS7", KeyPurpose::ENCRYPT, BlockMode::ECB, PaddingMode::PKCS7,
-        "ad192fd064b5579e7a4fb3c8f794f22a",  // key
-        "",                                  // IV
-        "13bad542f3652d6700",                // input
-        "908e543cf2cb254fc40165289a89008c",  // output
-    },
-    {
-        "TECBMMT2 Encrypt 0 PKCS7 decrypted", KeyPurpose::DECRYPT, BlockMode::ECB,
-        PaddingMode::PKCS7,
-        "ad192fd064b5579e7a4fb3c8f794f22a",  // key
-        "",                                  // IV
-        "908e543cf2cb254fc40165289a89008c",  // input
-        "13bad542f3652d6700",                // output
-    },
-    {
-        "TECBMMT2 Encrypt 1", KeyPurpose::ENCRYPT, BlockMode::ECB, PaddingMode::NONE,
-        "259df16e7af804fe83b90e9bf7c7e557",  // key
-        "",                                  // IV
-        "a4619c433bbd6787c07c81728f9ac9fa",  // input
-        "9e06de155c483c6bcfd834dbc8bd5830",  // output
-    },
-    {
-        "TECBMMT2 Decrypt 0", KeyPurpose::DECRYPT, BlockMode::ECB, PaddingMode::NONE,
-        "b32ff42092024adf2076b9d3d9f19e6d",  // key
-        "",                                  // IV
-        "2f3f2a49bba807a5",                  // input
-        "2249973fa135fb52",                  // output
-    },
-    {
-        "TECBMMT2 Decrypt 1", KeyPurpose::DECRYPT, BlockMode::ECB, PaddingMode::NONE,
-        "023dfbe6621aa17cc219eae9cdecd923",  // key
-        "",                                  // IV
-        "54045dc71d8d565b227ec19f06fef912",  // input
-        "9b071622181e6412de6066429401410d",  // output
-    },
-    {
         "TECBMMT3 Encrypt 0", KeyPurpose::ENCRYPT, BlockMode::ECB, PaddingMode::NONE,
         "a2b5bc67da13dc92cd9d344aa238544a0e1fa79ef76810cd",  // key
         "",                                                  // IV
@@ -3418,34 +3375,6 @@
         "9b2ae9d998efe62f1b592e7e1df8ff38",                  // output
     },
     {
-        "TCBCMMT2 Encrypt 0", KeyPurpose::ENCRYPT, BlockMode::CBC, PaddingMode::NONE,
-        "34a41a8c293176c1b30732ecfe38ae8a",  // key
-        "f55b4855228bd0b4",                  // IV
-        "7dd880d2a9ab411c",                  // input
-        "c91892948b6cadb4",                  // output
-    },
-    {
-        "TCBCMMT2 Encrypt 1", KeyPurpose::ENCRYPT, BlockMode::CBC, PaddingMode::NONE,
-        "70a88fa1dfb9942fa77f40157ffef2ad",  // key
-        "ece08ce2fdc6ce80",                  // IV
-        "bc225304d5a3a5c9918fc5006cbc40cc",  // input
-        "27f67dc87af7ddb4b68f63fa7c2d454a",  // output
-    },
-    {
-        "TCBCMMT2 Decrypt 0", KeyPurpose::DECRYPT, BlockMode::CBC, PaddingMode::NONE,
-        "4ff47fda89209bda8c85f7fe80192007",  // key
-        "d5bc4891dabe48b9",                  // IV
-        "7e154b28c353adef",                  // input
-        "712b961ea9a1d0af",                  // output
-    },
-    {
-        "TCBCMMT2 Decrypt 1", KeyPurpose::DECRYPT, BlockMode::CBC, PaddingMode::NONE,
-        "464092cdbf736d38fb1fe6a12a94ae0e",  // key
-        "5423455f00023b01",                  // IV
-        "3f6050b74ed64416bc23d53b0469ed7a",  // input
-        "9cbe7d1b5cdd1864c3095ba810575960",  // output
-    },
-    {
         "TCBCMMT3 Encrypt 0", KeyPurpose::ENCRYPT, BlockMode::CBC, PaddingMode::NONE,
         "b5cb1504802326c73df186e3e352a20de643b0d63ee30e37",  // key
         "43f791134c5647ba",                                  // IV
@@ -3512,7 +3441,7 @@
  */
 TEST_F(EncryptionOperationsTest, TripleDesCbcRoundTripSuccess) {
     ASSERT_EQ(ErrorCode::OK, GenerateKey(AuthorizationSetBuilder()
-                                             .TripleDesEncryptionKey(112)
+                                             .TripleDesEncryptionKey(168)
                                              .BlockMode(BlockMode::CBC)
                                              .Padding(PaddingMode::NONE)));
     // Two-block message.
@@ -3540,7 +3469,7 @@
  */
 TEST_F(EncryptionOperationsTest, TripleDesCallerIv) {
     ASSERT_EQ(ErrorCode::OK, GenerateKey(AuthorizationSetBuilder()
-                                             .TripleDesEncryptionKey(112)
+                                             .TripleDesEncryptionKey(168)
                                              .BlockMode(BlockMode::CBC)
                                              .Authorization(TAG_CALLER_NONCE)
                                              .Padding(PaddingMode::NONE)));
@@ -3574,7 +3503,7 @@
  */
 TEST_F(EncryptionOperationsTest, TripleDesCallerNonceProhibited) {
     ASSERT_EQ(ErrorCode::OK, GenerateKey(AuthorizationSetBuilder()
-                                             .TripleDesEncryptionKey(112)
+                                             .TripleDesEncryptionKey(168)
                                              .BlockMode(BlockMode::CBC)
                                              .Padding(PaddingMode::NONE)));
 
@@ -3605,7 +3534,7 @@
  */
 TEST_F(EncryptionOperationsTest, TripleDesCbcNotAuthorized) {
     ASSERT_EQ(ErrorCode::OK, GenerateKey(AuthorizationSetBuilder()
-                                             .TripleDesEncryptionKey(112)
+                                             .TripleDesEncryptionKey(168)
                                              .BlockMode(BlockMode::ECB)
                                              .Padding(PaddingMode::NONE)));
     // Two-block message.
@@ -3622,7 +3551,7 @@
  */
 TEST_F(EncryptionOperationsTest, TripleDesCbcNoPaddingWrongInputSize) {
     ASSERT_EQ(ErrorCode::OK, GenerateKey(AuthorizationSetBuilder()
-                                             .TripleDesEncryptionKey(112)
+                                             .TripleDesEncryptionKey(168)
                                              .BlockMode(BlockMode::CBC)
                                              .Padding(PaddingMode::NONE)));
     // Message is slightly shorter than two blocks.
@@ -3643,7 +3572,7 @@
  */
 TEST_F(EncryptionOperationsTest, TripleDesCbcPkcs7Padding) {
     ASSERT_EQ(ErrorCode::OK, GenerateKey(AuthorizationSetBuilder()
-                                             .TripleDesEncryptionKey(112)
+                                             .TripleDesEncryptionKey(168)
                                              .BlockMode(BlockMode::CBC)
                                              .Padding(PaddingMode::PKCS7)));
 
@@ -3665,7 +3594,7 @@
  */
 TEST_F(EncryptionOperationsTest, TripleDesCbcNoPaddingKeyWithPkcs7Padding) {
     ASSERT_EQ(ErrorCode::OK, GenerateKey(AuthorizationSetBuilder()
-                                             .TripleDesEncryptionKey(112)
+                                             .TripleDesEncryptionKey(168)
                                              .BlockMode(BlockMode::CBC)
                                              .Padding(PaddingMode::NONE)));
 
@@ -3684,7 +3613,7 @@
  */
 TEST_F(EncryptionOperationsTest, TripleDesCbcPkcs7PaddingCorrupted) {
     ASSERT_EQ(ErrorCode::OK, GenerateKey(AuthorizationSetBuilder()
-                                             .TripleDesEncryptionKey(112)
+                                             .TripleDesEncryptionKey(168)
                                              .BlockMode(BlockMode::CBC)
                                              .Padding(PaddingMode::PKCS7)));
 
@@ -3714,7 +3643,7 @@
  */
 TEST_F(EncryptionOperationsTest, TripleDesCbcIncrementalNoPadding) {
     ASSERT_EQ(ErrorCode::OK, GenerateKey(AuthorizationSetBuilder()
-                                             .TripleDesEncryptionKey(112)
+                                             .TripleDesEncryptionKey(168)
                                              .BlockMode(BlockMode::CBC)
                                              .Padding(PaddingMode::NONE)));
 
@@ -3784,7 +3713,7 @@
 TEST_F(MaxOperationsTest, TestLimitRsa) {
     ASSERT_EQ(ErrorCode::OK, GenerateKey(AuthorizationSetBuilder()
                                              .Authorization(TAG_NO_AUTH_REQUIRED)
-                                             .RsaSigningKey(1024, 3)
+                                             .RsaSigningKey(1024, 65537)
                                              .NoDigestOrPadding()
                                              .Authorization(TAG_MAX_USES_PER_BOOT, 3)));
 
@@ -3840,7 +3769,7 @@
 TEST_F(AttestationTest, RsaAttestation) {
     ASSERT_EQ(ErrorCode::OK, GenerateKey(AuthorizationSetBuilder()
                                              .Authorization(TAG_NO_AUTH_REQUIRED)
-                                             .RsaSigningKey(1024, 3)
+                                             .RsaSigningKey(1024, 65537)
                                              .Digest(Digest::NONE)
                                              .Padding(PaddingMode::NONE)
                                              .Authorization(TAG_INCLUDE_UNIQUE_ID)));
@@ -3867,7 +3796,7 @@
 TEST_F(AttestationTest, RsaAttestationRequiresAppId) {
     ASSERT_EQ(ErrorCode::OK, GenerateKey(AuthorizationSetBuilder()
                                              .Authorization(TAG_NO_AUTH_REQUIRED)
-                                             .RsaSigningKey(1024, 3)
+                                             .RsaSigningKey(1024, 65537)
                                              .Digest(Digest::NONE)
                                              .Padding(PaddingMode::NONE)
                                              .Authorization(TAG_INCLUDE_UNIQUE_ID)));
@@ -3978,7 +3907,7 @@
  */
 TEST_F(KeyDeletionTest, DeleteKey) {
     ASSERT_EQ(ErrorCode::OK, GenerateKey(AuthorizationSetBuilder()
-                                             .RsaSigningKey(1024, 3)
+                                             .RsaSigningKey(1024, 65537)
                                              .Digest(Digest::NONE)
                                              .Padding(PaddingMode::NONE)
                                              .Authorization(TAG_NO_AUTH_REQUIRED)));
@@ -4022,7 +3951,7 @@
 TEST_F(KeyDeletionTest, DeleteInvalidKey) {
     // Generate key just to check if rollback protection is implemented
     ASSERT_EQ(ErrorCode::OK, GenerateKey(AuthorizationSetBuilder()
-                                             .RsaSigningKey(1024, 3)
+                                             .RsaSigningKey(1024, 65537)
                                              .Digest(Digest::NONE)
                                              .Padding(PaddingMode::NONE)
                                              .Authorization(TAG_NO_AUTH_REQUIRED)));
@@ -4061,7 +3990,7 @@
 TEST_F(KeyDeletionTest, DeleteAllKeys) {
     if (!arm_deleteAllKeys) return;
     ASSERT_EQ(ErrorCode::OK, GenerateKey(AuthorizationSetBuilder()
-                                             .RsaSigningKey(1024, 3)
+                                             .RsaSigningKey(1024, 65537)
                                              .Digest(Digest::NONE)
                                              .Padding(PaddingMode::NONE)
                                              .Authorization(TAG_NO_AUTH_REQUIRED)));
diff --git a/radio/1.2/vts/functional/radio_hidl_hal_api.cpp b/radio/1.2/vts/functional/radio_hidl_hal_api.cpp
index c3769f8..34a87e1 100644
--- a/radio/1.2/vts/functional/radio_hidl_hal_api.cpp
+++ b/radio/1.2/vts/functional/radio_hidl_hal_api.cpp
@@ -655,3 +655,21 @@
              RadioError::REQUEST_NOT_SUPPORTED, RadioError::CANCELLED}));
     }
 }
+
+/*
+ * Test IRadio.getCellInfoList() for the response returned.
+ */
+TEST_F(RadioHidlTest_v1_2, getCellInfoList_1_2) {
+    int serial = GetRandomSerialNumber();
+
+    Return<void> res = radio_v1_2->getCellInfoList(serial);
+    ASSERT_OK(res);
+    EXPECT_EQ(std::cv_status::no_timeout, wait());
+    EXPECT_EQ(RadioResponseType::SOLICITED, radioRsp_v1_2->rspInfo.type);
+    EXPECT_EQ(serial, radioRsp_v1_2->rspInfo.serial);
+
+    ALOGI("getCellInfoList_1_2, rspInfo.error = %s\n",
+          toString(radioRsp_v1_2->rspInfo.error).c_str());
+    ASSERT_TRUE(CheckAnyOfErrors(radioRsp_v1_2->rspInfo.error,
+                                 {RadioError::NONE, RadioError::NO_NETWORK_FOUND}));
+}
diff --git a/vibrator/1.2/vts/functional/VtsHalVibratorV1_2TargetTest.cpp b/vibrator/1.2/vts/functional/VtsHalVibratorV1_2TargetTest.cpp
index d8df18b..3ed689a 100644
--- a/vibrator/1.2/vts/functional/VtsHalVibratorV1_2TargetTest.cpp
+++ b/vibrator/1.2/vts/functional/VtsHalVibratorV1_2TargetTest.cpp
@@ -33,6 +33,8 @@
 using ::android::hardware::Void;
 using ::android::sp;
 
+#define EXPECT_OK(ret) ASSERT_TRUE((ret).isOk())
+
 // Test environment for Vibrator HIDL HAL.
 class VibratorHidlEnvironment : public ::testing::VtsHalHidlTargetTestEnvBase {
    public:
@@ -65,22 +67,70 @@
 static void validatePerformEffect(Status status, uint32_t lengthMs) {
     ASSERT_TRUE(status == Status::OK || status == Status::UNSUPPORTED_OPERATION);
     if (status == Status::OK) {
-        ASSERT_GT(lengthMs, static_cast<uint32_t>(0))
-            << "Effects that return OK must return a non-zero duration";
+        ASSERT_LT(static_cast<uint32_t>(0), lengthMs)
+            << "Effects that return OK must return a positive duration";
     } else {
-        ASSERT_EQ(lengthMs, static_cast<uint32_t>(0))
+        ASSERT_EQ(static_cast<uint32_t>(0), lengthMs)
             << "Effects that return UNSUPPORTED_OPERATION must have a duration of zero";
     }
 }
 
+static void validatePerformEffectBadInput(Status status, uint32_t lengthMs) {
+    ASSERT_EQ(Status::UNSUPPORTED_OPERATION, status);
+    ASSERT_EQ(static_cast<uint32_t>(0), lengthMs)
+        << "Effects that return UNSUPPORTED_OPERATION must have a duration of zero";
+}
+
+/*
+ * Test to make sure effects within the valid range return are either supported and return OK with
+ * a valid duration, or are unsupported and return UNSUPPORTED_OPERATION with a duration of 0.
+ */
 TEST_F(VibratorHidlTest_1_2, PerformEffect_1_2) {
     for (const auto& effect : hidl_enum_iterator<Effect>()) {
         for (const auto& strength : hidl_enum_iterator<EffectStrength>()) {
-            vibrator->perform_1_2(effect, strength, validatePerformEffect);
+            EXPECT_OK(vibrator->perform_1_2(effect, strength, validatePerformEffect));
         }
     }
 }
 
+/*
+ * Test to make sure effect values above the valid range are rejected.
+ */
+TEST_F(VibratorHidlTest_1_2, PerformEffect_1_2_BadEffects_AboveValidRange) {
+    Effect effect = *std::prev(hidl_enum_iterator<Effect>().end());
+    Effect badEffect = static_cast<Effect>(static_cast<int32_t>(effect) + 1);
+    EXPECT_OK(
+        vibrator->perform_1_2(badEffect, EffectStrength::LIGHT, validatePerformEffectBadInput));
+}
+
+/*
+ * Test to make sure effect values below the valid range are rejected.
+ */
+TEST_F(VibratorHidlTest_1_2, PerformEffect_1_2_BadEffects_BelowValidRange) {
+    Effect effect = *hidl_enum_iterator<Effect>().begin();
+    Effect badEffect = static_cast<Effect>(static_cast<int32_t>(effect) - 1);
+    EXPECT_OK(
+        vibrator->perform_1_2(badEffect, EffectStrength::LIGHT, validatePerformEffectBadInput));
+}
+
+/*
+ * Test to make sure strength values above the valid range are rejected.
+ */
+TEST_F(VibratorHidlTest_1_2, PerformEffect_1_2_BadStrength_AboveValidRange) {
+    EffectStrength strength = *std::prev(hidl_enum_iterator<EffectStrength>().end());
+    EffectStrength badStrength = static_cast<EffectStrength>(static_cast<int32_t>(strength) + 1);
+    EXPECT_OK(vibrator->perform_1_2(Effect::THUD, badStrength, validatePerformEffectBadInput));
+}
+
+/*
+ * Test to make sure strength values below the valid range are rejected.
+ */
+TEST_F(VibratorHidlTest_1_2, PerformEffect_1_2_BadStrength_BelowValidRange) {
+    EffectStrength strength = *hidl_enum_iterator<EffectStrength>().begin();
+    EffectStrength badStrength = static_cast<EffectStrength>(static_cast<int32_t>(strength) - 1);
+    EXPECT_OK(vibrator->perform_1_2(Effect::THUD, badStrength, validatePerformEffectBadInput));
+}
+
 int main(int argc, char** argv) {
     ::testing::AddGlobalTestEnvironment(VibratorHidlEnvironment::Instance());
     ::testing::InitGoogleTest(&argc, argv);
diff --git a/wifi/1.2/default/tests/mock_wifi_legacy_hal.h b/wifi/1.2/default/tests/mock_wifi_legacy_hal.h
index 8e1696e..43370b4 100644
--- a/wifi/1.2/default/tests/mock_wifi_legacy_hal.h
+++ b/wifi/1.2/default/tests/mock_wifi_legacy_hal.h
@@ -36,6 +36,9 @@
     MOCK_METHOD2(stop, wifi_error(std::unique_lock<std::recursive_mutex>*,
                                   const std::function<void()>&));
     MOCK_METHOD2(setDfsFlag, wifi_error(const std::string&, bool));
+    MOCK_METHOD2(registerRadioModeChangeCallbackHandler,
+                 wifi_error(const std::string&,
+                            const on_radio_mode_change_callback&));
     MOCK_METHOD2(nanRegisterCallbackHandlers,
                  wifi_error(const std::string&, const NanCallbackHandlers&));
     MOCK_METHOD2(nanDisableRequest,
diff --git a/wifi/1.2/default/tests/wifi_chip_unit_tests.cpp b/wifi/1.2/default/tests/wifi_chip_unit_tests.cpp
index 1b082d0..27c8d60 100644
--- a/wifi/1.2/default/tests/wifi_chip_unit_tests.cpp
+++ b/wifi/1.2/default/tests/wifi_chip_unit_tests.cpp
@@ -395,10 +395,10 @@
     ASSERT_FALSE(createIface(IfaceType::AP).empty());
 }
 
-TEST_F(WifiChipV2_AwareIfaceCombinationTest, CreateStaSta_ShouldSucceed) {
+TEST_F(WifiChipV2_AwareIfaceCombinationTest, CreateStaSta_ShouldFail) {
     findModeAndConfigureForIfaceType(IfaceType::AP);
     ASSERT_FALSE(createIface(IfaceType::STA).empty());
-    ASSERT_FALSE(createIface(IfaceType::STA).empty());
+    ASSERT_TRUE(createIface(IfaceType::STA).empty());
 }
 
 TEST_F(WifiChipV2_AwareIfaceCombinationTest, CreateStaAp_ShouldSucceed) {
@@ -407,35 +407,18 @@
     ASSERT_FALSE(createIface(IfaceType::STA).empty());
 }
 
-TEST_F(WifiChipV2_AwareIfaceCombinationTest, CreateStaStaAp_ShouldFail) {
-    findModeAndConfigureForIfaceType(IfaceType::AP);
-    ASSERT_FALSE(createIface(IfaceType::STA).empty());
-    ASSERT_FALSE(createIface(IfaceType::STA).empty());
-    ASSERT_TRUE(createIface(IfaceType::AP).empty());
-}
-
 TEST_F(WifiChipV2_AwareIfaceCombinationTest,
-       CreateStaAp_AfterStaRemove_ShouldSucceed) {
+       CreateSta_AfterStaApRemove_ShouldSucceed) {
     findModeAndConfigureForIfaceType(IfaceType::STA);
-    ASSERT_FALSE(createIface(IfaceType::STA).empty());
     const auto sta_iface_name = createIface(IfaceType::STA);
     ASSERT_FALSE(sta_iface_name.empty());
-    ASSERT_TRUE(createIface(IfaceType::AP).empty());
-
-    // After removing STA iface, AP iface creation should succeed.
-    removeIface(IfaceType::STA, sta_iface_name);
-    ASSERT_FALSE(createIface(IfaceType::AP).empty());
-}
-
-TEST_F(WifiChipV2_AwareIfaceCombinationTest,
-       CreateStaSta_AfterApRemove_ShouldSucceed) {
-    findModeAndConfigureForIfaceType(IfaceType::STA);
-    ASSERT_FALSE(createIface(IfaceType::STA).empty());
     const auto ap_iface_name = createIface(IfaceType::AP);
     ASSERT_FALSE(ap_iface_name.empty());
+
     ASSERT_TRUE(createIface(IfaceType::STA).empty());
 
-    // After removing AP  iface, STA iface creation should succeed.
+    // After removing AP & STA iface, STA iface creation should succeed.
+    removeIface(IfaceType::STA, sta_iface_name);
     removeIface(IfaceType::AP, ap_iface_name);
     ASSERT_FALSE(createIface(IfaceType::STA).empty());
 }
@@ -524,16 +507,6 @@
 }
 
 TEST_F(WifiChipV2_AwareIfaceCombinationTest,
-       CreateStaSta_EnsureDifferentIfaceNames) {
-    findModeAndConfigureForIfaceType(IfaceType::AP);
-    const auto sta1_iface_name = createIface(IfaceType::STA);
-    const auto sta2_iface_name = createIface(IfaceType::STA);
-    ASSERT_FALSE(sta1_iface_name.empty());
-    ASSERT_FALSE(sta2_iface_name.empty());
-    ASSERT_NE(sta1_iface_name, sta2_iface_name);
-}
-
-TEST_F(WifiChipV2_AwareIfaceCombinationTest,
        CreateStaAp_EnsureDifferentIfaceNames) {
     findModeAndConfigureForIfaceType(IfaceType::AP);
     const auto sta_iface_name = createIface(IfaceType::STA);
diff --git a/wifi/1.2/default/wifi_chip.cpp b/wifi/1.2/default/wifi_chip.cpp
index 201b8e4..dcd0a3c 100644
--- a/wifi/1.2/default/wifi_chip.cpp
+++ b/wifi/1.2/default/wifi_chip.cpp
@@ -1171,7 +1171,7 @@
     // (conditional on isDualInterfaceSupported()):
     //    Interface Combination 1: Will support 1 STA and 1 P2P or NAN(optional)
     //                             concurrent iface operations.
-    //    Interface Combination 2: Will support 1 STA and 1 STA or AP concurrent
+    //    Interface Combination 2: Will support 1 STA and 1 AP concurrent
     //                             iface operations.
     // If Aware is enabled (conditional on isAwareSupported()), the iface
     // combination will be modified to support either P2P or NAN in place of
@@ -1181,8 +1181,7 @@
         const IWifiChip::ChipIfaceCombinationLimit
             chip_iface_combination_limit_1 = {{IfaceType::STA}, 1};
         const IWifiChip::ChipIfaceCombinationLimit
-            chip_iface_combination_limit_2 = {{IfaceType::STA, IfaceType::AP},
-                                              1};
+            chip_iface_combination_limit_2 = {{IfaceType::AP}, 1};
         IWifiChip::ChipIfaceCombinationLimit chip_iface_combination_limit_3;
         if (feature_flags_.lock()->isAwareSupported()) {
             chip_iface_combination_limit_3 = {{IfaceType::P2P, IfaceType::NAN},
diff --git a/wifi/1.2/default/wifi_legacy_hal.h b/wifi/1.2/default/wifi_legacy_hal.h
index bd68bcd..dedbbf8 100644
--- a/wifi/1.2/default/wifi_legacy_hal.h
+++ b/wifi/1.2/default/wifi_legacy_hal.h
@@ -274,7 +274,7 @@
     wifi_error deregisterErrorAlertCallbackHandler(
         const std::string& iface_name);
     // Radio mode functions.
-    wifi_error registerRadioModeChangeCallbackHandler(
+    virtual wifi_error registerRadioModeChangeCallbackHandler(
         const std::string& iface_name,
         const on_radio_mode_change_callback& on_user_change_callback);
     // RTT functions.