Merge "Enhanced network scan request"

am: 8e5f008ae6

Change-Id: I8903402f50c64b475ccda3839f0175fb2eaa12f6
This commit is contained in:
Sooraj Sasindran 2017-10-17 06:11:13 +00:00 committed by android-build-merger
commit b49cd63a75
5 changed files with 362 additions and 0 deletions

197
radio/1.2/Android.bp Normal file
View file

@ -0,0 +1,197 @@
// This file is autogenerated by hidl-gen. Do not edit manually.
filegroup {
name: "android.hardware.radio@1.2_hal",
srcs: [
"types.hal",
"IRadio.hal",
"ISap.hal",
],
}
genrule {
name: "android.hardware.radio@1.2_genc++",
tools: ["hidl-gen"],
cmd: "$(location hidl-gen) -o $(genDir) -Lc++-sources -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.radio@1.2",
srcs: [
":android.hardware.radio@1.2_hal",
],
out: [
"android/hardware/radio/1.2/types.cpp",
"android/hardware/radio/1.2/RadioAll.cpp",
"android/hardware/radio/1.2/SapAll.cpp",
],
}
genrule {
name: "android.hardware.radio@1.2_genc++_headers",
tools: ["hidl-gen"],
cmd: "$(location hidl-gen) -o $(genDir) -Lc++-headers -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.radio@1.2",
srcs: [
":android.hardware.radio@1.2_hal",
],
out: [
"android/hardware/radio/1.2/types.h",
"android/hardware/radio/1.2/hwtypes.h",
"android/hardware/radio/1.2/IRadio.h",
"android/hardware/radio/1.2/IHwRadio.h",
"android/hardware/radio/1.2/BnHwRadio.h",
"android/hardware/radio/1.2/BpHwRadio.h",
"android/hardware/radio/1.2/BsRadio.h",
"android/hardware/radio/1.2/ISap.h",
"android/hardware/radio/1.2/IHwSap.h",
"android/hardware/radio/1.2/BnHwSap.h",
"android/hardware/radio/1.2/BpHwSap.h",
"android/hardware/radio/1.2/BsSap.h",
],
}
cc_library {
name: "android.hardware.radio@1.2",
defaults: ["hidl-module-defaults"],
generated_sources: ["android.hardware.radio@1.2_genc++"],
generated_headers: ["android.hardware.radio@1.2_genc++_headers"],
export_generated_headers: ["android.hardware.radio@1.2_genc++_headers"],
vendor_available: true,
vndk: {
enabled: true,
},
shared_libs: [
"libhidlbase",
"libhidltransport",
"libhwbinder",
"liblog",
"libutils",
"libcutils",
"android.hardware.radio@1.0",
"android.hardware.radio@1.1",
],
export_shared_lib_headers: [
"libhidlbase",
"libhidltransport",
"libhwbinder",
"libutils",
"android.hardware.radio@1.0",
"android.hardware.radio@1.1",
],
}
genrule {
name: "android.hardware.radio-V1.2-java_gen_java",
tools: ["hidl-gen"],
cmd: "$(location hidl-gen) -o $(genDir) -Ljava -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.radio@1.2",
srcs: [
":android.hardware.radio@1.2_hal",
],
out: [
"android/hardware/radio/V1_2/IncrementalResultsPeriodicityRange.java",
"android/hardware/radio/V1_2/MaxSearchTimeRange.java",
"android/hardware/radio/V1_2/NetworkScanRequest.java",
"android/hardware/radio/V1_2/RadioConst.java",
"android/hardware/radio/V1_2/ScanIntervalRange.java",
"android/hardware/radio/V1_2/IRadio.java",
"android/hardware/radio/V1_2/ISap.java",
],
}
java_library {
name: "android.hardware.radio-V1.2-java",
no_framework_libs: true,
defaults: ["hidl-java-module-defaults"],
srcs: [":android.hardware.radio-V1.2-java_gen_java"],
libs: [
"hwbinder",
"android.hardware.radio-V1.0-java",
"android.hardware.radio-V1.1-java",
"android.hidl.base-V1.0-java",
]
}
// This package does not export any types. Not creating java constants export.
genrule {
name: "android.hardware.radio@1.2-adapter-helper_genc++",
tools: ["hidl-gen"],
cmd: "$(location hidl-gen) -o $(genDir) -Lc++-adapter-sources -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.radio@1.2",
srcs: [
":android.hardware.radio@1.2_hal",
],
out: [
"android/hardware/radio/1.2/ARadio.cpp",
"android/hardware/radio/1.2/ASap.cpp",
],
}
genrule {
name: "android.hardware.radio@1.2-adapter-helper_genc++_headers",
tools: ["hidl-gen"],
cmd: "$(location hidl-gen) -o $(genDir) -Lc++-adapter-headers -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.radio@1.2",
srcs: [
":android.hardware.radio@1.2_hal",
],
out: [
"android/hardware/radio/1.2/ARadio.h",
"android/hardware/radio/1.2/ASap.h",
],
}
cc_library {
name: "android.hardware.radio@1.2-adapter-helper",
defaults: ["hidl-module-defaults"],
generated_sources: ["android.hardware.radio@1.2-adapter-helper_genc++"],
generated_headers: ["android.hardware.radio@1.2-adapter-helper_genc++_headers"],
export_generated_headers: ["android.hardware.radio@1.2-adapter-helper_genc++_headers"],
vendor_available: true,
shared_libs: [
"libhidlbase",
"libhidltransport",
"libhwbinder",
"liblog",
"libutils",
"libcutils",
"libhidladapter",
"android.hardware.radio@1.0",
"android.hardware.radio@1.1",
"android.hardware.radio@1.2",
"android.hardware.radio@1.0-adapter-helper",
"android.hardware.radio@1.1-adapter-helper",
"android.hidl.base@1.0-adapter-helper",
],
export_shared_lib_headers: [
"libhidlbase",
"libhidltransport",
"libhwbinder",
"libutils",
"libhidladapter",
"android.hardware.radio@1.0",
"android.hardware.radio@1.1",
"android.hardware.radio@1.2",
"android.hardware.radio@1.0-adapter-helper",
"android.hardware.radio@1.1-adapter-helper",
"android.hidl.base@1.0-adapter-helper",
],
}
genrule {
name: "android.hardware.radio@1.2-adapter_genc++",
tools: ["hidl-gen"],
cmd: "$(location hidl-gen) -o $(genDir) -Lc++-adapter-main -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.radio@1.2",
out: ["main.cpp"]
}
cc_test {
name: "android.hardware.radio@1.2-adapter",
defaults: ["hidl-module-defaults"],
shared_libs: [
"libhidladapter",
"libhidlbase",
"libhidltransport",
"libutils",
"android.hardware.radio@1.0",
"android.hardware.radio@1.1",
"android.hardware.radio@1.2",
"android.hardware.radio@1.2-adapter-helper",
],
generated_sources: ["android.hardware.radio@1.2-adapter_genc++"],
}

