Merge "[AOSP Ims] Merge Ims and ImsMedia HAL from 'main-ims-dev' to 'master' branch"
diff --git a/automotive/remoteaccess/test_grpc_server/README.md b/automotive/remoteaccess/test_grpc_server/README.md
index 42e2c94..090a8fd 100644
--- a/automotive/remoteaccess/test_grpc_server/README.md
+++ b/automotive/remoteaccess/test_grpc_server/README.md
@@ -41,7 +41,7 @@
pending tasks through the 'ServerWriter'. If no task is pending, then it must
block and wait for a new task to arrive.
- If one task data is failed to be sent through the channel, it likely means
+ If one task data fails to be sent through the channel, it likely means
the other side (Application processor) is shutting down or has closed the
channel. The wakeup client must put the task back to the pending queue and
wait for a new 'GetRemoteTasks' request to retry sending the task.
@@ -89,7 +89,7 @@
`adb remount`
-* Under android root: `cd out/target/product/[product_name]`
+* Under android root: `cd $ANDROID_PRODUCT_OUT`
* `adb push vendor/bin/TestWakeupClientServer /vendor/bin`
@@ -99,24 +99,24 @@
* `/vendor/bin/TestWakeupClientServer`
-## How to build and test the test wakeup client using one gcar emulator.
+## How to build and test the test wakeup client using one car emulator.
In this test setup we will use one google car emulator
-(gcar_emu_x86_64-userdebug). We assume both the TCU and the remote access HAL
+(sdk_car_x86_64-userdebug). We assume both the TCU and the remote access HAL
runs on the same Android system, and they communicate through local loopback
interface.
* Under android root, `source build/envsetup.sh`
-* `lunch gcar_emu_x86_64-userdebug`
+* `lunch sdk_car_x86_64-userdebug`
* `m -j`
* Run the emulator, the '-read-only' flag is required to run multiple instances:
- `aae emulator run -read-only`
+ `emulator -writable-system -read-only`
-* The android lunch target: gcar_emu_x86_64-userdebug and
+* The android lunch target: sdk_car_x86_64-userdebug and
cf_x86_64_auto-userdebug already contains the default remote access HAL. For
other lunch target, you can add the default remote access HAL by adding
'android.hardware.automotive.remoteaccess@V1-default-service' to
@@ -142,9 +142,7 @@
* `make -j TestWakeupClientServer`
-* `cd out/target/product/emulator_car64_x86_64/`
-
-* `adb push vendor/bin/TestWakeupClientServer /vendor/bin`
+* `adb push $ANDROID_PRODUCT_OUT/vendor/bin/TestWakeupClientServer /vendor/bin`
* `adb shell`
@@ -152,7 +150,7 @@
* `/vendor/bin/TestWakeupClientServer`
-* Remote access HAL should start by default when the gcar emulator starts. Now
+* Remote access HAL should start by default when the car emulator starts. Now
the test wake up client should also be running and generating fake tasks.
Start a new adb shell session by
@@ -210,9 +208,9 @@
* Now you can issue `ctrl c` on the first adb shell to stop the test wakeup
client.
-## How to build and test the test wakeup client using two gcar emulators.
+## How to build and test the test wakeup client using two car emulators.
-In this test case, we are going to use two gcar emulators, one as the
+In this test case, we are going to use two car emulators, one as the
Application Processor, one as the TCU.
* Change the IP address to allow IP communication between different emulator
@@ -227,13 +225,13 @@
* Under android root: `source build/envsetup.sh`
-* `lunch gcar_emu_x86_64-userdebug`
+* `lunch sdk_car_x86_64-userdebug`
* `m -j`
-* Start one gcar emulator as TCU
+* Start one car emulator as TCU
- `aae emulator run -read-only`
+ `emulator -writable-system -read-only`
* Start a new shell session. Connect to the emulator's console,
see [Start and stop a console session](https://developer.android.com/studio/run/emulator-console#console-session)
@@ -262,9 +260,7 @@
* `make -j TestWakeupClientServer`
-* `cd out/target/product/emulator_car64_x86_64/`
-
-* `adb push vendor/bin/TestWakeupClientServer /vendor/bin`
+* `adb push $ANDROID_PRODUCT_OUT/vendor/bin/TestWakeupClientServer /vendor/bin`
* `adb shell`
@@ -272,9 +268,9 @@
* `/vendor/bin/TestWakeupClientServer`
-* Start a new shell, start another gcar emulator as the Application Processor:
+* Start a new shell, start another car emulator as the Application Processor:
- `aae emulator run -read-only`
+ `emulator -writable-system -read-only`
* Connect to adb shell for the application processor:
@@ -282,5 +278,5 @@
`su`
-* Follow the test instructions for one gcar emulator using the 'dumpsys'
+* Follow the test instructions for one car emulator using the 'dumpsys'
commands.
diff --git a/automotive/remoteaccess/test_grpc_server/impl/include/TestWakeupClientServiceImpl.h b/automotive/remoteaccess/test_grpc_server/impl/include/TestWakeupClientServiceImpl.h
index 61c1ad3..12bd93b 100644
--- a/automotive/remoteaccess/test_grpc_server/impl/include/TestWakeupClientServiceImpl.h
+++ b/automotive/remoteaccess/test_grpc_server/impl/include/TestWakeupClientServiceImpl.h
@@ -81,6 +81,7 @@
void waitForTask();
void stopWait();
void handleTaskTimeout();
+ bool isEmpty();
private:
std::thread mCheckTaskTimeoutThread;
@@ -117,6 +118,8 @@
std::thread mThread;
// A variable to notify server is stopping.
std::condition_variable mServerStoppedCv;
+ // Whether wakeup AP is required for executing tasks.
+ std::atomic<bool> mWakeupRequired = false;
std::mutex mLock;
bool mServerStopped GUARDED_BY(mLock);
@@ -126,6 +129,8 @@
TaskQueue mTaskQueue;
void fakeTaskGenerateLoop();
+
+ void wakeupApplicationProcessor();
};
} // namespace remoteaccess
diff --git a/automotive/remoteaccess/test_grpc_server/impl/src/TestWakeupClientServiceImpl.cpp b/automotive/remoteaccess/test_grpc_server/impl/src/TestWakeupClientServiceImpl.cpp
index f64ac10..795265f 100644
--- a/automotive/remoteaccess/test_grpc_server/impl/src/TestWakeupClientServiceImpl.cpp
+++ b/automotive/remoteaccess/test_grpc_server/impl/src/TestWakeupClientServiceImpl.cpp
@@ -125,6 +125,11 @@
mTasksNotEmptyCv.notify_all();
}
+bool TaskQueue::isEmpty() {
+ std::lock_guard<std::mutex> lockGuard(mLock);
+ return mTasks.size() == 0 || mStopped;
+}
+
void TaskQueue::checkForTestTimeoutLoop() {
Looper::setForThread(mLooper);
@@ -179,6 +184,11 @@
// from it. Here we simulate receiving one remote task every {kTaskIntervalInMs}ms.
while (true) {
mTaskQueue.add(mFakeTaskGenerator.generateTask());
+ printf("Received a new task\n");
+ if (mWakeupRequired) {
+ wakeupApplicationProcessor();
+ }
+
printf("Sleeping for %d seconds until next task\n", kTaskIntervalInMs);
std::unique_lock lk(mLock);
@@ -224,9 +234,21 @@
Status TestWakeupClientServiceImpl::NotifyWakeupRequired(ServerContext* context,
const NotifyWakeupRequiredRequest* request,
NotifyWakeupRequiredResponse* response) {
+ if (request->iswakeuprequired() && !mWakeupRequired && !mTaskQueue.isEmpty()) {
+ // If wakeup is now required and previously not required, this means we have finished
+ // shutting down the device. If there are still pending tasks, try waking up AP again
+ // to finish executing those tasks.
+ wakeupApplicationProcessor();
+ }
+ mWakeupRequired = request->iswakeuprequired();
return Status::OK;
}
+void TestWakeupClientServiceImpl::wakeupApplicationProcessor() {
+ printf("Waking up application processor...\n");
+ // TODO(b/254547153): Send can bus message using socket CAN once we know what the message is.
+}
+
} // namespace remoteaccess
} // namespace automotive
} // namespace hardware
diff --git a/cas/aidl/Android.bp b/cas/aidl/Android.bp
index 0dfc0ce..32f12b1 100644
--- a/cas/aidl/Android.bp
+++ b/cas/aidl/Android.bp
@@ -14,6 +14,15 @@
* limitations under the License.
*/
+package {
+ // See: http://go/android-license-faq
+ // A large-scale-change added 'default_applicable_licenses' to import
+ // all of the 'license_kinds' from "hardware_interfaces_license"
+ // to get the below license kinds:
+ // SPDX-license-identifier-Apache-2.0
+ default_applicable_licenses: ["hardware_interfaces_license"],
+}
+
aidl_interface {
name: "android.hardware.cas",
vendor_available: true,
diff --git a/compatibility_matrices/Android.bp b/compatibility_matrices/Android.bp
index 524242f..4dc3f6c 100644
--- a/compatibility_matrices/Android.bp
+++ b/compatibility_matrices/Android.bp
@@ -28,7 +28,6 @@
"compatibility_matrix.3.xml",
],
kernel_configs: [
- "kernel_config_p_4.4",
"kernel_config_p_4.9",
"kernel_config_p_4.14",
],
diff --git a/compatibility_matrices/compatibility_matrix.current.xml b/compatibility_matrices/compatibility_matrix.current.xml
index 7f33215..dc87c63 100644
--- a/compatibility_matrices/compatibility_matrix.current.xml
+++ b/compatibility_matrices/compatibility_matrix.current.xml
@@ -204,7 +204,7 @@
<instance>default</instance>
</interface>
</hal>
- <hal format="aidl" optional="true">
+ <hal format="aidl" optional="true" updatable-via-apex="true">
<name>android.hardware.drm</name>
<version>1</version>
<interface>
diff --git a/identity/aidl/aidl_api/android.hardware.identity/current/android/hardware/identity/B237048744.aidl b/identity/aidl/aidl_api/android.hardware.identity/current/android/hardware/identity/B237048744.aidl
new file mode 100644
index 0000000..7fee851
--- /dev/null
+++ b/identity/aidl/aidl_api/android.hardware.identity/current/android/hardware/identity/B237048744.aidl
@@ -0,0 +1,38 @@
+/*
+ * Copyright 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.
+ */
+///////////////////////////////////////////////////////////////////////////////
+// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE. //
+///////////////////////////////////////////////////////////////////////////////
+
+// This file is a snapshot of an AIDL file. Do not edit it manually. There are
+// two cases:
+// 1). this is a frozen version file - do not edit this in any case.
+// 2). this is a 'current' file. If you make a backwards compatible change to
+// the interface (from the latest frozen version), the build system will
+// prompt you to update this file with `m <name>-update-api`.
+//
+// You must not make a backward incompatible change to any AIDL file built
+// with the aidl_interface module type with versions property set. The module
+// type is used to build AIDL files in a way that they can be used across
+// independently updatable components of the system. If a device is shipped
+// with such a backward incompatible change, it has a high risk of breaking
+// later when a module using the interface is updated, e.g., Mainline modules.
+
+package android.hardware.identity;
+@VintfStability
+enum B237048744 {
+ V5 = 0,
+}
diff --git a/identity/aidl/android/hardware/identity/B237048744.aidl b/identity/aidl/android/hardware/identity/B237048744.aidl
new file mode 100644
index 0000000..24b16c0
--- /dev/null
+++ b/identity/aidl/android/hardware/identity/B237048744.aidl
@@ -0,0 +1,22 @@
+/*
+ * Copyright 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.
+ */
+
+package android.hardware.identity;
+
+@VintfStability
+enum B237048744 {
+ V5 /* bump only includes import changes */,
+}
diff --git a/identity/aidl/default/android.hardware.identity_credential.xml b/identity/aidl/default/android.hardware.identity_credential.xml
index 20b2710..a49ddca 100644
--- a/identity/aidl/default/android.hardware.identity_credential.xml
+++ b/identity/aidl/default/android.hardware.identity_credential.xml
@@ -14,5 +14,5 @@
limitations under the License.
-->
<permissions>
- <feature name="android.hardware.identity_credential" version="202201" />
+ <feature name="android.hardware.identity_credential" version="202301" />
</permissions>
diff --git a/identity/aidl/vts/Android.bp b/identity/aidl/vts/Android.bp
index dd29819..54bf887 100644
--- a/identity/aidl/vts/Android.bp
+++ b/identity/aidl/vts/Android.bp
@@ -59,3 +59,16 @@
],
require_root: true,
}
+
+java_test_host {
+ name: "IdentityCredentialImplementedTest",
+ libs: [
+ "tradefed",
+ "vts-core-tradefed-harness",
+ ],
+ srcs: ["src/**/*.java"],
+ test_suites: [
+ "vts",
+ ],
+ test_config: "IdentityCredentialImplementedTest.xml",
+}
diff --git a/identity/aidl/vts/IdentityCredentialImplementedTest.xml b/identity/aidl/vts/IdentityCredentialImplementedTest.xml
new file mode 100644
index 0000000..4276ae6
--- /dev/null
+++ b/identity/aidl/vts/IdentityCredentialImplementedTest.xml
@@ -0,0 +1,22 @@
+<?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.
+-->
+<configuration description="Runs IdentityCredentialImplementedTest">
+ <target_preparer class="com.android.tradefed.targetprep.RootTargetPreparer" />
+
+ <test class="com.android.tradefed.testtype.HostTest" >
+ <option name="jar" value="IdentityCredentialImplementedTest.jar" />
+ </test>
+</configuration>
diff --git a/identity/aidl/vts/src/com/android/tests/security/identity/IdentityCredentialImplementedTest.java b/identity/aidl/vts/src/com/android/tests/security/identity/IdentityCredentialImplementedTest.java
new file mode 100644
index 0000000..4936f8c
--- /dev/null
+++ b/identity/aidl/vts/src/com/android/tests/security/identity/IdentityCredentialImplementedTest.java
@@ -0,0 +1,68 @@
+/*
+ * 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.tests.security.identity;
+
+import static org.junit.Assert.fail;
+import static org.junit.Assume.assumeTrue;
+
+import android.platform.test.annotations.RequiresDevice;
+import com.android.tradefed.device.DeviceNotAvailableException;
+import com.android.tradefed.testtype.DeviceJUnit4ClassRunner;
+import com.android.tradefed.testtype.junit4.BaseHostJUnit4Test;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+
+// This is a host-test which executes shell commands on the device. It would be
+// nicer to have this be a Device test (like CTS) but this is currently not
+// possible, see https://source.android.com/docs/core/tests/vts
+
+@RunWith(DeviceJUnit4ClassRunner.class)
+public class IdentityCredentialImplementedTest extends BaseHostJUnit4Test {
+ // Returns the ro.vendor.api_level or 0 if not set.
+ //
+ // Throws NumberFormatException if ill-formatted.
+ //
+ // Throws DeviceNotAvailableException if device is not available.
+ //
+ private int getVendorApiLevel() throws NumberFormatException, DeviceNotAvailableException {
+ String vendorApiLevelString =
+ getDevice().executeShellCommand("getprop ro.vendor.api_level").trim();
+ if (vendorApiLevelString.isEmpty()) {
+ return 0;
+ }
+ return Integer.parseInt(vendorApiLevelString);
+ }
+
+ // As of Android 14 VSR (vendor API level 34), Identity Credential is required at feature
+ // version 202301 or later.
+ @RequiresDevice
+ @Test
+ public void testIdentityCredentialIsImplemented() throws Exception {
+ int vendorApiLevel = getVendorApiLevel();
+ assumeTrue(vendorApiLevel >= 34);
+
+ final String minimumFeatureVersionNeeded = "202301";
+
+ String result = getDevice().executeShellCommand(
+ "pm has-feature android.hardware.identity_credential "
+ + minimumFeatureVersionNeeded);
+ if (!result.trim().equals("true")) {
+ fail("Identity Credential feature version " + minimumFeatureVersionNeeded
+ + " required but not found");
+ }
+ }
+}
diff --git a/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/IRadioNetwork.aidl b/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/IRadioNetwork.aidl
index 832738f..c115c86 100644
--- a/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/IRadioNetwork.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/IRadioNetwork.aidl
@@ -72,6 +72,6 @@
oneway void getUsageSetting(in int serial);
oneway void setEmergencyMode(int serial, in android.hardware.radio.network.EmergencyMode emcModeType);
oneway void triggerEmergencyNetworkScan(int serial, in android.hardware.radio.network.EmergencyNetworkScanTrigger request);
- oneway void cancelEmergencyNetworkScan(in int serial);
+ oneway void cancelEmergencyNetworkScan(int serial, boolean resetScan);
oneway void exitEmergencyMode(in int serial);
}
diff --git a/radio/aidl/android/hardware/radio/network/IRadioNetwork.aidl b/radio/aidl/android/hardware/radio/network/IRadioNetwork.aidl
index 0ac8b0e..574798a 100644
--- a/radio/aidl/android/hardware/radio/network/IRadioNetwork.aidl
+++ b/radio/aidl/android/hardware/radio/network/IRadioNetwork.aidl
@@ -18,6 +18,8 @@
import android.hardware.radio.AccessNetwork;
import android.hardware.radio.network.CdmaRoamingType;
+import android.hardware.radio.network.EmergencyMode;
+import android.hardware.radio.network.EmergencyNetworkScanTrigger;
import android.hardware.radio.network.IRadioNetworkIndication;
import android.hardware.radio.network.IRadioNetworkResponse;
import android.hardware.radio.network.IndicationFilter;
@@ -27,8 +29,6 @@
import android.hardware.radio.network.RadioBandMode;
import android.hardware.radio.network.SignalThresholdInfo;
import android.hardware.radio.network.UsageSetting;
-import android.hardware.radio.network.EmergencyNetworkScanTrigger;
-import android.hardware.radio.network.EmergencyMode;
/**
* This interface is used by telephony and telecom to talk to cellular radio for network APIs.
@@ -449,27 +449,30 @@
*
* Response function is IRadioEmergencyResponse.setEmergencyModeResponse()
*/
- void setEmergencyMode(int serial, in EmergencyMode emcModeType );
+ void setEmergencyMode(int serial, in EmergencyMode emcModeType);
/**
* Triggers an Emergency network scan.
*
* @param serial Serial number of the request.
- * @param request Defines the radio target networks/preferred network/
- * Max Scan Time and type of service to be scanned.
+ * @param request Contains the preferred networks and type of service to be scanned.
+ * See {@link EmergencyNetworkScanTrigger}.
*
* Response function is IRadioEmergencyResponse.triggerEmergencyNetworkScanResponse()
*/
- void triggerEmergencyNetworkScan( int serial, in EmergencyNetworkScanTrigger request);
+ void triggerEmergencyNetworkScan(int serial, in EmergencyNetworkScanTrigger request);
/**
* Cancels ongoing Emergency network scan
*
* @param serial Serial number of the request.
+ * @param resetScan Indicates how the next {@link #triggerEmergencyNetworkScan} should work.
+ * If {@code true}, then the modem shall start the new scan from the beginning,
+ * otherwise the modem shall resume from the last search.
*
* Response function is IRadioEmergencyResponse.cancelEmergencyNetworkScan()
*/
- void cancelEmergencyNetworkScan(in int serial);
+ void cancelEmergencyNetworkScan(int serial, boolean resetScan);
/**
* Exits ongoing Emergency Mode
diff --git a/radio/aidl/android/hardware/radio/network/IRadioNetworkResponse.aidl b/radio/aidl/android/hardware/radio/network/IRadioNetworkResponse.aidl
index 243e949..fc4db2c 100644
--- a/radio/aidl/android/hardware/radio/network/IRadioNetworkResponse.aidl
+++ b/radio/aidl/android/hardware/radio/network/IRadioNetworkResponse.aidl
@@ -23,13 +23,13 @@
import android.hardware.radio.network.CdmaRoamingType;
import android.hardware.radio.network.CellIdentity;
import android.hardware.radio.network.CellInfo;
+import android.hardware.radio.network.EmergencyRegResult;
import android.hardware.radio.network.OperatorInfo;
import android.hardware.radio.network.RadioAccessSpecifier;
import android.hardware.radio.network.RadioBandMode;
import android.hardware.radio.network.RegStateResult;
import android.hardware.radio.network.SignalStrength;
import android.hardware.radio.network.UsageSetting;
-import android.hardware.radio.network.EmergencyRegResult;
/**
* Interface declaring response functions to solicited radio requests for network APIs.
@@ -575,11 +575,15 @@
oneway void getUsageSettingResponse(in RadioResponseInfo info, in UsageSetting usageSetting);
/**
+ * Response of setEmergencyMode.
+ * This is an optional API.
+ *
* @param info Response info struct containing response type, serial no. and error.
* @param regState the current registration state of the modem.
*
* Valid errors returned:
* RadioError:NONE
+ * RadioError:REQUEST_NOT_SUPPORTED
* RadioError:RADIO_NOT_AVAILABLE
* RadioError:MODEM_ERR
* RadioError:INVALID_ARGUMENTS
@@ -587,10 +591,14 @@
void setEmergencyModeResponse(in RadioResponseInfo info, in EmergencyRegResult regState);
/**
- * @param info Response info struct containing response type, serial no. and error
+ * Response of triggerEmergencyNetworkScan.
+ * This is an optional API.
+ *
+ * @param info Response info struct containing response type, serial no. and error.
*
* Valid errors returned:
* RadioError:NONE
+ * RadioError:REQUEST_NOT_SUPPORTED
* RadioError:RADIO_NOT_AVAILABLE
* RadioError:MODEM_ERR
* RadioError:INVALID_ARGUMENTS
@@ -598,20 +606,28 @@
void triggerEmergencyNetworkScanResponse(in RadioResponseInfo info);
/**
- * @param info Response info struct containing response type, serial no. and error
+ * Response of exitEmergencyMode.
+ * This is an optional API.
+ *
+ * @param info Response info struct containing response type, serial no. and error.
*
* Valid errors returned:
* RadioError:NONE
+ * RadioError:REQUEST_NOT_SUPPORTED
* RadioError:RADIO_NOT_AVAILABLE
* RadioError:MODEM_ERR
*/
void exitEmergencyModeResponse(in RadioResponseInfo info);
/**
- * @param info Response info struct containing response type, serial no. and error
+ * Response of cancelEmergencyNetworkScan.
+ * This is an optional API.
+ *
+ * @param info Response info struct containing response type, serial no. and error.
*
* Valid errors returned:
* RadioError:NONE
+ * RadioError:REQUEST_NOT_SUPPORTED
* RadioError:RADIO_NOT_AVAILABLE
* RadioError:MODEM_ERR
*/
diff --git a/radio/aidl/compat/libradiocompat/include/libradiocompat/RadioNetwork.h b/radio/aidl/compat/libradiocompat/include/libradiocompat/RadioNetwork.h
index c714190..5dd6f0a 100644
--- a/radio/aidl/compat/libradiocompat/include/libradiocompat/RadioNetwork.h
+++ b/radio/aidl/compat/libradiocompat/include/libradiocompat/RadioNetwork.h
@@ -97,7 +97,7 @@
int32_t serial,
const ::aidl::android::hardware::radio::network::EmergencyNetworkScanTrigger&
scanTrigger) override;
- ::ndk::ScopedAStatus cancelEmergencyNetworkScan(int32_t serial) override;
+ ::ndk::ScopedAStatus cancelEmergencyNetworkScan(int32_t serial, bool resetScan) override;
::ndk::ScopedAStatus exitEmergencyMode(int32_t serial) override;
protected:
diff --git a/radio/aidl/compat/libradiocompat/network/RadioNetwork.cpp b/radio/aidl/compat/libradiocompat/network/RadioNetwork.cpp
index ff30ac3..6bb6b75 100644
--- a/radio/aidl/compat/libradiocompat/network/RadioNetwork.cpp
+++ b/radio/aidl/compat/libradiocompat/network/RadioNetwork.cpp
@@ -326,7 +326,7 @@
return ok();
}
-ScopedAStatus RadioNetwork::cancelEmergencyNetworkScan(int32_t serial) {
+ScopedAStatus RadioNetwork::cancelEmergencyNetworkScan(int32_t serial, bool) {
LOG_CALL << serial;
LOG(ERROR) << " cancelEmergencyNetworkScan is unsupported by HIDL HALs";
respond()->cancelEmergencyNetworkScanResponse(notSupported(serial));
diff --git a/radio/aidl/vts/radio_network_test.cpp b/radio/aidl/vts/radio_network_test.cpp
index 816c93c..31f4aca 100644
--- a/radio/aidl/vts/radio_network_test.cpp
+++ b/radio/aidl/vts/radio_network_test.cpp
@@ -1849,7 +1849,7 @@
ASSERT_TRUE(CheckAnyOfErrors(
radioRsp_network->rspInfo.error,
- {RadioError::NONE, RadioError::RADIO_NOT_AVAILABLE,
+ {RadioError::NONE, RadioError::REQUEST_NOT_SUPPORTED, RadioError::RADIO_NOT_AVAILABLE,
RadioError::MODEM_ERR, RadioError::INVALID_ARGUMENTS}));
LOG(DEBUG) << "setEmergencyMode finished";
}
@@ -1872,7 +1872,7 @@
ASSERT_TRUE(CheckAnyOfErrors(
radioRsp_network->rspInfo.error,
- {RadioError::NONE, RadioError::RADIO_NOT_AVAILABLE,
+ {RadioError::NONE, RadioError::REQUEST_NOT_SUPPORTED, RadioError::RADIO_NOT_AVAILABLE,
RadioError::MODEM_ERR, RadioError::INVALID_ARGUMENTS}));
LOG(DEBUG) << "triggerEmergencyNetworkScan finished";
}
@@ -1884,14 +1884,15 @@
LOG(DEBUG) << "cancelEmergencyNetworkScan";
serial = GetRandomSerialNumber();
- radio_network->cancelEmergencyNetworkScan(serial);
+ radio_network->cancelEmergencyNetworkScan(serial, true);
EXPECT_EQ(std::cv_status::no_timeout, wait());
EXPECT_EQ(RadioResponseType::SOLICITED, radioRsp_network->rspInfo.type);
EXPECT_EQ(serial, radioRsp_network->rspInfo.serial);
ASSERT_TRUE(CheckAnyOfErrors(
radioRsp_network->rspInfo.error,
- {RadioError::NONE, RadioError::RADIO_NOT_AVAILABLE, RadioError::MODEM_ERR}));
+ {RadioError::NONE, RadioError::REQUEST_NOT_SUPPORTED, RadioError::RADIO_NOT_AVAILABLE,
+ RadioError::MODEM_ERR}));
LOG(DEBUG) << "cancelEmergencyNetworkScan finished";
}
@@ -1909,6 +1910,7 @@
ASSERT_TRUE(CheckAnyOfErrors(
radioRsp_network->rspInfo.error,
- {RadioError::NONE, RadioError::RADIO_NOT_AVAILABLE, RadioError::MODEM_ERR}));
+ {RadioError::NONE, RadioError::REQUEST_NOT_SUPPORTED, RadioError::RADIO_NOT_AVAILABLE,
+ RadioError::MODEM_ERR}));
LOG(DEBUG) << "exitEmergencyMode finished";
}