Merge "Don't pass shared pointers to audio buffer around" into main am: ab2abe2070 am: 964bd02ba9
Original change: https://android-review.googlesource.com/c/device/google/cuttlefish/+/2982652
Change-Id: I795f08971ce22a8e1d6627771a4a503b4469d30d
Signed-off-by: Automerger Merge Worker <[email protected]>
diff --git a/apex/com.google.cf.rild/Android.bp b/apex/com.google.cf.rild/Android.bp
index 5a256bd..44bbeae 100644
--- a/apex/com.google.cf.rild/Android.bp
+++ b/apex/com.google.cf.rild/Android.bp
@@ -45,8 +45,10 @@
"libcuttlefish-ril-2",
],
prebuilts: [
+ "android.hardware.telephony.carrierlock.prebuilt.xml",
"android.hardware.telephony.gsm.prebuilt.xml",
"android.hardware.telephony.ims.prebuilt.xml",
+ "android.hardware.telephony.ims.singlereg.prebuilt.xml",
"com.google.cf.rild.rc",
"com.google.cf.rild.xml",
],
diff --git a/guest/hals/ril/reference-libril/Android.bp b/guest/hals/ril/reference-libril/Android.bp
index 09acbd4..e73d563 100644
--- a/guest/hals/ril/reference-libril/Android.bp
+++ b/guest/hals/ril/reference-libril/Android.bp
@@ -30,6 +30,7 @@
"RefImsMedia.cpp",
"RefImsMediaSession.cpp",
"RefRadioNetwork.cpp",
+ "RefRadioConfig.cpp",
"ril.cpp",
"RilSapSocket.cpp",
"ril_config.cpp",
diff --git a/guest/hals/ril/reference-libril/RefRadioConfig.cpp b/guest/hals/ril/reference-libril/RefRadioConfig.cpp
new file mode 100644
index 0000000..ecc62a1
--- /dev/null
+++ b/guest/hals/ril/reference-libril/RefRadioConfig.cpp
@@ -0,0 +1,40 @@
+/*
+ * Copyright (C) 2023 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.
+ */
+
+#include "RefRadioConfig.h"
+#include "ril_service.h"
+
+using ::android::hardware::hidl_string;
+
+namespace cf::ril {
+
+using ::ndk::ScopedAStatus;
+using namespace ::aidl::android::hardware::radio;
+constexpr auto ok = &ScopedAStatus::ok;
+
+static RadioResponseInfo responseInfo(int32_t serial, RadioError error = RadioError::NONE) {
+ return {
+ .type = RadioResponseType::SOLICITED,
+ .serial = serial,
+ .error = error,
+ };
+}
+
+ScopedAStatus RefRadioConfig::getSimultaneousCallingSupport(int32_t serial) {
+ respond()->getSimultaneousCallingSupportResponse(responseInfo(serial), {});
+ return ok();
+}
+} // namespace cf::ril
diff --git a/guest/hals/ril/reference-libril/RefRadioConfig.h b/guest/hals/ril/reference-libril/RefRadioConfig.h
new file mode 100644
index 0000000..fe2973d
--- /dev/null
+++ b/guest/hals/ril/reference-libril/RefRadioConfig.h
@@ -0,0 +1,29 @@
+/*
+ * Copyright (C) 2023 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.
+ */
+
+#pragma once
+
+#include <libradiocompat/RadioConfig.h>
+
+namespace cf::ril {
+
+class RefRadioConfig : public android::hardware::radio::compat::RadioConfig {
+ public:
+ using android::hardware::radio::compat::RadioConfig::RadioConfig;
+
+ ::ndk::ScopedAStatus getSimultaneousCallingSupport(int32_t serial) override;
+};
+} // namespace cf::ril
diff --git a/guest/hals/ril/reference-libril/RefRadioModem.cpp b/guest/hals/ril/reference-libril/RefRadioModem.cpp
index 867c8f0..4dfffa4 100644
--- a/guest/hals/ril/reference-libril/RefRadioModem.cpp
+++ b/guest/hals/ril/reference-libril/RefRadioModem.cpp
@@ -33,20 +33,12 @@
};
}
- hidl_string convertCharPtrToHidlString(const char *ptr) {
- hidl_string ret;
- if (ptr != NULL) {
- ret.setToExternal(ptr, strlen(ptr));
- }
- return ret;
- }
-
ScopedAStatus RefRadioModem::getImei(int32_t serial) {
::aidl::android::hardware::radio::modem::ImeiInfo imeiInfo = {};
imeiInfo.type = (::aidl::android::hardware::radio::modem::ImeiInfo::ImeiType) 1;
- imeiInfo.imei = convertCharPtrToHidlString("867400022047199");
- imeiInfo.svn = convertCharPtrToHidlString("01");
+ imeiInfo.imei = "867400022047199";
+ imeiInfo.svn = "01";
respond()->getImeiResponse(responseInfo(serial), imeiInfo);
return ok();
}
-}
\ No newline at end of file
+}
diff --git a/guest/hals/ril/reference-libril/RefRadioNetwork.cpp b/guest/hals/ril/reference-libril/RefRadioNetwork.cpp
index 941cd24..5507ee0 100644
--- a/guest/hals/ril/reference-libril/RefRadioNetwork.cpp
+++ b/guest/hals/ril/reference-libril/RefRadioNetwork.cpp
@@ -50,6 +50,9 @@
ScopedAStatus RefRadioNetwork::setEmergencyMode(int32_t serial,
network::EmergencyMode emergencyMode) {
network::EmergencyRegResult regState;
+ regState.accessNetwork = AccessNetwork::EUTRAN;
+ regState.regState = network::RegState::REG_HOME;
+ regState.emcDomain = network::Domain(3); // CS_PS
respond()->setEmergencyModeResponse(responseInfo(serial), regState);
return ok();
}
diff --git a/guest/hals/ril/reference-libril/ril.h b/guest/hals/ril/reference-libril/ril.h
index 6f33ae7..8a00799 100644
--- a/guest/hals/ril/reference-libril/ril.h
+++ b/guest/hals/ril/reference-libril/ril.h
@@ -8345,7 +8345,11 @@
#define RIL_UNSOL_PHYSICAL_CHANNEL_CONFIGS 1051
-#define RIL_UNSOL_RESPONSE_LAST RIL_UNSOL_PHYSICAL_CHANNEL_CONFIGS
+#define RIL_UNSOL_CELLULAR_IDENTIFIER_DISCLOSED 1056
+
+#define RIL_UNSOL_SECURITY_ALGORITHM_UPDATED 1057
+
+#define RIL_UNSOL_RESPONSE_LAST RIL_UNSOL_SECURITY_ALGORITHM_UPDATED
/***********************************************************************/
@@ -8355,7 +8359,7 @@
*
* "data" is the RIL_SimSlotStatus_V1_2 structure
*/
-#define RIL_UNSOL_CONFIG_ICC_SLOT_STATUS 1052
+#define RIL_UNSOL_CONFIG_ICC_SLOT_STATUS 1100
#define RIL_UNSOL_RESPONSE_RADIO_CONFIG_LAST RIL_UNSOL_CONFIG_ICC_SLOT_STATUS
@@ -8548,6 +8552,26 @@
RIL_KeepaliveStatusCode code;
} RIL_KeepaliveStatus;
+/**
+ * A C-representation of aidl::android::hardware::radio::network::CellularIdentifierDisclosure
+ */
+typedef struct {
+ int32_t identifierType;
+ int32_t protocolMessage;
+ char* plmn;
+ bool isEmergency;
+} RIL_CellularIdentifierDisclosure;
+
+/**
+ * A C-representation of aidl::android::hardware::radio::network::SecurityAlgorithmUpdate
+ */
+typedef struct {
+ int32_t connectionEvent;
+ int32_t encryption;
+ int32_t integrity;
+ bool isUnprotectedEmergency;
+} RIL_SecurityAlgorithmUpdate;
+
#ifdef RIL_SHLIB
struct RIL_Env {
/**
diff --git a/guest/hals/ril/reference-libril/ril_config.cpp b/guest/hals/ril/reference-libril/ril_config.cpp
index 706026d..eef1068 100644
--- a/guest/hals/ril/reference-libril/ril_config.cpp
+++ b/guest/hals/ril/reference-libril/ril_config.cpp
@@ -17,6 +17,8 @@
#define LOG_TAG "RILC"
+#include "RefRadioConfig.h"
+
#include <android-base/logging.h>
#include <android/binder_manager.h>
#include <android/binder_process.h>
@@ -286,7 +288,7 @@
// use a compat shim to convert HIDL interface to AIDL and publish it
// TODO(bug 220004469): replace with a full AIDL implementation
- static auto aidlHal = ndk::SharedRefBase::make<compat::RadioConfig>(radioConfigService);
+ static auto aidlHal = ndk::SharedRefBase::make<cf::ril::RefRadioConfig>(radioConfigService);
const auto instance = compat::RadioConfig::descriptor + "/"s + std::string(serviceNames);
const auto status = AServiceManager_addService(aidlHal->asBinder().get(), instance.c_str());
RLOGD("registerConfigService addService: status %d", status);
diff --git a/guest/hals/ril/reference-libril/ril_service.cpp b/guest/hals/ril/reference-libril/ril_service.cpp
index 6d5a51c..8d9d9d3 100644
--- a/guest/hals/ril/reference-libril/ril_service.cpp
+++ b/guest/hals/ril/reference-libril/ril_service.cpp
@@ -73,6 +73,8 @@
android::hardware::radio::V1_4::PhysicalChannelConfig;
using RadioTechnologyV1_4 = android::hardware::radio::V1_4::RadioTechnology;
+namespace aidl_radio = ::aidl::android::hardware::radio;
+
#define BOOL_TO_INT(x) (x ? 1 : 0)
#define ATOI_NULL_HANDLED(x) (x ? atoi(x) : -1)
#define ATOI_NULL_HANDLED_DEF(x, defaultVal) (x ? atoi(x) : defaultVal)
@@ -202,6 +204,7 @@
sp<V1_5::IRadioIndication> mRadioIndicationV1_5;
sp<V1_6::IRadioResponse> mRadioResponseV1_6;
sp<V1_6::IRadioIndication> mRadioIndicationV1_6;
+ std::shared_ptr<compat::CallbackManager> mCallbackManager;
Return<void> setResponseFunctions(
const ::android::sp<IRadioResponse>& radioResponse,
@@ -10659,6 +10662,63 @@
return 0;
}
+int radio_aidl::cellularIdentifierDisclosedInd(int slotId, int indicationType, int token,
+ RIL_Errno e, void* response, size_t responselen) {
+ if (radioService[slotId] == NULL || radioService[slotId]->mCallbackManager == NULL) {
+ RLOGE("cellularIdentifierDisclosedInd: radioService[%d]->mCallbackManager == NULL", slotId);
+ return 0;
+ }
+ auto networkCb = radioService[slotId]->mCallbackManager->indication().networkCb();
+
+ if (!networkCb) {
+ RLOGE("networkCB is null");
+ return 0;
+ }
+
+ RIL_CellularIdentifierDisclosure* rawDisclosure =
+ static_cast<RIL_CellularIdentifierDisclosure*>(response);
+
+ aidl_radio::network::CellularIdentifierDisclosure disclosure;
+ disclosure.identifier =
+ static_cast<aidl_radio::network::CellularIdentifier>(rawDisclosure->identifierType);
+ disclosure.protocolMessage =
+ static_cast<aidl_radio::network::NasProtocolMessage>(rawDisclosure->protocolMessage);
+ disclosure.plmn = rawDisclosure->plmn;
+ disclosure.isEmergency = rawDisclosure->isEmergency;
+
+ networkCb->cellularIdentifierDisclosed(aidl_radio::RadioIndicationType(indicationType),
+ disclosure);
+
+ return 0;
+}
+
+int radio_aidl::securityAlgorithmUpdatedInd(int slotId, int indicationType, int token, RIL_Errno e,
+ void* response, size_t responselen) {
+ if (radioService[slotId] == NULL || radioService[slotId]->mCallbackManager == NULL) {
+ RLOGE("securityAlgorithmUpdatedInd: radioService[%d]->mCallbackManager == NULL", slotId);
+ return 0;
+ }
+ auto networkCb = radioService[slotId]->mCallbackManager->indication().networkCb();
+
+ if (!networkCb) {
+ RLOGE("networkCB is null");
+ return 0;
+ }
+
+ RIL_SecurityAlgorithmUpdate* rawUpdate = static_cast<RIL_SecurityAlgorithmUpdate*>(response);
+
+ aidl_radio::network::SecurityAlgorithmUpdate update;
+ update.connectionEvent =
+ static_cast<aidl_radio::network::ConnectionEvent>(rawUpdate->connectionEvent);
+ update.encryption = static_cast<aidl_radio::network::SecurityAlgorithm>(rawUpdate->encryption);
+ update.integrity = static_cast<aidl_radio::network::SecurityAlgorithm>(rawUpdate->integrity);
+ update.isUnprotectedEmergency = rawUpdate->isUnprotectedEmergency;
+
+ networkCb->securityAlgorithmsUpdated(aidl_radio::RadioIndicationType(indicationType), update);
+
+ return 0;
+}
+
extern "C" uint8_t hexCharToInt(uint8_t c) {
if (c >= '0' && c <= '9') return (c - '0');
if (c >= 'A' && c <= 'F') return (c - 'A' + 10);
@@ -13439,6 +13499,7 @@
const auto slot = serviceNames[i];
auto context = std::make_shared<compat::DriverContext>();
auto callbackMgr = std::make_shared<compat::CallbackManager>(context, radioHidl);
+ radioService[i]->mCallbackManager = callbackMgr;
publishRadioHal<compat::RadioData>(context, radioHidl, callbackMgr, slot);
publishRadioHal<compat::RadioMessaging>(context, radioHidl, callbackMgr, slot);
publishRadioHal<compat::RadioModem>(context, radioHidl, callbackMgr, slot);
diff --git a/guest/hals/ril/reference-libril/ril_service.h b/guest/hals/ril/reference-libril/ril_service.h
index 6821f2c..db767e4 100644
--- a/guest/hals/ril/reference-libril/ril_service.h
+++ b/guest/hals/ril/reference-libril/ril_service.h
@@ -867,6 +867,19 @@
int simSlotsStatusChanged(int slotId, int indicationType, int token,
RIL_Errno e, void *response, size_t responseLen);
-} // namespace radio
+} // namespace radio_1_6
+
+/******************************************************************************/
+/* AIDL-only Radio Indication unsolicited interfaces' handling functions. */
+/******************************************************************************/
+namespace radio_aidl {
+/* These are not defined in HIDL HALs through version 1.6 but we use the same RIL infrastructure to
+ * coordinate holding a wake lock and invoking these methods. */
+int cellularIdentifierDisclosedInd(int slotId, int indicationType, int token, RIL_Errno e,
+ void* response, size_t responselen);
+
+int securityAlgorithmUpdatedInd(int slotId, int indicationType, int token, RIL_Errno e,
+ void* response, size_t responselen);
+} // namespace radio_aidl
#endif // RIL_SERVICE_H
diff --git a/guest/hals/ril/reference-libril/ril_unsol_commands.h b/guest/hals/ril/reference-libril/ril_unsol_commands.h
index 62dd40c..67e7169 100644
--- a/guest/hals/ril/reference-libril/ril_unsol_commands.h
+++ b/guest/hals/ril/reference-libril/ril_unsol_commands.h
@@ -14,55 +14,75 @@
** See the License for the specific language governing permissions and
** limitations under the License.
*/
- {RIL_UNSOL_RESPONSE_RADIO_STATE_CHANGED, radio_1_6::radioStateChangedInd, WAKE_PARTIAL},
- {RIL_UNSOL_RESPONSE_CALL_STATE_CHANGED, radio_1_6::callStateChangedInd, WAKE_PARTIAL},
- {RIL_UNSOL_RESPONSE_VOICE_NETWORK_STATE_CHANGED, radio_1_6::networkStateChangedInd, WAKE_PARTIAL},
- {RIL_UNSOL_RESPONSE_NEW_SMS, radio_1_6::newSmsInd, WAKE_PARTIAL},
- {RIL_UNSOL_RESPONSE_NEW_SMS_STATUS_REPORT, radio_1_6::newSmsStatusReportInd, WAKE_PARTIAL},
- {RIL_UNSOL_RESPONSE_NEW_SMS_ON_SIM, radio_1_6::newSmsOnSimInd, WAKE_PARTIAL},
- {RIL_UNSOL_ON_USSD, radio_1_6::onUssdInd, WAKE_PARTIAL},
- {RIL_UNSOL_ON_USSD_REQUEST, radio_1_6::onUssdInd, DONT_WAKE},
- {RIL_UNSOL_NITZ_TIME_RECEIVED, radio_1_6::nitzTimeReceivedInd, WAKE_PARTIAL},
- {RIL_UNSOL_SIGNAL_STRENGTH, radio_1_6::currentSignalStrengthInd, DONT_WAKE},
- {RIL_UNSOL_DATA_CALL_LIST_CHANGED, radio_1_6::dataCallListChangedInd, WAKE_PARTIAL},
- {RIL_UNSOL_SUPP_SVC_NOTIFICATION, radio_1_6::suppSvcNotifyInd, WAKE_PARTIAL},
- {RIL_UNSOL_STK_SESSION_END, radio_1_6::stkSessionEndInd, WAKE_PARTIAL},
- {RIL_UNSOL_STK_PROACTIVE_COMMAND, radio_1_6::stkProactiveCommandInd, WAKE_PARTIAL},
- {RIL_UNSOL_STK_EVENT_NOTIFY, radio_1_6::stkEventNotifyInd, WAKE_PARTIAL},
- {RIL_UNSOL_STK_CALL_SETUP, radio_1_6::stkCallSetupInd, WAKE_PARTIAL},
- {RIL_UNSOL_SIM_SMS_STORAGE_FULL, radio_1_6::simSmsStorageFullInd, WAKE_PARTIAL},
- {RIL_UNSOL_SIM_REFRESH, radio_1_6::simRefreshInd, WAKE_PARTIAL},
- {RIL_UNSOL_CALL_RING, radio_1_6::callRingInd, WAKE_PARTIAL},
- {RIL_UNSOL_RESPONSE_SIM_STATUS_CHANGED, radio_1_6::simStatusChangedInd, WAKE_PARTIAL},
- {RIL_UNSOL_RESPONSE_CDMA_NEW_SMS, radio_1_6::cdmaNewSmsInd, WAKE_PARTIAL},
- {RIL_UNSOL_RESPONSE_NEW_BROADCAST_SMS, radio_1_6::newBroadcastSmsInd, WAKE_PARTIAL},
- {RIL_UNSOL_CDMA_RUIM_SMS_STORAGE_FULL, radio_1_6::cdmaRuimSmsStorageFullInd, WAKE_PARTIAL},
- {RIL_UNSOL_RESTRICTED_STATE_CHANGED, radio_1_6::restrictedStateChangedInd, WAKE_PARTIAL},
- {RIL_UNSOL_ENTER_EMERGENCY_CALLBACK_MODE, radio_1_6::enterEmergencyCallbackModeInd, WAKE_PARTIAL},
- {RIL_UNSOL_CDMA_CALL_WAITING, radio_1_6::cdmaCallWaitingInd, WAKE_PARTIAL},
- {RIL_UNSOL_CDMA_OTA_PROVISION_STATUS, radio_1_6::cdmaOtaProvisionStatusInd, WAKE_PARTIAL},
- {RIL_UNSOL_CDMA_INFO_REC, radio_1_6::cdmaInfoRecInd, WAKE_PARTIAL},
- {RIL_UNSOL_OEM_HOOK_RAW, radio_1_6::oemHookRawInd, WAKE_PARTIAL},
- {RIL_UNSOL_RINGBACK_TONE, radio_1_6::indicateRingbackToneInd, WAKE_PARTIAL},
- {RIL_UNSOL_RESEND_INCALL_MUTE, radio_1_6::resendIncallMuteInd, WAKE_PARTIAL},
- {RIL_UNSOL_CDMA_SUBSCRIPTION_SOURCE_CHANGED, radio_1_6::cdmaSubscriptionSourceChangedInd, WAKE_PARTIAL},
- {RIL_UNSOL_CDMA_PRL_CHANGED, radio_1_6::cdmaPrlChangedInd, WAKE_PARTIAL},
- {RIL_UNSOL_EXIT_EMERGENCY_CALLBACK_MODE, radio_1_6::exitEmergencyCallbackModeInd, WAKE_PARTIAL},
- {RIL_UNSOL_RIL_CONNECTED, radio_1_6::rilConnectedInd, WAKE_PARTIAL},
- {RIL_UNSOL_VOICE_RADIO_TECH_CHANGED, radio_1_6::voiceRadioTechChangedInd, WAKE_PARTIAL},
- {RIL_UNSOL_CELL_INFO_LIST, radio_1_6::cellInfoListInd, WAKE_PARTIAL},
- {RIL_UNSOL_RESPONSE_IMS_NETWORK_STATE_CHANGED, radio_1_6::imsNetworkStateChangedInd, WAKE_PARTIAL},
- {RIL_UNSOL_UICC_SUBSCRIPTION_STATUS_CHANGED, radio_1_6::subscriptionStatusChangedInd, WAKE_PARTIAL},
- {RIL_UNSOL_SRVCC_STATE_NOTIFY, radio_1_6::srvccStateNotifyInd, WAKE_PARTIAL},
- {RIL_UNSOL_HARDWARE_CONFIG_CHANGED, radio_1_6::hardwareConfigChangedInd, WAKE_PARTIAL},
- {RIL_UNSOL_DC_RT_INFO_CHANGED, NULL, WAKE_PARTIAL},
- {RIL_UNSOL_RADIO_CAPABILITY, radio_1_6::radioCapabilityIndicationInd, WAKE_PARTIAL},
- {RIL_UNSOL_ON_SS, radio_1_6::onSupplementaryServiceIndicationInd, WAKE_PARTIAL},
- {RIL_UNSOL_STK_CC_ALPHA_NOTIFY, radio_1_6::stkCallControlAlphaNotifyInd, WAKE_PARTIAL},
- {RIL_UNSOL_LCEDATA_RECV, radio_1_6::lceDataInd, WAKE_PARTIAL},
- {RIL_UNSOL_PCO_DATA, radio_1_6::pcoDataInd, WAKE_PARTIAL},
- {RIL_UNSOL_MODEM_RESTART, radio_1_6::modemResetInd, WAKE_PARTIAL},
- {RIL_UNSOL_CARRIER_INFO_IMSI_ENCRYPTION, radio_1_6::carrierInfoForImsiEncryption, WAKE_PARTIAL},
- {RIL_UNSOL_NETWORK_SCAN_RESULT, radio_1_6::networkScanResultInd, WAKE_PARTIAL},
- {RIL_UNSOL_KEEPALIVE_STATUS, radio_1_6::keepaliveStatusInd, WAKE_PARTIAL},
- {RIL_UNSOL_PHYSICAL_CHANNEL_CONFIGS, radio_1_6::reportPhysicalChannelConfigs, WAKE_PARTIAL},
+{RIL_UNSOL_RESPONSE_RADIO_STATE_CHANGED, radio_1_6::radioStateChangedInd, WAKE_PARTIAL},
+ {RIL_UNSOL_RESPONSE_CALL_STATE_CHANGED, radio_1_6::callStateChangedInd, WAKE_PARTIAL},
+ {RIL_UNSOL_RESPONSE_VOICE_NETWORK_STATE_CHANGED, radio_1_6::networkStateChangedInd,
+ WAKE_PARTIAL},
+ {RIL_UNSOL_RESPONSE_NEW_SMS, radio_1_6::newSmsInd, WAKE_PARTIAL},
+ {RIL_UNSOL_RESPONSE_NEW_SMS_STATUS_REPORT, radio_1_6::newSmsStatusReportInd, WAKE_PARTIAL},
+ {RIL_UNSOL_RESPONSE_NEW_SMS_ON_SIM, radio_1_6::newSmsOnSimInd, WAKE_PARTIAL},
+ {RIL_UNSOL_ON_USSD, radio_1_6::onUssdInd, WAKE_PARTIAL},
+ {RIL_UNSOL_ON_USSD_REQUEST, radio_1_6::onUssdInd, DONT_WAKE},
+ {RIL_UNSOL_NITZ_TIME_RECEIVED, radio_1_6::nitzTimeReceivedInd, WAKE_PARTIAL},
+ {RIL_UNSOL_SIGNAL_STRENGTH, radio_1_6::currentSignalStrengthInd, DONT_WAKE},
+ {RIL_UNSOL_DATA_CALL_LIST_CHANGED, radio_1_6::dataCallListChangedInd, WAKE_PARTIAL},
+ {RIL_UNSOL_SUPP_SVC_NOTIFICATION, radio_1_6::suppSvcNotifyInd, WAKE_PARTIAL},
+ {RIL_UNSOL_STK_SESSION_END, radio_1_6::stkSessionEndInd, WAKE_PARTIAL},
+ {RIL_UNSOL_STK_PROACTIVE_COMMAND, radio_1_6::stkProactiveCommandInd, WAKE_PARTIAL},
+ {RIL_UNSOL_STK_EVENT_NOTIFY, radio_1_6::stkEventNotifyInd, WAKE_PARTIAL},
+ {RIL_UNSOL_STK_CALL_SETUP, radio_1_6::stkCallSetupInd, WAKE_PARTIAL},
+ {RIL_UNSOL_SIM_SMS_STORAGE_FULL, radio_1_6::simSmsStorageFullInd, WAKE_PARTIAL},
+ {RIL_UNSOL_SIM_REFRESH, radio_1_6::simRefreshInd, WAKE_PARTIAL},
+ {RIL_UNSOL_CALL_RING, radio_1_6::callRingInd, WAKE_PARTIAL},
+ {RIL_UNSOL_RESPONSE_SIM_STATUS_CHANGED, radio_1_6::simStatusChangedInd, WAKE_PARTIAL},
+ {RIL_UNSOL_RESPONSE_CDMA_NEW_SMS, radio_1_6::cdmaNewSmsInd, WAKE_PARTIAL},
+ {RIL_UNSOL_RESPONSE_NEW_BROADCAST_SMS, radio_1_6::newBroadcastSmsInd, WAKE_PARTIAL},
+ {RIL_UNSOL_CDMA_RUIM_SMS_STORAGE_FULL, radio_1_6::cdmaRuimSmsStorageFullInd, WAKE_PARTIAL},
+ {RIL_UNSOL_RESTRICTED_STATE_CHANGED, radio_1_6::restrictedStateChangedInd, WAKE_PARTIAL},
+ {RIL_UNSOL_ENTER_EMERGENCY_CALLBACK_MODE, radio_1_6::enterEmergencyCallbackModeInd,
+ WAKE_PARTIAL},
+ {RIL_UNSOL_CDMA_CALL_WAITING, radio_1_6::cdmaCallWaitingInd, WAKE_PARTIAL},
+ {RIL_UNSOL_CDMA_OTA_PROVISION_STATUS, radio_1_6::cdmaOtaProvisionStatusInd, WAKE_PARTIAL},
+ {RIL_UNSOL_CDMA_INFO_REC, radio_1_6::cdmaInfoRecInd, WAKE_PARTIAL},
+ {RIL_UNSOL_OEM_HOOK_RAW, radio_1_6::oemHookRawInd, WAKE_PARTIAL},
+ {RIL_UNSOL_RINGBACK_TONE, radio_1_6::indicateRingbackToneInd, WAKE_PARTIAL},
+ {RIL_UNSOL_RESEND_INCALL_MUTE, radio_1_6::resendIncallMuteInd, WAKE_PARTIAL},
+ {RIL_UNSOL_CDMA_SUBSCRIPTION_SOURCE_CHANGED, radio_1_6::cdmaSubscriptionSourceChangedInd,
+ WAKE_PARTIAL},
+ {RIL_UNSOL_CDMA_PRL_CHANGED, radio_1_6::cdmaPrlChangedInd, WAKE_PARTIAL},
+ {RIL_UNSOL_EXIT_EMERGENCY_CALLBACK_MODE, radio_1_6::exitEmergencyCallbackModeInd,
+ WAKE_PARTIAL},
+ {RIL_UNSOL_RIL_CONNECTED, radio_1_6::rilConnectedInd, WAKE_PARTIAL},
+ {RIL_UNSOL_VOICE_RADIO_TECH_CHANGED, radio_1_6::voiceRadioTechChangedInd, WAKE_PARTIAL},
+ {RIL_UNSOL_CELL_INFO_LIST, radio_1_6::cellInfoListInd, WAKE_PARTIAL},
+ {RIL_UNSOL_RESPONSE_IMS_NETWORK_STATE_CHANGED, radio_1_6::imsNetworkStateChangedInd,
+ WAKE_PARTIAL},
+ {RIL_UNSOL_UICC_SUBSCRIPTION_STATUS_CHANGED, radio_1_6::subscriptionStatusChangedInd,
+ WAKE_PARTIAL},
+ {RIL_UNSOL_SRVCC_STATE_NOTIFY, radio_1_6::srvccStateNotifyInd, WAKE_PARTIAL},
+ {RIL_UNSOL_HARDWARE_CONFIG_CHANGED, radio_1_6::hardwareConfigChangedInd, WAKE_PARTIAL},
+ {RIL_UNSOL_DC_RT_INFO_CHANGED, NULL, WAKE_PARTIAL},
+ {RIL_UNSOL_RADIO_CAPABILITY, radio_1_6::radioCapabilityIndicationInd, WAKE_PARTIAL},
+ {RIL_UNSOL_ON_SS, radio_1_6::onSupplementaryServiceIndicationInd, WAKE_PARTIAL},
+ {RIL_UNSOL_STK_CC_ALPHA_NOTIFY, radio_1_6::stkCallControlAlphaNotifyInd, WAKE_PARTIAL},
+ {RIL_UNSOL_LCEDATA_RECV, radio_1_6::lceDataInd, WAKE_PARTIAL},
+ {RIL_UNSOL_PCO_DATA, radio_1_6::pcoDataInd, WAKE_PARTIAL},
+ {RIL_UNSOL_MODEM_RESTART, radio_1_6::modemResetInd, WAKE_PARTIAL},
+ {RIL_UNSOL_CARRIER_INFO_IMSI_ENCRYPTION, radio_1_6::carrierInfoForImsiEncryption,
+ WAKE_PARTIAL},
+ {RIL_UNSOL_NETWORK_SCAN_RESULT, radio_1_6::networkScanResultInd, WAKE_PARTIAL},
+ {RIL_UNSOL_KEEPALIVE_STATUS, radio_1_6::keepaliveStatusInd, WAKE_PARTIAL},
+ {RIL_UNSOL_PHYSICAL_CHANNEL_CONFIGS, radio_1_6::reportPhysicalChannelConfigs, WAKE_PARTIAL},
+ /**
+ * These are needed as placeholders because this array is intended to be indexable by the
+ * response number - 1000.
+ *
+ * Over time, RIL and framework values have diverged, but we try to keep them in sync when
+ * possible.
+ */
+ {1052, NULL, DONT_WAKE}, {1053, NULL, DONT_WAKE}, {1054, NULL, DONT_WAKE},
+ {1055, NULL, DONT_WAKE},
+ {RIL_UNSOL_CELLULAR_IDENTIFIER_DISCLOSED, radio_aidl::cellularIdentifierDisclosedInd,
+ WAKE_PARTIAL},
+ {RIL_UNSOL_SECURITY_ALGORITHM_UPDATED, radio_aidl::securityAlgorithmUpdatedInd,
+ WAKE_PARTIAL},
diff --git a/guest/hals/ril/reference-ril/reference-ril.c b/guest/hals/ril/reference-ril/reference-ril.c
index 9b6d52f..3c1f82e 100644
--- a/guest/hals/ril/reference-ril/reference-ril.c
+++ b/guest/hals/ril/reference-ril/reference-ril.c
@@ -6211,6 +6211,77 @@
}
free(line);
+ } else if (strStartsWith(s, "+REMOTEIDDISCLOSURE")) {
+ RLOGD("starting REMOTEIDDISCLOSURE %s", s);
+ line = p = strdup(s);
+ if (!line) {
+ RLOGE("+REMOTEIDDISCLOSURE unable to allocate memory");
+ return;
+ }
+ if (at_tok_start(&p) < 0) {
+ RLOGE("invalid +REMOTEIDDISCLOSURE command: %s", s);
+ free(line);
+ return;
+ }
+
+ RIL_CellularIdentifierDisclosure disclosure;
+
+ if (at_tok_nextstr(&p, &disclosure.plmn) < 0) {
+ RLOGE("+REMOTEIDDISCLOSURE unable to parse plmn %s", s);
+ return;
+ }
+ if (at_tok_nextint(&p, &disclosure.identifierType) < 0) {
+ RLOGE("+REMOTEIDDISCLOSURE unable to parse identifier %s", s);
+ return;
+ }
+ if (at_tok_nextint(&p, &disclosure.protocolMessage) < 0) {
+ RLOGE("+REMOTEIDDISCLOSURE unable to parse protocol message %s", s);
+ return;
+ }
+ if (at_tok_nextbool(&p, (char*)&disclosure.isEmergency) < 0) {
+ RLOGE("+REMOTEIDDISCLOSURE unable to parse isEmergency %s", s);
+ return;
+ }
+
+ RIL_onUnsolicitedResponse(RIL_UNSOL_CELLULAR_IDENTIFIER_DISCLOSED, (void*)&disclosure,
+ sizeof(disclosure));
+ free(line);
+ } else if (strStartsWith(s, "+UPDATESECURITYALGORITHM")) {
+ RLOGD("starting UPDATESECURITYALGORITHM %s", s);
+ line = p = strdup(s);
+ if (!line) {
+ RLOGE("+UPDATESECURITYALGORITHM unable to allocate memory");
+ return;
+ }
+ if (at_tok_start(&p) < 0) {
+ RLOGE("invalid +UPDATESECURITYALGORITHM command: %s", s);
+ free(line);
+ return;
+ }
+
+ RIL_SecurityAlgorithmUpdate update;
+
+ if (at_tok_nextint(&p, &update.connectionEvent) < 0) {
+ RLOGE("+UPDATESECURITYALGORITHM unable to parse connection event %s", s);
+ return;
+ }
+ if (at_tok_nextint(&p, &update.encryption) < 0) {
+ RLOGE("+UPDATESECURITYALGORITHM unable to parse encryption %s", s);
+ return;
+ }
+ if (at_tok_nextint(&p, &update.integrity) < 0) {
+ RLOGE("+UPDATESECURITYALGORITHM unable to parse integrity %s", s);
+ return;
+ }
+ if (at_tok_nextbool(&p, (char*)&update.isUnprotectedEmergency) < 0) {
+ RLOGE("+UPDATESECURITYALGORITHM unable to parse isUnprotectedEmergency %s", s);
+ return;
+ }
+
+ RIL_onUnsolicitedResponse(RIL_UNSOL_SECURITY_ALGORITHM_UPDATED, &update, sizeof(update));
+ free(line);
+ } else {
+ RLOGE("Unexpected unsolicited request: %s", s);
}
}
diff --git a/shared/biometrics_fingerprint/device_vendor.mk b/shared/biometrics_fingerprint/device_vendor.mk
index 24bef1e..b095355 100644
--- a/shared/biometrics_fingerprint/device_vendor.mk
+++ b/shared/biometrics_fingerprint/device_vendor.mk
@@ -14,10 +14,8 @@
# limitations under the License.
#
-ifneq ($(LOCAL_PREFER_VENDOR_APEX),true)
PRODUCT_COPY_FILES += \
frameworks/native/data/etc/android.hardware.fingerprint.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.fingerprint.xml
-endif
PRODUCT_PACKAGES += \
com.android.hardware.biometrics.fingerprint.virtual
diff --git a/shared/camera/device_vendor.mk b/shared/camera/device_vendor.mk
index 599c32f..3e9c4f2 100644
--- a/shared/camera/device_vendor.mk
+++ b/shared/camera/device_vendor.mk
@@ -20,14 +20,8 @@
androidx.camera.extensions.impl.advanced advancedSample_camera_extensions.xml \
libencoderjpeg_jni
-PRODUCT_ARTIFACT_PATH_REQUIREMENT_ALLOWED_LIST += \
- system/app/EyesFreeVidService/EyesFreeVidService.apk
-
PRODUCT_PACKAGES += EyesFreeVidService
-PRODUCT_VENDOR_PROPERTIES += \
- ro.vendor.camera.extensions.package=android.camera.extensions.impl.service \
- ro.vendor.camera.extensions.service=android.camera.extensions.impl.service.EyesFreeVidService
else
PRODUCT_PACKAGES += androidx.camera.extensions.impl sample_camera_extensions.xml
endif
diff --git a/shared/consumerir/device_vendor.mk b/shared/consumerir/device_vendor.mk
index 7dc9373..0ece81d 100644
--- a/shared/consumerir/device_vendor.mk
+++ b/shared/consumerir/device_vendor.mk
@@ -13,13 +13,5 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
-
-# TODO(b/302088370) remove the condition when libapexsupport is available
-ifeq ($(RELEASE_AIDL_USE_UNFROZEN),true)
PRODUCT_PACKAGES += \
com.google.cf.ir
-else
-PRODUCT_PACKAGES += \
- android.hardware.ir-service.example \
- consumerir.default
-endif # RELEASE_AIDL_USE_UNFROZEN
diff --git a/shared/device.mk b/shared/device.mk
index 404a0a2..2993cb0 100644
--- a/shared/device.mk
+++ b/shared/device.mk
@@ -278,20 +278,11 @@
#
# Still use HIDL Audio HAL on 'next'
#
-ifeq ($(RELEASE_AIDL_USE_UNFROZEN),true)
LOCAL_AUDIO_PRODUCT_PACKAGE += \
android.hardware.audio.parameter_parser.example_service \
com.android.hardware.audio
PRODUCT_SYSTEM_EXT_PROPERTIES += \
ro.audio.ihaladaptervendorextension_enabled=true
-else
-LOCAL_AUDIO_PRODUCT_PACKAGE += \
- android.hardware.audio.service \
- [email protected] \
- [email protected]
-DEVICE_MANIFEST_FILE += \
- device/google/cuttlefish/guest/hals/audio/effects/manifest.xml
-endif
endif
ifndef LOCAL_AUDIO_PRODUCT_COPY_FILES
@@ -423,18 +414,14 @@
#
# Non-secure implementation of AuthGraph HAL for compliance.
#
-ifeq ($(RELEASE_AIDL_USE_UNFROZEN),true)
PRODUCT_PACKAGES += \
com.android.hardware.security.authgraph
-endif
#
# Non-secure implementation of Secretkeeper HAL for compliance.
#
-ifeq ($(RELEASE_AIDL_USE_UNFROZEN),true)
PRODUCT_PACKAGES += \
com.android.hardware.security.secretkeeper
-endif
#
# Power and PowerStats HALs
@@ -572,6 +559,11 @@
PRODUCT_VENDOR_PROPERTIES += \
ro.surface_flinger.supports_background_blur=1
+# Set Game Default Frame Rate
+# See b/286084594
+PRODUCT_DEFAULT_PROPERTY_OVERRIDES += \
+ ro.surface_flinger.game_default_frame_rate_override=60
+
# Disable GPU-intensive background blur for widget picker
PRODUCT_SYSTEM_PROPERTIES += \
ro.launcher.depth.widget=0
@@ -590,13 +582,9 @@
PRODUCT_COPY_FILES += \
device/google/cuttlefish/shared/config/pci.ids:$(TARGET_COPY_OUT_VENDOR)/pci.ids
-# New in-development HAL services using unfrozen interfaces. Do not include if
-# RELEASE_AIDL_USE_UNFROZEN is true (in the 'next' release configuration).
-ifeq ($(RELEASE_AIDL_USE_UNFROZEN),true)
# Thread Network AIDL HAL, simulation CLI and OT daemon controller
PRODUCT_PACKAGES += \
com.android.hardware.threadnetwork
-endif # RELEASE_AIDL_USE_UNFROZEN
PRODUCT_CHECK_VENDOR_SEAPP_VIOLATIONS := true
diff --git a/shared/overlays/core/res/values/config.xml b/shared/overlays/core/res/values/config.xml
index bfcec6c..b9d31ed 100644
--- a/shared/overlays/core/res/values/config.xml
+++ b/shared/overlays/core/res/values/config.xml
@@ -20,4 +20,11 @@
<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<!-- Show the "Adaptive Brightness" toggle. -->
<bool name="config_automatic_brightness_available">true</bool>
+
+ <string name="config_extensionFallbackPackageName" translatable="false">
+ android.camera.extensions.impl.service
+ </string>
+ <string name="config_extensionFallbackServiceName" translatable="false">
+ android.camera.extensions.impl.service.EyesFreeVidService
+ </string>
</resources>
\ No newline at end of file
diff --git a/shared/sepolicy/system_ext/private/property_contexts b/shared/sepolicy/system_ext/private/property_contexts
index 6d6af07..13c17c3 100644
--- a/shared/sepolicy/system_ext/private/property_contexts
+++ b/shared/sepolicy/system_ext/private/property_contexts
@@ -7,9 +7,3 @@
persist.vendor.radio.smlog_switch u:object_r:vendor_radio_prop:s0
ro.vendor.radio.log_loc u:object_r:vendor_radio_prop:s0
ro.vendor.radio.log_prefix u:object_r:vendor_radio_prop:s0
-
-# Boot animation dynamic colors
-persist.bootanim.color1 u:object_r:bootanim_system_prop:s0 exact int
-persist.bootanim.color2 u:object_r:bootanim_system_prop:s0 exact int
-persist.bootanim.color3 u:object_r:bootanim_system_prop:s0 exact int
-persist.bootanim.color4 u:object_r:bootanim_system_prop:s0 exact int
diff --git a/shared/tv/device_vendor.mk b/shared/tv/device_vendor.mk
index 77e6a49..f6e10ab 100644
--- a/shared/tv/device_vendor.mk
+++ b/shared/tv/device_vendor.mk
@@ -25,7 +25,7 @@
$(call inherit-product, device/google/cuttlefish/shared/swiftshader/device_vendor.mk)
$(call inherit-product, device/google/cuttlefish/shared/virgl/device_vendor.mk)
$(call inherit-product, device/google/cuttlefish/shared/device.mk)
-$(call inherit-product, vendor/google/tv/gcbs/projects/reference-v4/dtvstack.mk)
+$(call inherit-product-if-exists, vendor/google/tv/gcbs/projects/reference-v4/dtvstack.mk)
# Loads the camera HAL and which set of cameras is required.
$(call inherit-product, device/google/cuttlefish/shared/camera/device_vendor.mk)