40
radio/1.2/IRadio.hal Normal file
View file

@ -0,0 +1,40 @@
/*
* Copyright (C) 2017 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.2;
import @1.1::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.1::IRadio {
/**
* Starts a network scan
*
* @param serial Serial number of request.
* @param request Defines the radio networks/bands/channels which need to be scanned.
*
* Response function is IRadioResponse.startNetworkScanResponse()
*/
oneway startNetworkScan_1_2(int32_t serial, NetworkScanRequest request);
};

25
radio/1.2/ISap.hal Normal file
View file

@ -0,0 +1,25 @@
/*
* Copyright (C) 2017 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.2;
import @1.1::ISap;
interface ISap extends @1.1::ISap {
/**
* Empty top level interface.
*/
};

99
radio/1.2/types.hal Normal file
View file

@ -0,0 +1,99 @@
/*
* Copyright (C) 2017 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.2;
import @1.0::RadioConst;
import @1.1::RadioAccessSpecifier;
import @1.1::ScanType;
enum RadioConst : @1.0::RadioConst {
RADIO_ACCESS_SPEFICIER_MAX_SIZE = 8,
};
/**
* values are in seconds
*/
enum ScanIntervalRange : int32_t {
MIN = 5,
MAX = 300,
};
/**
* value are in seconds
*/
enum MaxSearchTimeRange : int32_t {
MIN = 60,
MAX = 3600,
};
/**
* values are in seconds
*/
enum IncrementalResultsPeriodicityRange : int32_t {
MIN = 1,
MAX = 10,
};
struct NetworkScanRequest {
ScanType type;
/**
* Time interval in seconds between periodic scans, only valid when type = PERIODIC
* Range: ScanIntervalRange:MIN to ScanIntervalRange:MAX
*/
int32_t interval;
/**
* Networks with bands/channels to scan
* Maximum length of the vector is
* RadioConst:RADIO_ACCESS_SPEFICIER_MAX_SIZE
*/
vec<RadioAccessSpecifier> specifiers;
/**
* Maximum duration of the periodic search (in seconds).
* Expected range for the input is [MaxSearchTimeRange:MIN - MaxSearchTimeRange:MAX]
* If the search lasts maxSearchTime, it must be terminated.
*/
int32_t maxSearchTime;
/**
* Indicates whether the modem must report incremental results of the network scan
* to the client.
* FALSE Incremental results must not be reported.
* TRUE Incremental must be reported.
*/
bool incrementalResults;
/**
* Indicates the periodicity with which the modem must report incremental results to
* the client (in seconds).
* Expected range for the input is
* [IncrementalResultsPeriodicityRange:MIN - IncrementalResultsPeriodicityRange:MAX]
* This value must be less than or equal to maxSearchTime.
*/
int32_t incrementalResultsPeriodicity;
/**
* Describes the List of PLMN ids (MCC-MNC)
* If any PLMN of this list is found, search must end at that point and results with all
* PLMN found until that point should be sent as response.
* If the list is not sent, search to be completed until end and all PLMNs found to be
* reported.
*/
vec<string> mccMncs;
};

View file

@ -4,5 +4,6 @@ subdirs = [
"1.0/vts/functional",
"1.1",
"1.1/vts/functional",
"1.2",
"deprecated/1.0",
]