From b162f3f8dd534d91e8805ae668fd8d7932ce69c2 Mon Sep 17 00:00:00 2001 From: Sundong Ahn Date: Mon, 10 Jul 2017 13:56:10 +0900 Subject: [PATCH] Configstore HAL is down-revisioned to 1.0 Configstore was up-revisioned from 1.0 to 1.1. However no new APIs were added to 1.1. Therefore configstore in master will be down revisioned to 1.0. Bug: 71555815 Test: lshal | grep configsotre Test: "cat proc//status | grep Seccomp " return: Seccomp: 2 Change-Id: I65d2dc06fbe12d0c0ccc020bbd287e0b14320f2f --- CleanSpec.mk | 1 + compatibility_matrix.current.xml | 2 +- configstore/{1.1 => 1.0}/default/Android.mk | 13 ++--- .../default/SurfaceFlingerConfigs.cpp | 7 +-- .../default/SurfaceFlingerConfigs.h | 17 +++--- ...ndroid.hardware.configstore@1.0-service.rc | 4 ++ .../configstore@1.0-arm64.policy} | 0 configstore/{1.1 => 1.0}/default/service.cpp | 10 ++-- .../{1.1 => 1.0}/default/surfaceflinger.mk | 0 configstore/1.1/Android.bp | 18 ------ configstore/1.1/ISurfaceFlingerConfigs.hal | 25 --------- ...ndroid.hardware.configstore@1.1-service.rc | 4 -- configstore/1.1/vts/functional/Android.bp | 26 --------- .../VtsHalConfigstoreV1_1TargetTest.cpp | 55 ------------------- 14 files changed, 26 insertions(+), 156 deletions(-) rename configstore/{1.1 => 1.0}/default/Android.mk (66%) rename configstore/{1.1 => 1.0}/default/SurfaceFlingerConfigs.cpp (96%) rename configstore/{1.1 => 1.0}/default/SurfaceFlingerConfigs.h (77%) create mode 100644 configstore/1.0/default/android.hardware.configstore@1.0-service.rc rename configstore/{1.1/default/seccomp_policy/configstore@1.1-arm64.policy => 1.0/default/seccomp_policy/configstore@1.0-arm64.policy} (100%) rename configstore/{1.1 => 1.0}/default/service.cpp (81%) rename configstore/{1.1 => 1.0}/default/surfaceflinger.mk (100%) delete mode 100644 configstore/1.1/Android.bp delete mode 100644 configstore/1.1/ISurfaceFlingerConfigs.hal delete mode 100644 configstore/1.1/default/android.hardware.configstore@1.1-service.rc delete mode 100644 configstore/1.1/vts/functional/Android.bp delete mode 100644 configstore/1.1/vts/functional/VtsHalConfigstoreV1_1TargetTest.cpp diff --git a/CleanSpec.mk b/CleanSpec.mk index f04a39092f..00d0aa50c6 100644 --- a/CleanSpec.mk +++ b/CleanSpec.mk @@ -63,3 +63,4 @@ $(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/etc/init/android.hardware.au $(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/lib/android.hardware.tests*) $(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/lib/vndk/android.hardware.tests*) $(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/lib/vndk-sp/android.hardware.graphics.allocator*) +$(call add-clean-step, find $(PRODUCT_OUT)/system $(PRODUCT_OUT)/vendor -type f -name "android\.hardware\.configstore\@1\.1*" -print0 | xargs -0 rm -f) diff --git a/compatibility_matrix.current.xml b/compatibility_matrix.current.xml index 5b033e7e2a..9287d672e0 100644 --- a/compatibility_matrix.current.xml +++ b/compatibility_matrix.current.xml @@ -81,7 +81,7 @@ android.hardware.configstore - 1.0-1 + 1.0 ISurfaceFlingerConfigs default diff --git a/configstore/1.1/default/Android.mk b/configstore/1.0/default/Android.mk similarity index 66% rename from configstore/1.1/default/Android.mk rename to configstore/1.0/default/Android.mk index 53e454b058..20f4c5b0a5 100644 --- a/configstore/1.1/default/Android.mk +++ b/configstore/1.0/default/Android.mk @@ -2,12 +2,12 @@ LOCAL_PATH := $(call my-dir) ################################################################################ include $(CLEAR_VARS) -LOCAL_MODULE := android.hardware.configstore@1.1-service -LOCAL_REQUIRED_MODULES_arm64 := configstore@1.1.policy +LOCAL_MODULE := android.hardware.configstore@1.0-service +LOCAL_REQUIRED_MODULES_arm64 := configstore@1.0.policy LOCAL_PROPRIETARY_MODULE := true LOCAL_MODULE_CLASS := EXECUTABLES LOCAL_MODULE_RELATIVE_PATH := hw -LOCAL_INIT_RC := android.hardware.configstore@1.1-service.rc +LOCAL_INIT_RC := android.hardware.configstore@1.0-service.rc LOCAL_SRC_FILES:= service.cpp include $(LOCAL_PATH)/surfaceflinger.mk @@ -19,17 +19,16 @@ LOCAL_SHARED_LIBRARIES := \ libhwminijail \ liblog \ libutils \ - android.hardware.configstore@1.0 \ - android.hardware.configstore@1.1 + android.hardware.configstore@1.0 include $(BUILD_EXECUTABLE) # seccomp filter for configstore ifeq ($(TARGET_ARCH), $(filter $(TARGET_ARCH), arm64)) include $(CLEAR_VARS) -LOCAL_MODULE := configstore@1.1.policy +LOCAL_MODULE := configstore@1.0.policy LOCAL_MODULE_CLASS := ETC LOCAL_MODULE_PATH := $(TARGET_OUT_VENDOR)/etc/seccomp_policy -LOCAL_SRC_FILES := seccomp_policy/configstore@1.1-$(TARGET_ARCH).policy +LOCAL_SRC_FILES := seccomp_policy/configstore@1.0-$(TARGET_ARCH).policy include $(BUILD_PREBUILT) endif diff --git a/configstore/1.1/default/SurfaceFlingerConfigs.cpp b/configstore/1.0/default/SurfaceFlingerConfigs.cpp similarity index 96% rename from configstore/1.1/default/SurfaceFlingerConfigs.cpp rename to configstore/1.0/default/SurfaceFlingerConfigs.cpp index 5a040f2a89..3239274f9f 100644 --- a/configstore/1.1/default/SurfaceFlingerConfigs.cpp +++ b/configstore/1.0/default/SurfaceFlingerConfigs.cpp @@ -19,7 +19,7 @@ namespace android { namespace hardware { namespace configstore { -namespace V1_1 { +namespace V1_0 { namespace implementation { // Methods from ::android::hardware::configstore::V1_0::ISurfaceFlingerConfigs @@ -139,13 +139,10 @@ Return SurfaceFlingerConfigs::startGraphicsAllocatorService( return Void(); } -// Methods from ::android::hardware::configstore::V1_1::ISurfaceFlingerConfigs -// follow. - // Methods from ::android::hidl::base::V1_0::IBase follow. } // namespace implementation -} // namespace V1_1 +} // namespace V1_0 } // namespace configstore } // namespace hardware } // namespace android diff --git a/configstore/1.1/default/SurfaceFlingerConfigs.h b/configstore/1.0/default/SurfaceFlingerConfigs.h similarity index 77% rename from configstore/1.1/default/SurfaceFlingerConfigs.h rename to configstore/1.0/default/SurfaceFlingerConfigs.h index 53e8ae8714..32e5fc3928 100644 --- a/configstore/1.1/default/SurfaceFlingerConfigs.h +++ b/configstore/1.0/default/SurfaceFlingerConfigs.h @@ -1,17 +1,17 @@ -#ifndef ANDROID_HARDWARE_CONFIGSTORE_V1_1_SURFACEFLINGERCONFIGS_H -#define ANDROID_HARDWARE_CONFIGSTORE_V1_1_SURFACEFLINGERCONFIGS_H +#ifndef ANDROID_HARDWARE_CONFIGSTORE_V1_0_SURFACEFLINGERCONFIGS_H +#define ANDROID_HARDWARE_CONFIGSTORE_V1_0_SURFACEFLINGERCONFIGS_H -#include +#include #include #include namespace android { namespace hardware { namespace configstore { -namespace V1_1 { +namespace V1_0 { namespace implementation { -using ::android::hardware::configstore::V1_1::ISurfaceFlingerConfigs; +using ::android::hardware::configstore::V1_0::ISurfaceFlingerConfigs; using ::android::hardware::Return; using ::android::hardware::Void; using ::android::sp; @@ -32,16 +32,13 @@ struct SurfaceFlingerConfigs : public ISurfaceFlingerConfigs { Return maxFrameBufferAcquiredBuffers(maxFrameBufferAcquiredBuffers_cb _hidl_cb) override; Return startGraphicsAllocatorService(startGraphicsAllocatorService_cb _hidl_cb) override; - // Methods from - // ::android::hardware::configstore::V1_1::ISurfaceFlingerConfigs follow. - // Methods from ::android::hidl::base::V1_0::IBase follow. }; } // namespace implementation -} // namespace V1_1 +} // namespace V1_0 } // namespace configstore } // namespace hardware } // namespace android -#endif // ANDROID_HARDWARE_CONFIGSTORE_V1_1_SURFACEFLINGERCONFIGS_H +#endif // ANDROID_HARDWARE_CONFIGSTORE_V1_0_SURFACEFLINGERCONFIGS_H diff --git a/configstore/1.0/default/android.hardware.configstore@1.0-service.rc b/configstore/1.0/default/android.hardware.configstore@1.0-service.rc new file mode 100644 index 0000000000..40fb4983ba --- /dev/null +++ b/configstore/1.0/default/android.hardware.configstore@1.0-service.rc @@ -0,0 +1,4 @@ +service vendor.configstore-hal-1-0 /vendor/bin/hw/android.hardware.configstore@1.0-service + class hal animation + user system + group system diff --git a/configstore/1.1/default/seccomp_policy/configstore@1.1-arm64.policy b/configstore/1.0/default/seccomp_policy/configstore@1.0-arm64.policy similarity index 100% rename from configstore/1.1/default/seccomp_policy/configstore@1.1-arm64.policy rename to configstore/1.0/default/seccomp_policy/configstore@1.0-arm64.policy diff --git a/configstore/1.1/default/service.cpp b/configstore/1.0/default/service.cpp similarity index 81% rename from configstore/1.1/default/service.cpp rename to configstore/1.0/default/service.cpp index 535e0cdd96..c9c81a07f5 100644 --- a/configstore/1.1/default/service.cpp +++ b/configstore/1.0/default/service.cpp @@ -14,9 +14,9 @@ * limitations under the License. */ -#define LOG_TAG "android.hardware.configstore@1.1-service" +#define LOG_TAG "android.hardware.configstore@1.0-service" -#include +#include #include #include @@ -24,8 +24,8 @@ using android::hardware::configureRpcThreadpool; using android::hardware::joinRpcThreadpool; -using android::hardware::configstore::V1_1::ISurfaceFlingerConfigs; -using android::hardware::configstore::V1_1::implementation::SurfaceFlingerConfigs; +using android::hardware::configstore::V1_0::ISurfaceFlingerConfigs; +using android::hardware::configstore::V1_0::implementation::SurfaceFlingerConfigs; using android::hardware::SetupMinijail; using android::sp; using android::status_t; @@ -34,7 +34,7 @@ using android::OK; int main() { configureRpcThreadpool(10, true); - SetupMinijail("/vendor/etc/seccomp_policy/configstore@1.1.policy"); + SetupMinijail("/vendor/etc/seccomp_policy/configstore@1.0.policy"); sp surfaceFlingerConfigs = new SurfaceFlingerConfigs; status_t status = surfaceFlingerConfigs->registerAsService(); diff --git a/configstore/1.1/default/surfaceflinger.mk b/configstore/1.0/default/surfaceflinger.mk similarity index 100% rename from configstore/1.1/default/surfaceflinger.mk rename to configstore/1.0/default/surfaceflinger.mk diff --git a/configstore/1.1/Android.bp b/configstore/1.1/Android.bp deleted file mode 100644 index f0a174876a..0000000000 --- a/configstore/1.1/Android.bp +++ /dev/null @@ -1,18 +0,0 @@ -// This file is autogenerated by hidl-gen -Landroidbp. - -hidl_interface { - name: "android.hardware.configstore@1.1", - root: "android.hardware", - vndk: { - enabled: true, - }, - srcs: [ - "ISurfaceFlingerConfigs.hal", - ], - interfaces: [ - "android.hardware.configstore@1.0", - "android.hidl.base@1.0", - ], - gen_java: true, -} - diff --git a/configstore/1.1/ISurfaceFlingerConfigs.hal b/configstore/1.1/ISurfaceFlingerConfigs.hal deleted file mode 100644 index 5eacbe00ac..0000000000 --- a/configstore/1.1/ISurfaceFlingerConfigs.hal +++ /dev/null @@ -1,25 +0,0 @@ -/* - * Copyright (C) 2017 The Android Open Source Project - * - * Licensed under the Apache License, Version 2.1 (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.1 - * - * 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.configstore@1.1; - -import @1.0::ISurfaceFlingerConfigs; - -/** - * New revision of ISurfaceFlingerConfigs - */ - -interface ISurfaceFlingerConfigs extends @1.0::ISurfaceFlingerConfigs { -}; diff --git a/configstore/1.1/default/android.hardware.configstore@1.1-service.rc b/configstore/1.1/default/android.hardware.configstore@1.1-service.rc deleted file mode 100644 index 105678acb2..0000000000 --- a/configstore/1.1/default/android.hardware.configstore@1.1-service.rc +++ /dev/null @@ -1,4 +0,0 @@ -service vendor.configstore-hal /vendor/bin/hw/android.hardware.configstore@1.1-service - class hal animation - user system - group system diff --git a/configstore/1.1/vts/functional/Android.bp b/configstore/1.1/vts/functional/Android.bp deleted file mode 100644 index 59beb09caa..0000000000 --- a/configstore/1.1/vts/functional/Android.bp +++ /dev/null @@ -1,26 +0,0 @@ -// -// 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. -// - -cc_test { - name: "VtsHalConfigstoreV1_1TargetTest", - defaults: ["VtsHalTargetTestDefaults"], - srcs: ["VtsHalConfigstoreV1_1TargetTest.cpp"], - static_libs: [ - "android.hardware.configstore@1.0", - "android.hardware.configstore@1.1", - ], -} - diff --git a/configstore/1.1/vts/functional/VtsHalConfigstoreV1_1TargetTest.cpp b/configstore/1.1/vts/functional/VtsHalConfigstoreV1_1TargetTest.cpp deleted file mode 100644 index bd3da4c433..0000000000 --- a/configstore/1.1/vts/functional/VtsHalConfigstoreV1_1TargetTest.cpp +++ /dev/null @@ -1,55 +0,0 @@ -/* - * 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. - */ - -#define LOG_TAG "ConfigstoreHidlHalTest" - -#include -#include -#include -#include -#include - -using ::android::hardware::configstore::V1_1::ISurfaceFlingerConfigs; -using ::android::sp; - -#define ASSERT_OK(ret) ASSERT_TRUE(ret.isOk()) -#define EXPECT_OK(ret) EXPECT_TRUE(ret.isOk()) - -class ConfigstoreHidlTest : public ::testing::VtsHalHidlTargetTestBase { - public: - sp sfConfigs; - - virtual void SetUp() override { - sfConfigs = ::testing::VtsHalHidlTargetTestBase::getService(); - ASSERT_NE(sfConfigs, nullptr); - } - - virtual void TearDown() override {} -}; - -/** - * Placeholder testcase. - */ -TEST_F(ConfigstoreHidlTest, Test) { - ASSERT_TRUE(true); -} - -int main(int argc, char** argv) { - ::testing::InitGoogleTest(&argc, argv); - int status = RUN_ALL_TESTS(); - LOG(INFO) << "Test result = " << status; - return status; -}