Merge "Keymaster: Fix potential bug in extractUint32()/extractUint64()" into rvc-dev
diff --git a/automotive/vehicle/2.0/types.hal b/automotive/vehicle/2.0/types.hal
index b4aa11d..f7a42e9 100644
--- a/automotive/vehicle/2.0/types.hal
+++ b/automotive/vehicle/2.0/types.hal
@@ -2532,16 +2532,17 @@
      *
      * int32[0]: 42      // must match the request id from the request
      * int32[1]:  2      // action = InitialUserInfoResponseAction::CREATE
-     * int32[2]: -1      // userToSwitchOrCreate.userId (not used as user will be created)
+     * int32[2]: -10000  // userToSwitchOrCreate.userId (not used as user will be created)
      * int32[3]:  8      // userToSwitchOrCreate.flags = ADMIN
-     * string: "||Owner"  // userLocales + separator + userNameToCreate
+     * string: "||Owner" // userLocales + separator + userNameToCreate
      *
      * Notice the string value represents multiple values, separated by ||. The first value is the
      * (optional) system locales for the user to be created (in this case, it's empty, meaning it
      * will use Android's default value), while the second value is the (also optional) name of the
      * to user to be created (when the type of response is InitialUserInfoResponseAction:CREATE).
      * For example, to create the same "Owner" user with "en-US" and "pt-BR" locales, the string
-     * value of the response would be "en-US,pt-BR||Owner".
+     * value of the response would be "en-US,pt-BR||Owner". As such, neither the locale nor the
+     * name can have || on it, although a single | is fine.
      *
      * NOTE: if the HAL doesn't support user management, then it should not define this property,
      * which in turn would disable the other user-related properties (for example, the Android
@@ -2626,7 +2627,7 @@
      * int32[5]:  0   // current user flags (none)
      * int32[6]:  3   // number of users
      * int32[7]:  0   // 1st user (user 0)
-     * int32[8]:  0   // 1st user flags (none)
+     * int32[8]:  1   // 1st user flags (SYSTEM)
      * int32[9]:  10  // 2nd user (user 10)
      * int32[10]: 0   // 2nd user flags (none)
      * int32[11]: 11  // 3rd user (user 11)
@@ -2660,7 +2661,7 @@
      * identified the user as A.
      *
      * The HAL makes this request by a property change event (passing a negative request id), and
-     * the Android system will response by issuye an ANDROID_POST_SWITCH call which the same
+     * the Android system will response by issue an ANDROID_POST_SWITCH call which the same
      * request id.
      *
      * For example, if the current foreground Android user is 10 and the HAL asked it to switch to
@@ -2704,7 +2705,7 @@
      *    in the response are different (as the current user didn't change to the target).
      * 3. If a new switch request is made before the HAL responded to the previous one or before
      *    the user was unlocked, then the ANDROID_POST_SWITCH request is not made. For example,
-     *    the driver could accidentally switch to the wrong user which has lock crentials, then
+     *    the driver could accidentally switch to the wrong user which has lock credentials, then
      *    switch to the right one before entering the credentials.
      *
      * The HAL can update its internal state once it receives this request, but it doesn't need to
@@ -4390,15 +4391,15 @@
     UserInfo userToSwitchOrCreate;
 
     /**
-     * Name of the user that should be created.
-     */
-    string userNameToCreate;
-
-    /**
      * System locales of the initial user (value will be passed as-is to
      * android.provider.Settings.System.SYSTEM_LOCALES)
      */
     string userLocales;
+
+    /**
+     * Name of the user that should be created.
+     */
+    string userNameToCreate;
 };
 
 /**
diff --git a/camera/provider/2.4/vts/functional/AndroidTest.xml b/camera/provider/2.4/vts/functional/AndroidTest.xml
index 05e1639..3000c0e 100644
--- a/camera/provider/2.4/vts/functional/AndroidTest.xml
+++ b/camera/provider/2.4/vts/functional/AndroidTest.xml
@@ -28,6 +28,6 @@
     <test class="com.android.tradefed.testtype.GTest" >
         <option name="native-test-device-path" value="/data/local/tmp" />
         <option name="module-name" value="VtsHalCameraProviderV2_4TargetTest" />
-        <option name="native-test-timeout" value="180000"/>
+        <option name="native-test-timeout" value="1800000"/> <!-- 30 min -->
     </test>
 </configuration>
diff --git a/radio/1.4/vts/functional/radio_hidl_hal_api.cpp b/radio/1.4/vts/functional/radio_hidl_hal_api.cpp
index e4c0877..3ba9b9d 100644
--- a/radio/1.4/vts/functional/radio_hidl_hal_api.cpp
+++ b/radio/1.4/vts/functional/radio_hidl_hal_api.cpp
@@ -18,6 +18,15 @@
 
 #define ASSERT_OK(ret) ASSERT_TRUE(ret.isOk())
 
+namespace {
+const RadioAccessSpecifier GERAN_SPECIFIER_P900 = {.radioAccessNetwork = RadioAccessNetworks::GERAN,
+                                                   .geranBands = {GeranBands::BAND_P900},
+                                                   .channels = {1, 2}};
+const RadioAccessSpecifier GERAN_SPECIFIER_850 = {.radioAccessNetwork = RadioAccessNetworks::GERAN,
+                                                  .geranBands = {GeranBands::BAND_850},
+                                                  .channels = {128, 129}};
+}  // namespace
+
 /*
  * Test IRadio.emergencyDial() for the response returned.
  */
@@ -199,14 +208,10 @@
 TEST_P(RadioHidlTest_v1_4, startNetworkScan) {
     serial = GetRandomSerialNumber();
 
-    RadioAccessSpecifier specifier = {.radioAccessNetwork = RadioAccessNetworks::GERAN,
-                                      .geranBands = {GeranBands::BAND_450, GeranBands::BAND_480},
-                                      .channels = {1, 2}};
-
     ::android::hardware::radio::V1_2::NetworkScanRequest request = {
             .type = ScanType::ONE_SHOT,
             .interval = 60,
-            .specifiers = {specifier},
+            .specifiers = {::GERAN_SPECIFIER_P900, ::GERAN_SPECIFIER_850},
             .maxSearchTime = 60,
             .incrementalResults = false,
             .incrementalResultsPeriodicity = 1};
@@ -234,6 +239,11 @@
                            {RadioError::NONE, RadioError::OPERATION_NOT_ALLOWED,
                             RadioError::REQUEST_NOT_SUPPORTED}));
     }
