RIL changes to allow the modem to query the framework for the key.
BUG: 35606429 Test: manual Change-Id: I7687d664c928de2325d50c3e9e7912f10aa37463 Merged-In: Ib1f5ee5f793f53901ad54bb6b6d4cb667dc720ab
This commit is contained in:
parent
b422f16e23
commit
de1ac79c14
6 changed files with 356 additions and 0 deletions
76
radio/1.1/Android.bp
Normal file
76
radio/1.1/Android.bp
Normal file
|
@ -0,0 +1,76 @@
|
|||
// This file is autogenerated by hidl-gen. Do not edit manually.
|
||||
|
||||
filegroup {
|
||||
name: "android.hardware.radio@1.1_hal",
|
||||
srcs: [
|
||||
"IRadio.hal",
|
||||
"IRadioIndication.hal",
|
||||
"IRadioResponse.hal",
|
||||
],
|
||||
}
|
||||
|
||||
genrule {
|
||||
name: "android.hardware.radio@1.1_genc++",
|
||||
tools: ["hidl-gen"],
|
||||
cmd: "$(location hidl-gen) -o $(genDir) -Lc++ -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.radio@1.1",
|
||||
srcs: [
|
||||
":android.hardware.radio@1.1_hal",
|
||||
],
|
||||
out: [
|
||||
"android/hardware/radio/1.1/RadioAll.cpp",
|
||||
"android/hardware/radio/1.1/RadioIndicationAll.cpp",
|
||||
"android/hardware/radio/1.1/RadioResponseAll.cpp",
|
||||
],
|
||||
}
|
||||
|
||||
genrule {
|
||||
name: "android.hardware.radio@1.1_genc++_headers",
|
||||
tools: ["hidl-gen"],
|
||||
cmd: "$(location hidl-gen) -o $(genDir) -Lc++ -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.radio@1.1",
|
||||
srcs: [
|
||||
":android.hardware.radio@1.1_hal",
|
||||
],
|
||||
out: [
|
||||
"android/hardware/radio/1.1/IRadio.h",
|
||||
"android/hardware/radio/1.1/IHwRadio.h",
|
||||
"android/hardware/radio/1.1/BnHwRadio.h",
|
||||
"android/hardware/radio/1.1/BpHwRadio.h",
|
||||
"android/hardware/radio/1.1/BsRadio.h",
|
||||
"android/hardware/radio/1.1/IRadioIndication.h",
|
||||
"android/hardware/radio/1.1/IHwRadioIndication.h",
|
||||
"android/hardware/radio/1.1/BnHwRadioIndication.h",
|
||||
"android/hardware/radio/1.1/BpHwRadioIndication.h",
|
||||
"android/hardware/radio/1.1/BsRadioIndication.h",
|
||||
"android/hardware/radio/1.1/IRadioResponse.h",
|
||||
"android/hardware/radio/1.1/IHwRadioResponse.h",
|
||||
"android/hardware/radio/1.1/BnHwRadioResponse.h",
|
||||
"android/hardware/radio/1.1/BpHwRadioResponse.h",
|
||||
"android/hardware/radio/1.1/BsRadioResponse.h",
|
||||
],
|
||||
}
|
||||
|
||||
cc_library_shared {
|
||||
name: "android.hardware.radio@1.1",
|
||||
generated_sources: ["android.hardware.radio@1.1_genc++"],
|
||||
generated_headers: ["android.hardware.radio@1.1_genc++_headers"],
|
||||
export_generated_headers: ["android.hardware.radio@1.1_genc++_headers"],
|
||||
vendor_available: true,
|
||||
shared_libs: [
|
||||
"libhidlbase",
|
||||
"libhidltransport",
|
||||
"libhwbinder",
|
||||
"liblog",
|
||||
"libutils",
|
||||
"libcutils",
|
||||
"android.hardware.radio@1.0",
|
||||
"android.hidl.base@1.0",
|
||||
],
|
||||
export_shared_lib_headers: [
|
||||
"libhidlbase",
|
||||
"libhidltransport",
|
||||
"libhwbinder",
|
||||
"libutils",
|
||||
"android.hardware.radio@1.0",
|
||||
"android.hidl.base@1.0",
|
||||
],
|
||||
}
|
154
radio/1.1/Android.mk
Normal file
154
radio/1.1/Android.mk
Normal file
|
@ -0,0 +1,154 @@
|
|||
# This file is autogenerated by hidl-gen. Do not edit manually.
|
||||
|
||||
LOCAL_PATH := $(call my-dir)
|
||||
|
||||
################################################################################
|
||||
|
||||
include $(CLEAR_VARS)
|
||||
LOCAL_MODULE := android.hardware.radio-V1.1-java
|
||||
LOCAL_MODULE_CLASS := JAVA_LIBRARIES
|
||||
|
||||
intermediates := $(call local-generated-sources-dir, COMMON)
|
||||
|
||||
HIDL := $(HOST_OUT_EXECUTABLES)/hidl-gen$(HOST_EXECUTABLE_SUFFIX)
|
||||
|
||||
LOCAL_JAVA_LIBRARIES := \
|
||||
android.hardware.radio-V1.0-java \
|
||||
android.hidl.base-V1.0-java \
|
||||
|
||||
|
||||
#
|
||||
# Build IRadio.hal
|
||||
#
|
||||
GEN := $(intermediates)/android/hardware/radio/V1_1/IRadio.java
|
||||
$(GEN): $(HIDL)
|
||||
$(GEN): PRIVATE_HIDL := $(HIDL)
|
||||
$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/IRadio.hal
|
||||
$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
|
||||
$(GEN): PRIVATE_CUSTOM_TOOL = \
|
||||
$(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
|
||||
-Ljava \
|
||||
-randroid.hardware:hardware/interfaces \
|
||||
-randroid.hidl:system/libhidl/transport \
|
||||
android.hardware.radio@1.1::IRadio
|
||||
|
||||
$(GEN): $(LOCAL_PATH)/IRadio.hal
|
||||
$(transform-generated-source)
|
||||
LOCAL_GENERATED_SOURCES += $(GEN)
|
||||
|
||||
#
|
||||
# Build IRadioIndication.hal
|
||||
#
|
||||
GEN := $(intermediates)/android/hardware/radio/V1_1/IRadioIndication.java
|
||||
$(GEN): $(HIDL)
|
||||
$(GEN): PRIVATE_HIDL := $(HIDL)
|
||||
$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/IRadioIndication.hal
|
||||
$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
|
||||
$(GEN): PRIVATE_CUSTOM_TOOL = \
|
||||
$(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
|
||||
-Ljava \
|
||||
-randroid.hardware:hardware/interfaces \
|
||||
-randroid.hidl:system/libhidl/transport \
|
||||
android.hardware.radio@1.1::IRadioIndication
|
||||
|
||||
$(GEN): $(LOCAL_PATH)/IRadioIndication.hal
|
||||
$(transform-generated-source)
|
||||
LOCAL_GENERATED_SOURCES += $(GEN)
|
||||
|
||||
#
|
||||
# Build IRadioResponse.hal
|
||||
#
|
||||
GEN := $(intermediates)/android/hardware/radio/V1_1/IRadioResponse.java
|
||||
$(GEN): $(HIDL)
|
||||
$(GEN): PRIVATE_HIDL := $(HIDL)
|
||||
$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/IRadioResponse.hal
|
||||
$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
|
||||
$(GEN): PRIVATE_CUSTOM_TOOL = \
|
||||
$(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
|
||||
-Ljava \
|
||||
-randroid.hardware:hardware/interfaces \
|
||||
-randroid.hidl:system/libhidl/transport \
|
||||
android.hardware.radio@1.1::IRadioResponse
|
||||
|
||||
$(GEN): $(LOCAL_PATH)/IRadioResponse.hal
|
||||
$(transform-generated-source)
|
||||
LOCAL_GENERATED_SOURCES += $(GEN)
|
||||
include $(BUILD_JAVA_LIBRARY)
|
||||
|
||||
|
||||
################################################################################
|
||||
|
||||
include $(CLEAR_VARS)
|
||||
LOCAL_MODULE := android.hardware.radio-V1.1-java-static
|
||||
LOCAL_MODULE_CLASS := JAVA_LIBRARIES
|
||||
|
||||
intermediates := $(call local-generated-sources-dir, COMMON)
|
||||
|
||||
HIDL := $(HOST_OUT_EXECUTABLES)/hidl-gen$(HOST_EXECUTABLE_SUFFIX)
|
||||
|
||||
LOCAL_STATIC_JAVA_LIBRARIES := \
|
||||
android.hardware.radio-V1.0-java-static \
|
||||
android.hidl.base-V1.0-java-static \
|
||||
|
||||
|
||||
#
|
||||
# Build IRadio.hal
|
||||
#
|
||||
GEN := $(intermediates)/android/hardware/radio/V1_1/IRadio.java
|
||||
$(GEN): $(HIDL)
|
||||
$(GEN): PRIVATE_HIDL := $(HIDL)
|
||||
$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/IRadio.hal
|
||||
$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
|
||||
$(GEN): PRIVATE_CUSTOM_TOOL = \
|
||||
$(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
|
||||
-Ljava \
|
||||
-randroid.hardware:hardware/interfaces \
|
||||
-randroid.hidl:system/libhidl/transport \
|
||||
android.hardware.radio@1.1::IRadio
|
||||
|
||||
$(GEN): $(LOCAL_PATH)/IRadio.hal
|
||||
$(transform-generated-source)
|
||||
LOCAL_GENERATED_SOURCES += $(GEN)
|
||||
|
||||
#
|
||||
# Build IRadioIndication.hal
|
||||
#
|
||||
GEN := $(intermediates)/android/hardware/radio/V1_1/IRadioIndication.java
|
||||
$(GEN): $(HIDL)
|
||||
$(GEN): PRIVATE_HIDL := $(HIDL)
|
||||
$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/IRadioIndication.hal
|
||||
$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
|
||||
$(GEN): PRIVATE_CUSTOM_TOOL = \
|
||||
$(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
|
||||
-Ljava \
|
||||
-randroid.hardware:hardware/interfaces \
|
||||
-randroid.hidl:system/libhidl/transport \
|
||||
android.hardware.radio@1.1::IRadioIndication
|
||||
|
||||
$(GEN): $(LOCAL_PATH)/IRadioIndication.hal
|
||||
$(transform-generated-source)
|
||||
LOCAL_GENERATED_SOURCES += $(GEN)
|
||||
|
||||
#
|
||||
# Build IRadioResponse.hal
|
||||
#
|
||||
GEN := $(intermediates)/android/hardware/radio/V1_1/IRadioResponse.java
|
||||
$(GEN): $(HIDL)
|
||||
$(GEN): PRIVATE_HIDL := $(HIDL)
|
||||
$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/IRadioResponse.hal
|
||||
$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
|
||||
$(GEN): PRIVATE_CUSTOM_TOOL = \
|
||||
$(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
|
||||
-Ljava \
|
||||
-randroid.hardware:hardware/interfaces \
|
||||
-randroid.hidl:system/libhidl/transport \
|
||||
android.hardware.radio@1.1::IRadioResponse
|
||||
|
||||
$(GEN): $(LOCAL_PATH)/IRadioResponse.hal
|
||||
$(transform-generated-source)
|
||||
LOCAL_GENERATED_SOURCES += $(GEN)
|
||||
include $(BUILD_STATIC_JAVA_LIBRARY)
|
||||
|
||||
|
||||
|
||||
include $(call all-makefiles-under,$(LOCAL_PATH))
|
54
radio/1.1/IRadio.hal
Normal file
54
radio/1.1/IRadio.hal
Normal file
|
@ -0,0 +1,54 @@
|
|||
/*
|
||||
* Copyright (C) 2016 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.radio@1.1;
|
||||
|
||||
import IRadioResponse;
|
||||
import @1.0::IRadio;
|
||||
|
||||
/**
|
||||
* This interface is used by telephony and telecom to talk to cellular radio.
|
||||
* All the functions have minimum one parameter:
|
||||
* serial: which corresponds to serial no. of request. Serial numbers must only be memorized for the
|
||||
* duration of a method call. If clients provide colliding serials (including passing the same
|
||||
* serial to different methods), multiple responses (one for each method call) must still be served.
|
||||
* setResponseFunctions must work with @1.1::IRadioResponse and @1.1::IRadioIndication.
|
||||
*/
|
||||
interface IRadio extends @1.0::IRadio {
|
||||
/**
|
||||
* Provide Carrier specific information to the modem that must be used to
|
||||
* encrypt the IMSI and IMPI. Sent by the framework during boot, carrier
|
||||
* switch and everytime the framework receives a new certificate.
|
||||
*
|
||||
* @param serial Serial number of request.
|
||||
* @param carrierKey Carrier specific key to be used for encryption. It must
|
||||
* be opaque to the framework. This is the byte-stream representation
|
||||
* of the key. This is an external encoded form for the key used when
|
||||
* a standard representation of the key is needed outside the Java
|
||||
* Virtual Machine, as when transmitting the key to some other party.
|
||||
* The key is encoded according to a standard format
|
||||
* (such as X.509 SubjectPublicKeyInfo or PKCS#8), and is returned using
|
||||
* the getEncoded method.
|
||||
* @param keyIdentifier This is an opaque value we're given by the carrier
|
||||
* and is returned to the carrier. This is used by the server to
|
||||
* help it locate the private key to decrypt the permanent identity.
|
||||
*
|
||||
* Response callback is
|
||||
* IRadioResponse.setCarrierInfoForImsiEncryptionResponse()
|
||||
*/
|
||||
oneway setCarrierInfoForImsiEncryption(int32_t serial, vec<uint8_t> carrierKey,
|
||||
string keyIdentifier);
|
||||
};
|
34
radio/1.1/IRadioIndication.hal
Normal file
34
radio/1.1/IRadioIndication.hal
Normal file
|
@ -0,0 +1,34 @@
|
|||
/*
|
||||
* Copyright (C) 2016 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.radio@1.1;
|
||||
|
||||
import @1.0::IRadioIndication;
|
||||
import @1.0::types;
|
||||
|
||||
/**
|
||||
* Interface declaring unsolicited radio indications.
|
||||
*/
|
||||
interface IRadioIndication extends @1.0::IRadioIndication{
|
||||
/*
|
||||
* Indicates that the modem requires the Carrier info for IMSI/IMPI encryption.
|
||||
* This might happen when the modem restarts or for some reason it's cache
|
||||
* has been invalidated.
|
||||
*
|
||||
* @param type Type of radio indication
|
||||
*/
|
||||
oneway carrierInfoForImsiEncryption(RadioIndicationType info);
|
||||
};
|
37
radio/1.1/IRadioResponse.hal
Normal file
37
radio/1.1/IRadioResponse.hal
Normal file
|
@ -0,0 +1,37 @@
|
|||
/*
|
||||
* Copyright (C) 2016 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.radio@1.1;
|
||||
|
||||
import @1.0::IRadioResponse;
|
||||
|
||||
/**
|
||||
* Interface declaring response functions to solicited radio requests.
|
||||
*/
|
||||
interface IRadioResponse extends @1.0::IRadioResponse {
|
||||
/**
|
||||
* @param info Response info struct containing response type, serial no. and error
|
||||
*
|
||||
* Valid errors returned:
|
||||
* RadioError:RIL_E_SUCCESS
|
||||
* RadioError:RIL_E_RADIO_NOT_AVAILABLE
|
||||
* RadioError:SIM_ABSENT
|
||||
* RadioError:RIL_E_REQUEST_NOT_SUPPORTED
|
||||
* RadioError:INVALID_ARGUMENTS
|
||||
* RadioError:MODEM_INTERNAL_FAILURE
|
||||
*/
|
||||
oneway setCarrierInfoForImsiEncryptionResponse(RadioResponseInfo info);
|
||||
};
|
|
@ -2,5 +2,6 @@
|
|||
subdirs = [
|
||||
"1.0",
|
||||
"1.0/vts/functional",
|
||||
"1.1",
|
||||
"deprecated/1.0",
|
||||
]
|
||||
|
|
Loading…
Reference in a new issue