diff options
author | android-build-team Robot <android-build-team-robot@google.com> | 2019-06-22 23:14:45 +0000 |
---|---|---|
committer | android-build-team Robot <android-build-team-robot@google.com> | 2019-06-22 23:14:45 +0000 |
commit | 60e2613ee962f913c0bd144b8bdd9052fe15fcbb (patch) | |
tree | e08c2f9852d8903443c5d879d4cb3bf254fc26a2 | |
parent | 83d398acf6ad384c0d0e6b95b01d00343650e3a8 (diff) | |
parent | faad30bd20482bde152798bfdc2a8719ed1c7d7f (diff) | |
download | interfaces-android10-security-release.tar.gz |
Snap for 5681426 from faad30bd20482bde152798bfdc2a8719ed1c7d7f to qt-releaseandroid-vts-10.0_r9android-vts-10.0_r8android-vts-10.0_r7android-vts-10.0_r6android-vts-10.0_r5android-vts-10.0_r4android-vts-10.0_r3android-vts-10.0_r2android-vts-10.0_r16android-vts-10.0_r15android-vts-10.0_r14android-vts-10.0_r13android-vts-10.0_r12android-vts-10.0_r11android-vts-10.0_r10android-vts-10.0_r1android-security-10.0.0_r75android-security-10.0.0_r74android-security-10.0.0_r73android-security-10.0.0_r72android-security-10.0.0_r71android-security-10.0.0_r70android-security-10.0.0_r69android-security-10.0.0_r68android-security-10.0.0_r67android-security-10.0.0_r66android-security-10.0.0_r65android-security-10.0.0_r64android-security-10.0.0_r63android-security-10.0.0_r62android-security-10.0.0_r61android-security-10.0.0_r60android-security-10.0.0_r59android-security-10.0.0_r58android-security-10.0.0_r57android-security-10.0.0_r56android-security-10.0.0_r55android-security-10.0.0_r54android-security-10.0.0_r53android-security-10.0.0_r52android-security-10.0.0_r51android-security-10.0.0_r50android-security-10.0.0_r49android-security-10.0.0_r48android-cts-10.0_r9android-cts-10.0_r8android-cts-10.0_r7android-cts-10.0_r6android-cts-10.0_r5android-cts-10.0_r4android-cts-10.0_r3android-cts-10.0_r2android-cts-10.0_r16android-cts-10.0_r15android-cts-10.0_r14android-cts-10.0_r13android-cts-10.0_r12android-cts-10.0_r11android-cts-10.0_r10android-cts-10.0_r1android-10.0.0_r6android-10.0.0_r5android-10.0.0_r47android-10.0.0_r46android-10.0.0_r4android-10.0.0_r3android-10.0.0_r2android-10.0.0_r17android-10.0.0_r11android-10.0.0_r10android-10.0.0_r1android10-tests-releaseandroid10-security-releaseandroid10-s3-releaseandroid10-s2-releaseandroid10-s1-releaseandroid10-release
Change-Id: Icebd8a7f55303bbd452063c2e2252136baf488a9
-rw-r--r-- | light/1.0/default/Android.bp | 31 | ||||
-rw-r--r-- | light/1.0/default/impl.cpp | 43 |
2 files changed, 68 insertions, 6 deletions
diff --git a/light/1.0/default/Android.bp b/light/1.0/default/Android.bp index 1dc781c..a931501 100644 --- a/light/1.0/default/Android.bp +++ b/light/1.0/default/Android.bp @@ -14,18 +14,14 @@ // limitations under the License. // -cc_binary { - name: "hardware.google.light@1.0-service", +cc_defaults { + name: "hardware.google.light_defaults", relative_install_path: "hw", - defaults: ["hidl_defaults"], - init_rc: ["hardware.google.light@1.0-service.rc"], vendor: true, srcs: [ "Light.cpp", "LightExt.cpp", - "service.cpp", ], - shared_libs: [ "liblog", "libbase", @@ -37,3 +33,26 @@ cc_binary { "hardware.google.light@1.0", ], } + +cc_library_shared { + name: "hardware.google.light@1.0-impl", + defaults: [ + "hardware.google.light_defaults", + "hidl_defaults" + ], + srcs: [ + "impl.cpp", + ], +} + +cc_binary { + name: "hardware.google.light@1.0-service", + defaults: [ + "hardware.google.light_defaults", + "hidl_defaults" + ], + init_rc: ["hardware.google.light@1.0-service.rc"], + srcs: [ + "service.cpp", + ], +} diff --git a/light/1.0/default/impl.cpp b/light/1.0/default/impl.cpp new file mode 100644 index 0000000..75f8653 --- /dev/null +++ b/light/1.0/default/impl.cpp @@ -0,0 +1,43 @@ +/* + * Copyright (C) 2019 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 <hardware/lights.h> +#include <hidl/LegacySupport.h> +#include <hardware/google/light/1.0/ILight.h> +#include "LightExt.h" + +namespace android { +namespace hardware { +namespace light { +namespace V2_0 { +namespace implementation { + +extern ILight* HIDL_FETCH_ILight(const char* /* name */); + +} // namespace implementation +} // namespace V2_0 +} // namespace light +} // namespace hardware +} // namespace android + +using hardware::google::light::V1_0::ILight; +using hardware::google::light::V1_0::implementation::LightExt; + +extern "C" ILight *HIDL_FETCH_ILight(const char * /*instance*/) { + return new LightExt{ + android::hardware::light::V2_0::implementation::HIDL_FETCH_ILight( + nullptr)}; +} |