diff options
author | Treehugger Robot <treehugger-gerrit@google.com> | 2021-03-11 23:14:31 +0000 |
---|---|---|
committer | Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> | 2021-03-11 23:14:31 +0000 |
commit | d0b2ef730c614810c1d5e0c38af2c2409c282f7c (patch) | |
tree | 779ba3915e035cfdeab290e33aae9e56ee28bf13 | |
parent | 3e864fdc7c2b33ec7f1c6ec56b5163ebcbdb1531 (diff) | |
parent | d5df20714f79451d48b2506da17f959de8896847 (diff) | |
download | cuttlefish-d0b2ef730c614810c1d5e0c38af2c2409c282f7c.tar.gz |
Merge "Adds device config header that can be included in ranchu hwc" am: 3261e5236b am: d5df20714f
Original change: https://android-review.googlesource.com/c/device/google/cuttlefish/+/1629101
MUST ONLY BE SUBMITTED BY AUTOMERGER
Change-Id: I2ea9c68e3d3dc9236d7ad0ccb99495b435cb1797
-rw-r--r-- | common/libs/device_config/Android.bp | 2 | ||||
-rw-r--r-- | common/libs/device_config/device_config_shared.cpp | 26 | ||||
-rw-r--r-- | common/libs/device_config/device_config_shared.h | 29 |
3 files changed, 57 insertions, 0 deletions
diff --git a/common/libs/device_config/Android.bp b/common/libs/device_config/Android.bp index 6cc5f6d1a..7e87dca02 100644 --- a/common/libs/device_config/Android.bp +++ b/common/libs/device_config/Android.bp @@ -29,6 +29,7 @@ cc_library_shared { name: "libcuttlefish_device_config", srcs: [ "device_config.cpp", + "device_config_shared.cpp", ], shared_libs: [ "libbase", @@ -59,5 +60,6 @@ cc_library_shared { ], }, }, + export_include_dirs: ["."], defaults: ["cuttlefish_host"], } diff --git a/common/libs/device_config/device_config_shared.cpp b/common/libs/device_config/device_config_shared.cpp new file mode 100644 index 000000000..ac4f8b46f --- /dev/null +++ b/common/libs/device_config/device_config_shared.cpp @@ -0,0 +1,26 @@ +/* + * Copyright (C) 2021 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 "device_config.h" + +namespace cuttlefish { + +DeviceConfig GetDeviceConfig() { + const auto device_config_helper = cuttlefish::DeviceConfigHelper::Get(); + return device_config_helper->GetDeviceConfig(); +} + +} // namespace cuttlefish
\ No newline at end of file diff --git a/common/libs/device_config/device_config_shared.h b/common/libs/device_config/device_config_shared.h new file mode 100644 index 000000000..3176917df --- /dev/null +++ b/common/libs/device_config/device_config_shared.h @@ -0,0 +1,29 @@ +/* + * Copyright (C) 2021 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 "device/google/cuttlefish/common/libs/device_config/device_config.pb.h" + +namespace cuttlefish { + +// Minimal version to share with Goldfish which doesn't include additional +// Cuttlefish headers. +// +// TODO(natsu): switch ranchu hwcomposer to drm for display discovery. +DeviceConfig GetDeviceConfig(); + +} // namespace cuttlefish
\ No newline at end of file |