+
+    if (radioRsp_v1_4->rspInfo.error == RadioError::NONE) {
+        ALOGI("Stop Network Scan");
+        stopNetworkScan();
+    }
 }
 
 /*
@@ -270,14 +280,10 @@
 TEST_P(RadioHidlTest_v1_4, startNetworkScan_InvalidInterval1) {
     serial = GetRandomSerialNumber();
 
-    RadioAccessSpecifier specifier = {.radioAccessNetwork = RadioAccessNetworks::GERAN,
-                                      .geranBands = {GeranBands::BAND_450, GeranBands::BAND_480},
-                                      .channels = {1, 2}};
-
     ::android::hardware::radio::V1_2::NetworkScanRequest request = {
             .type = ScanType::ONE_SHOT,
             .interval = 4,
-            .specifiers = {specifier},
+            .specifiers = {::GERAN_SPECIFIER_P900, ::GERAN_SPECIFIER_850},
             .maxSearchTime = 60,
             .incrementalResults = false,
             .incrementalResultsPeriodicity = 1};
@@ -307,14 +313,10 @@
 TEST_P(RadioHidlTest_v1_4, startNetworkScan_InvalidInterval2) {
     serial = GetRandomSerialNumber();
 
-    RadioAccessSpecifier specifier = {.radioAccessNetwork = RadioAccessNetworks::GERAN,
-                                      .geranBands = {GeranBands::BAND_450, GeranBands::BAND_480},
-                                      .channels = {1, 2}};
-
     ::android::hardware::radio::V1_2::NetworkScanRequest request = {
             .type = ScanType::ONE_SHOT,
             .interval = 301,
-            .specifiers = {specifier},
+            .specifiers = {::GERAN_SPECIFIER_P900, ::GERAN_SPECIFIER_850},
             .maxSearchTime = 60,
             .incrementalResults = false,
             .incrementalResultsPeriodicity = 1};
@@ -343,14 +345,10 @@
 TEST_P(RadioHidlTest_v1_4, startNetworkScan_InvalidMaxSearchTime1) {
     serial = GetRandomSerialNumber();
 
-    RadioAccessSpecifier specifier = {.radioAccessNetwork = RadioAccessNetworks::GERAN,
-                                      .geranBands = {GeranBands::BAND_450, GeranBands::BAND_480},
-                                      .channels = {1, 2}};
-
     ::android::hardware::radio::V1_2::NetworkScanRequest request = {
             .type = ScanType::ONE_SHOT,
             .interval = 60,
-            .specifiers = {specifier},
+            .specifiers = {::GERAN_SPECIFIER_P900, ::GERAN_SPECIFIER_850},
             .maxSearchTime = 59,
             .incrementalResults = false,
             .incrementalResultsPeriodicity = 1};
@@ -379,14 +377,10 @@
 TEST_P(RadioHidlTest_v1_4, startNetworkScan_InvalidMaxSearchTime2) {
     serial = GetRandomSerialNumber();
 
-    RadioAccessSpecifier specifier = {.radioAccessNetwork = RadioAccessNetworks::GERAN,
-                                      .geranBands = {GeranBands::BAND_450, GeranBands::BAND_480},
-                                      .channels = {1, 2}};
-
     ::android::hardware::radio::V1_2::NetworkScanRequest request = {
             .type = ScanType::ONE_SHOT,
             .interval = 60,
-            .specifiers = {specifier},
+            .specifiers = {::GERAN_SPECIFIER_P900, ::GERAN_SPECIFIER_850},
             .maxSearchTime = 3601,
             .incrementalResults = false,
             .incrementalResultsPeriodicity = 1};
@@ -415,14 +409,10 @@
 TEST_P(RadioHidlTest_v1_4, startNetworkScan_InvalidPeriodicity1) {
     serial = GetRandomSerialNumber();
 
-    RadioAccessSpecifier specifier = {.radioAccessNetwork = RadioAccessNetworks::GERAN,
-                                      .geranBands = {GeranBands::BAND_450, GeranBands::BAND_480},
-                                      .channels = {1, 2}};
-
     ::android::hardware::radio::V1_2::NetworkScanRequest request = {
             .type = ScanType::ONE_SHOT,
             .interval = 60,
-            .specifiers = {specifier},
+            .specifiers = {::GERAN_SPECIFIER_P900, ::GERAN_SPECIFIER_850},
             .maxSearchTime = 600,
             .incrementalResults = true,
             .incrementalResultsPeriodicity = 0};
@@ -451,14 +441,10 @@
 TEST_P(RadioHidlTest_v1_4, startNetworkScan_InvalidPeriodicity2) {
     serial = GetRandomSerialNumber();
 
-    RadioAccessSpecifier specifier = {.radioAccessNetwork = RadioAccessNetworks::GERAN,
-                                      .geranBands = {GeranBands::BAND_450, GeranBands::BAND_480},
-                                      .channels = {1, 2}};
-
     ::android::hardware::radio::V1_2::NetworkScanRequest request = {
             .type = ScanType::ONE_SHOT,
             .interval = 60,
-            .specifiers = {specifier},
+            .specifiers = {::GERAN_SPECIFIER_P900, ::GERAN_SPECIFIER_850},
             .maxSearchTime = 600,
             .incrementalResults = true,
             .incrementalResultsPeriodicity = 11};
@@ -487,14 +473,10 @@
 TEST_P(RadioHidlTest_v1_4, startNetworkScan_GoodRequest1) {
     serial = GetRandomSerialNumber();
 
-    RadioAccessSpecifier specifier = {.radioAccessNetwork = RadioAccessNetworks::GERAN,
-                                      .geranBands = {GeranBands::BAND_450, GeranBands::BAND_480},
-                                      .channels = {1, 2}};
-
     ::android::hardware::radio::V1_2::NetworkScanRequest request = {
             .type = ScanType::ONE_SHOT,
             .interval = 60,
-            .specifiers = {specifier},
+            .specifiers = {::GERAN_SPECIFIER_P900, ::GERAN_SPECIFIER_850},
             // Some vendor may not support max search time of 360s.
             // This issue is tracked in b/112205669.
             .maxSearchTime = 300,
@@ -518,6 +500,11 @@
                            {RadioError::NONE, RadioError::INVALID_ARGUMENTS,
                             RadioError::REQUEST_NOT_SUPPORTED}));
     }
+
+    if (radioRsp_v1_4->rspInfo.error == RadioError::NONE) {
+        ALOGI("Stop Network Scan");
+        stopNetworkScan();
+    }
 }
 
 /*
@@ -526,14 +513,10 @@
 TEST_P(RadioHidlTest_v1_4, startNetworkScan_GoodRequest2) {
     serial = GetRandomSerialNumber();
 
-    RadioAccessSpecifier specifier = {.radioAccessNetwork = RadioAccessNetworks::GERAN,
-                                      .geranBands = {GeranBands::BAND_450, GeranBands::BAND_480},
-                                      .channels = {1, 2}};
-
     ::android::hardware::radio::V1_2::NetworkScanRequest request = {
             .type = ScanType::ONE_SHOT,
             .interval = 60,
-            .specifiers = {specifier},
+            .specifiers = {::GERAN_SPECIFIER_P900, ::GERAN_SPECIFIER_850},
             // Some vendor may not support max search time of 360s.
             // This issue is tracked in b/112205669.
             .maxSearchTime = 300,
@@ -559,6 +542,11 @@
                            {RadioError::NONE, RadioError::INVALID_ARGUMENTS,
                             RadioError::REQUEST_NOT_SUPPORTED}));
     }
+
+    if (radioRsp_v1_4->rspInfo.error == RadioError::NONE) {
+        ALOGI("Stop Network Scan");
+        stopNetworkScan();
+    }
 }
 
 /*
diff --git a/radio/1.4/vts/functional/radio_hidl_hal_test.cpp b/radio/1.4/vts/functional/radio_hidl_hal_test.cpp
index 15a0b24..4ac6cc9 100644
--- a/radio/1.4/vts/functional/radio_hidl_hal_test.cpp
+++ b/radio/1.4/vts/functional/radio_hidl_hal_test.cpp
@@ -107,3 +107,9 @@
     radio_v1_4->getIccCardStatus(serial);
     EXPECT_EQ(std::cv_status::no_timeout, wait());
 }
+
+void RadioHidlTest_v1_4::stopNetworkScan() {
+    serial = GetRandomSerialNumber();
+    radio_v1_4->stopNetworkScan(serial);
+    EXPECT_EQ(std::cv_status::no_timeout, wait());
+}
diff --git a/radio/1.4/vts/functional/radio_hidl_hal_utils_v1_4.h b/radio/1.4/vts/functional/radio_hidl_hal_utils_v1_4.h
index 31b7e13..53a5845 100644
--- a/radio/1.4/vts/functional/radio_hidl_hal_utils_v1_4.h
+++ b/radio/1.4/vts/functional/radio_hidl_hal_utils_v1_4.h
@@ -721,7 +721,10 @@
     /* Update Sim Card Status */
     void updateSimCardStatus();
 
-   public:
+    /* Stop Network Scan Command */
+    void stopNetworkScan();
+
+  public:
     virtual void SetUp() override;
 
     /* Used as a mechanism to inform the test about data/event callback */
diff --git a/radio/1.5/vts/functional/radio_hidl_hal_api.cpp b/radio/1.5/vts/functional/radio_hidl_hal_api.cpp
index ee97431..29cb127 100644
--- a/radio/1.5/vts/functional/radio_hidl_hal_api.cpp
+++ b/radio/1.5/vts/functional/radio_hidl_hal_api.cpp
@@ -503,15 +503,21 @@
 TEST_P(RadioHidlTest_v1_5, setSystemSelectionChannels_1_5) {
     serial = GetRandomSerialNumber();
 
-    ::android::hardware::radio::V1_5::RadioAccessSpecifier::Bands rasBands;
-    rasBands.geranBands() = {GeranBands::BAND_450, GeranBands::BAND_480};
-
-    ::android::hardware::radio::V1_5::RadioAccessSpecifier specifier = {
+    ::android::hardware::radio::V1_5::RadioAccessSpecifier::Bands bandP900;
+    bandP900.geranBands() = {GeranBands::BAND_P900};
+    ::android::hardware::radio::V1_5::RadioAccessSpecifier::Bands band850;
+    band850.geranBands() = {GeranBands::BAND_850};
+    ::android::hardware::radio::V1_5::RadioAccessSpecifier specifierP900 = {
             .radioAccessNetwork = ::android::hardware::radio::V1_5::RadioAccessNetworks::GERAN,
-            .bands = rasBands,
+            .bands = bandP900,
             .channels = {1, 2}};
+    ::android::hardware::radio::V1_5::RadioAccessSpecifier specifier850 = {
+            .radioAccessNetwork = ::android::hardware::radio::V1_5::RadioAccessNetworks::GERAN,
+            .bands = band850,
+            .channels = {128, 129}};
 
-    Return<void> res = radio_v1_5->setSystemSelectionChannels_1_5(serial, true, {specifier});
+    Return<void> res =
+            radio_v1_5->setSystemSelectionChannels_1_5(serial, true, {specifierP900, specifier850});
     ASSERT_OK(res);
     EXPECT_EQ(std::cv_status::no_timeout, wait());
     EXPECT_EQ(RadioResponseType::SOLICITED, radioRsp_v1_5->rspInfo.type);
@@ -524,7 +530,8 @@
 
     if (radioRsp_v1_5->rspInfo.error == RadioError::NONE) {
         serial = GetRandomSerialNumber();
-        Return<void> res = radio_v1_5->setSystemSelectionChannels_1_5(serial, false, {specifier});
+        Return<void> res = radio_v1_5->setSystemSelectionChannels_1_5(
+                serial, false, {specifierP900, specifier850});
         ASSERT_OK(res);
         EXPECT_EQ(std::cv_status::no_timeout, wait());
         EXPECT_EQ(RadioResponseType::SOLICITED, radioRsp_v1_5->rspInfo.type);
@@ -541,18 +548,23 @@
 TEST_P(RadioHidlTest_v1_5, startNetworkScan) {
     serial = GetRandomSerialNumber();
 
-    ::android::hardware::radio::V1_5::RadioAccessSpecifier::Bands rasBands;
-    rasBands.geranBands() = {GeranBands::BAND_450, GeranBands::BAND_480};
-
-    ::android::hardware::radio::V1_5::RadioAccessSpecifier specifier = {
+    ::android::hardware::radio::V1_5::RadioAccessSpecifier::Bands bandP900;
+    bandP900.geranBands() = {GeranBands::BAND_P900};
+    ::android::hardware::radio::V1_5::RadioAccessSpecifier::Bands band850;
+    band850.geranBands() = {GeranBands::BAND_850};
+    ::android::hardware::radio::V1_5::RadioAccessSpecifier specifierP900 = {
             .radioAccessNetwork = ::android::hardware::radio::V1_5::RadioAccessNetworks::GERAN,
-            .bands = rasBands,
+            .bands = bandP900,
             .channels = {1, 2}};
+    ::android::hardware::radio::V1_5::RadioAccessSpecifier specifier850 = {
+            .radioAccessNetwork = ::android::hardware::radio::V1_5::RadioAccessNetworks::GERAN,
+            .bands = band850,
+            .channels = {128, 129}};
 
     ::android::hardware::radio::V1_5::NetworkScanRequest request = {
             .type = ScanType::ONE_SHOT,
             .interval = 60,
-            .specifiers = {specifier},
+            .specifiers = {specifierP900, specifier850},
             .maxSearchTime = 60,
             .incrementalResults = false,
             .incrementalResultsPeriodicity = 1};
@@ -574,6 +586,11 @@
         ASSERT_TRUE(CheckAnyOfErrors(radioRsp_v1_5->rspInfo.error,
                                      {RadioError::NONE, RadioError::OPERATION_NOT_ALLOWED}));
     }
+
+    if (radioRsp_v1_5->rspInfo.error == RadioError::NONE) {
+        ALOGI("Stop Network Scan");
+        stopNetworkScan();
+    }
 }
 
 /*
@@ -609,18 +626,23 @@
 TEST_P(RadioHidlTest_v1_5, startNetworkScan_InvalidInterval1) {
     serial = GetRandomSerialNumber();
 
-    ::android::hardware::radio::V1_5::RadioAccessSpecifier::Bands rasBands;
-    rasBands.geranBands() = {GeranBands::BAND_450, GeranBands::BAND_480};
-
-    ::android::hardware::radio::V1_5::RadioAccessSpecifier specifier = {
+    ::android::hardware::radio::V1_5::RadioAccessSpecifier::Bands bandP900;
+    bandP900.geranBands() = {GeranBands::BAND_P900};
+    ::android::hardware::radio::V1_5::RadioAccessSpecifier::Bands band850;
+    band850.geranBands() = {GeranBands::BAND_850};
+    ::android::hardware::radio::V1_5::RadioAccessSpecifier specifierP900 = {
             .radioAccessNetwork = ::android::hardware::radio::V1_5::RadioAccessNetworks::GERAN,
-            .bands = rasBands,
+            .bands = bandP900,
             .channels = {1, 2}};
+    ::android::hardware::radio::V1_5::RadioAccessSpecifier specifier850 = {
+            .radioAccessNetwork = ::android::hardware::radio::V1_5::RadioAccessNetworks::GERAN,
+            .bands = band850,
+            .channels = {128, 129}};
 
     ::android::hardware::radio::V1_5::NetworkScanRequest request = {
             .type = ScanType::ONE_SHOT,
             .interval = 4,
-            .specifiers = {specifier},
+            .specifiers = {specifierP900, specifier850},
             .maxSearchTime = 60,
             .incrementalResults = false,
             .incrementalResultsPeriodicity = 1};
@@ -648,18 +670,23 @@
 TEST_P(RadioHidlTest_v1_5, startNetworkScan_InvalidInterval2) {
     serial = GetRandomSerialNumber();
 
-    ::android::hardware::radio::V1_5::RadioAccessSpecifier::Bands rasBands;
-    rasBands.geranBands() = {GeranBands::BAND_450, GeranBands::BAND_480};
-
-    ::android::hardware::radio::V1_5::RadioAccessSpecifier specifier = {
+    ::android::hardware::radio::V1_5::RadioAccessSpecifier::Bands bandP900;
+    bandP900.geranBands() = {GeranBands::BAND_P900};
+    ::android::hardware::radio::V1_5::RadioAccessSpecifier::Bands band850;
+    band850.geranBands() = {GeranBands::BAND_850};
+    ::android::hardware::radio::V1_5::RadioAccessSpecifier specifierP900 = {
             .radioAccessNetwork = ::android::hardware::radio::V1_5::RadioAccessNetworks::GERAN,
-            .bands = rasBands,
+            .bands = bandP900,
             .channels = {1, 2}};
+    ::android::hardware::radio::V1_5::RadioAccessSpecifier specifier850 = {
+            .radioAccessNetwork = ::android::hardware::radio::V1_5::RadioAccessNetworks::GERAN,
+            .bands = band850,
+            .channels = {128, 129}};
 
     ::android::hardware::radio::V1_5::NetworkScanRequest request = {
             .type = ScanType::ONE_SHOT,
             .interval = 301,
-            .specifiers = {specifier},
+            .specifiers = {specifierP900, specifier850},
             .maxSearchTime = 60,
             .incrementalResults = false,
             .incrementalResultsPeriodicity = 1};
@@ -687,18 +714,23 @@
 TEST_P(RadioHidlTest_v1_5, startNetworkScan_InvalidMaxSearchTime1) {
     serial = GetRandomSerialNumber();
 
-    ::android::hardware::radio::V1_5::RadioAccessSpecifier::Bands rasBands;
-    rasBands.geranBands() = {GeranBands::BAND_450, GeranBands::BAND_480};
-
-    ::android::hardware::radio::V1_5::RadioAccessSpecifier specifier = {
+    ::android::hardware::radio::V1_5::RadioAccessSpecifier::Bands bandP900;
+    bandP900.geranBands() = {GeranBands::BAND_P900};
+    ::android::hardware::radio::V1_5::RadioAccessSpecifier::Bands band850;
+    band850.geranBands() = {GeranBands::BAND_850};
+    ::android::hardware::radio::V1_5::RadioAccessSpecifier specifierP900 = {
             .radioAccessNetwork = ::android::hardware::radio::V1_5::RadioAccessNetworks::GERAN,
-            .bands = rasBands,
+            .bands = bandP900,
             .channels = {1, 2}};
+    ::android::hardware::radio::V1_5::RadioAccessSpecifier specifier850 = {
+            .radioAccessNetwork = ::android::hardware::radio::V1_5::RadioAccessNetworks::GERAN,
+            .bands = band850,
+            .channels = {128, 129}};
 
     ::android::hardware::radio::V1_5::NetworkScanRequest request = {
             .type = ScanType::ONE_SHOT,
             .interval = 60,
-            .specifiers = {specifier},
+            .specifiers = {specifierP900, specifier850},
             .maxSearchTime = 59,
             .incrementalResults = false,
             .incrementalResultsPeriodicity = 1};
@@ -726,18 +758,23 @@
 TEST_P(RadioHidlTest_v1_5, startNetworkScan_InvalidMaxSearchTime2) {
     serial = GetRandomSerialNumber();
 
-    ::android::hardware::radio::V1_5::RadioAccessSpecifier::Bands rasBands;
-    rasBands.geranBands() = {GeranBands::BAND_450, GeranBands::BAND_480};
-
-    ::android::hardware::radio::V1_5::RadioAccessSpecifier specifier = {
+    ::android::hardware::radio::V1_5::RadioAccessSpecifier::Bands bandP900;
+    bandP900.geranBands() = {GeranBands::BAND_P900};
+    ::android::hardware::radio::V1_5::RadioAccessSpecifier::Bands band850;
+    band850.geranBands() = {GeranBands::BAND_850};
+    ::android::hardware::radio::V1_5::RadioAccessSpecifier specifierP900 = {
             .radioAccessNetwork = ::android::hardware::radio::V1_5::RadioAccessNetworks::GERAN,
-            .bands = rasBands,
+            .bands = bandP900,
             .channels = {1, 2}};
+    ::android::hardware::radio::V1_5::RadioAccessSpecifier specifier850 = {
+            .radioAccessNetwork = ::android::hardware::radio::V1_5::RadioAccessNetworks::GERAN,
+            .bands = band850,
+            .channels = {128, 129}};
 
     ::android::hardware::radio::V1_5::NetworkScanRequest request = {
             .type = ScanType::ONE_SHOT,
             .interval = 60,
-            .specifiers = {specifier},
+            .specifiers = {specifierP900, specifier850},
             .maxSearchTime = 3601,
             .incrementalResults = false,
             .incrementalResultsPeriodicity = 1};
@@ -765,18 +802,23 @@
 TEST_P(RadioHidlTest_v1_5, startNetworkScan_InvalidPeriodicity1) {
     serial = GetRandomSerialNumber();
 
-    ::android::hardware::radio::V1_5::RadioAccessSpecifier::Bands rasBands;
-    rasBands.geranBands() = {GeranBands::BAND_450, GeranBands::BAND_480};
-
-    ::android::hardware::radio::V1_5::RadioAccessSpecifier specifier = {
+    ::android::hardware::radio::V1_5::RadioAccessSpecifier::Bands bandP900;
+    bandP900.geranBands() = {GeranBands::BAND_P900};
+    ::android::hardware::radio::V1_5::RadioAccessSpecifier::Bands band850;
+    band850.geranBands() = {GeranBands::BAND_850};
+    ::android::hardware::radio::V1_5::RadioAccessSpecifier specifierP900 = {
             .radioAccessNetwork = ::android::hardware::radio::V1_5::RadioAccessNetworks::GERAN,
-            .bands = rasBands,
+            .bands = bandP900,
             .channels = {1, 2}};
+    ::android::hardware::radio::V1_5::RadioAccessSpecifier specifier850 = {
+            .radioAccessNetwork = ::android::hardware::radio::V1_5::RadioAccessNetworks::GERAN,
+            .bands = band850,
+            .channels = {128, 129}};
 
     ::android::hardware::radio::V1_5::NetworkScanRequest request = {
             .type = ScanType::ONE_SHOT,
             .interval = 60,
-            .specifiers = {specifier},
+            .specifiers = {specifierP900, specifier850},
             .maxSearchTime = 600,
             .incrementalResults = true,
             .incrementalResultsPeriodicity = 0};
@@ -804,18 +846,23 @@
 TEST_P(RadioHidlTest_v1_5, startNetworkScan_InvalidPeriodicity2) {
     serial = GetRandomSerialNumber();
 
-    ::android::hardware::radio::V1_5::RadioAccessSpecifier::Bands rasBands;
-    rasBands.geranBands() = {GeranBands::BAND_450, GeranBands::BAND_480};
-
-    ::android::hardware::radio::V1_5::RadioAccessSpecifier specifier = {
+    ::android::hardware::radio::V1_5::RadioAccessSpecifier::Bands bandP900;
+    bandP900.geranBands() = {GeranBands::BAND_P900};
+    ::android::hardware::radio::V1_5::RadioAccessSpecifier::Bands band850;
+    band850.geranBands() = {GeranBands::BAND_850};
+    ::android::hardware::radio::V1_5::RadioAccessSpecifier specifierP900 = {
             .radioAccessNetwork = ::android::hardware::radio::V1_5::RadioAccessNetworks::GERAN,
-            .bands = rasBands,
+            .bands = bandP900,
             .channels = {1, 2}};
+    ::android::hardware::radio::V1_5::RadioAccessSpecifier specifier850 = {
+            .radioAccessNetwork = ::android::hardware::radio::V1_5::RadioAccessNetworks::GERAN,
+            .bands = band850,
+            .channels = {128, 129}};
 
     ::android::hardware::radio::V1_5::NetworkScanRequest request = {
             .type = ScanType::ONE_SHOT,
             .interval = 60,
-            .specifiers = {specifier},
+            .specifiers = {specifierP900, specifier850},
             .maxSearchTime = 600,
             .incrementalResults = true,
             .incrementalResultsPeriodicity = 11};
@@ -843,18 +890,23 @@
 TEST_P(RadioHidlTest_v1_5, startNetworkScan_GoodRequest1) {
     serial = GetRandomSerialNumber();
 
-    ::android::hardware::radio::V1_5::RadioAccessSpecifier::Bands rasBands;
-    rasBands.geranBands() = {GeranBands::BAND_450, GeranBands::BAND_480};
-
-    ::android::hardware::radio::V1_5::RadioAccessSpecifier specifier = {
+    ::android::hardware::radio::V1_5::RadioAccessSpecifier::Bands bandP900;
+    bandP900.geranBands() = {GeranBands::BAND_P900};
+    ::android::hardware::radio::V1_5::RadioAccessSpecifier::Bands band850;
+    band850.geranBands() = {GeranBands::BAND_850};
+    ::android::hardware::radio::V1_5::RadioAccessSpecifier specifierP900 = {
             .radioAccessNetwork = ::android::hardware::radio::V1_5::RadioAccessNetworks::GERAN,
-            .bands = rasBands,
+            .bands = bandP900,
             .channels = {1, 2}};
+    ::android::hardware::radio::V1_5::RadioAccessSpecifier specifier850 = {
+            .radioAccessNetwork = ::android::hardware::radio::V1_5::RadioAccessNetworks::GERAN,
+            .bands = band850,
+            .channels = {128, 129}};
 
     ::android::hardware::radio::V1_5::NetworkScanRequest request = {
             .type = ScanType::ONE_SHOT,
             .interval = 60,
-            .specifiers = {specifier},
+            .specifiers = {specifierP900, specifier850},
             .maxSearchTime = 360,
             .incrementalResults = false,
             .incrementalResultsPeriodicity = 10};
@@ -874,6 +926,11 @@
                                      {RadioError::NONE, RadioError::INVALID_ARGUMENTS,
                                       RadioError::REQUEST_NOT_SUPPORTED}));
     }
+
+    if (radioRsp_v1_5->rspInfo.error == RadioError::NONE) {
+        ALOGI("Stop Network Scan");
+        stopNetworkScan();
+    }
 }
 
 /*
@@ -882,18 +939,23 @@
 TEST_P(RadioHidlTest_v1_5, startNetworkScan_GoodRequest2) {
     serial = GetRandomSerialNumber();
 
-    ::android::hardware::radio::V1_5::RadioAccessSpecifier::Bands rasBands;
-    rasBands.geranBands() = {GeranBands::BAND_450, GeranBands::BAND_480};
-
-    ::android::hardware::radio::V1_5::RadioAccessSpecifier specifier = {
+    ::android::hardware::radio::V1_5::RadioAccessSpecifier::Bands bandP900;
+    bandP900.geranBands() = {GeranBands::BAND_P900};
+    ::android::hardware::radio::V1_5::RadioAccessSpecifier::Bands band850;
+    band850.geranBands() = {GeranBands::BAND_850};
+    ::android::hardware::radio::V1_5::RadioAccessSpecifier specifierP900 = {
             .radioAccessNetwork = ::android::hardware::radio::V1_5::RadioAccessNetworks::GERAN,
-            .bands = rasBands,
+            .bands = bandP900,
             .channels = {1, 2}};
+    ::android::hardware::radio::V1_5::RadioAccessSpecifier specifier850 = {
+            .radioAccessNetwork = ::android::hardware::radio::V1_5::RadioAccessNetworks::GERAN,
+            .bands = band850,
+            .channels = {128, 129}};
 
     ::android::hardware::radio::V1_5::NetworkScanRequest request = {
             .type = ScanType::ONE_SHOT,
             .interval = 60,
-            .specifiers = {specifier},
+            .specifiers = {specifierP900, specifier850},
             .maxSearchTime = 360,
             .incrementalResults = false,
             .incrementalResultsPeriodicity = 10,
@@ -914,6 +976,11 @@
                                      {RadioError::NONE, RadioError::INVALID_ARGUMENTS,
                                       RadioError::REQUEST_NOT_SUPPORTED}));
     }
+
+    if (radioRsp_v1_5->rspInfo.error == RadioError::NONE) {
+        ALOGI("Stop Network Scan");
+        stopNetworkScan();
+    }
 }
 
 /*
diff --git a/radio/1.5/vts/functional/radio_hidl_hal_test.cpp b/radio/1.5/vts/functional/radio_hidl_hal_test.cpp
index 7313de4..4155550 100644
--- a/radio/1.5/vts/functional/radio_hidl_hal_test.cpp
+++ b/radio/1.5/vts/functional/radio_hidl_hal_test.cpp
@@ -78,3 +78,9 @@
     radio_v1_5->getIccCardStatus(serial);
     EXPECT_EQ(std::cv_status::no_timeout, wait());
 }
+
+void RadioHidlTest_v1_5::stopNetworkScan() {
+    serial = GetRandomSerialNumber();
+    radio_v1_5->stopNetworkScan(serial);
+    EXPECT_EQ(std::cv_status::no_timeout, wait());
+}
diff --git a/radio/1.5/vts/functional/radio_hidl_hal_utils_v1_5.h b/radio/1.5/vts/functional/radio_hidl_hal_utils_v1_5.h
index 6a369cc..87ce675 100644
--- a/radio/1.5/vts/functional/radio_hidl_hal_utils_v1_5.h
+++ b/radio/1.5/vts/functional/radio_hidl_hal_utils_v1_5.h
@@ -831,6 +831,9 @@
     /* Update Sim Card Status */
     void updateSimCardStatus();
 
+    /* Stop Network Scan Command */
+    void stopNetworkScan();
+
   public:
     virtual void SetUp() override;