summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVinay Rijhwani <quic_vrijhwan@quicinc.com>2023-08-01 15:51:32 +0530
committeralk3pInjection <webmaster@raspii.tech>2023-12-31 01:12:53 +0800
commit2bbce5856eda372d7dc28398ca60792985e7212f (patch)
tree03fdd94c0a91d5d0c88b886529ac911f0960ddee
parentfa7c26020441fd1d1c772e38c5febe0c1fdf0636 (diff)
Power: Using only v4 powerhal version for this branchumineko
Using only v4 powerhal version for this branch Change-Id: Iab9bc8c83bb2f052309791aa9f76a8676bddbfd1 Signed-off-by: Vinay Rijhwani <quic_vrijhwan@quicinc.com>
-rw-r--r--Android.mk14
-rw-r--r--PowerHintSession.cpp2
-rw-r--r--PowerHintSession.h6
-rw-r--r--power.xml38
4 files changed, 2 insertions, 58 deletions
diff --git a/Android.mk b/Android.mk
index e5f2f96..f7b8a18 100644
--- a/Android.mk
+++ b/Android.mk
@@ -9,15 +9,7 @@ include $(CLEAR_VARS)
LOCAL_MODULE_RELATIVE_PATH := hw
# KEYSTONE(I1132378f14428bf511f3cea4f419e90a6e89f823,b/181709127)
LOCAL_SHARED_LIBRARIES := liblog libcutils libdl libbase libutils libbinder_ndk
-
-ifeq ($(call math_gt_or_eq, 33, $(PLATFORM_SDK_VERSION)), true)
- LOCAL_SHARED_LIBRARIES += android.hardware.power-V3-ndk
-endif
-ifeq ($(call math_gt_or_eq, 34, $(PLATFORM_SDK_VERSION)), true)
- LOCAL_SHARED_LIBRARIES += android.hardware.power-V4-ndk
-else
- LOCAL_SHARED_LIBRARIES += android.hardware.power-V1-ndk_platform
-endif
+LOCAL_SHARED_LIBRARIES += android.hardware.power-V4-ndk
LOCAL_HEADER_LIBRARIES += libutils_headers
LOCAL_HEADER_LIBRARIES += libhardware_headers
@@ -85,10 +77,6 @@ LOCAL_INIT_RC := android.hardware.power-service.rc
LOCAL_MODULE_TAGS := optional
LOCAL_CFLAGS += -Wno-unused-parameter -Wno-unused-variable
LOCAL_VENDOR_MODULE := true
-ifeq ($(PLATFORM_SDK_VERSION), 34)
LOCAL_VINTF_FRAGMENTS := /vintf/sdk34/power.xml
-else
-LOCAL_VINTF_FRAGMENTS := power.xml
-endif
include $(BUILD_EXECUTABLE)
endif
diff --git a/PowerHintSession.cpp b/PowerHintSession.cpp
index c4e9074..3fec48c 100644
--- a/PowerHintSession.cpp
+++ b/PowerHintSession.cpp
@@ -31,7 +31,6 @@ ndk::ScopedAStatus PowerHintSessionImpl::resume(){
ndk::ScopedAStatus PowerHintSessionImpl::close(){
return ndk::ScopedAStatus::ok();
}
-#if (PLATFORM_SDK_VERSION >= 34)
ndk::ScopedAStatus PowerHintSessionImpl::sendHint(aidl::android::hardware::power::SessionHint hint){
return ndk::ScopedAStatus::ok();
}
@@ -42,4 +41,3 @@ ndk::ScopedAStatus PowerHintSessionImpl::setThreads(const std::vector<int32_t>&
}
return ndk::ScopedAStatus::ok();
}
-#endif
diff --git a/PowerHintSession.h b/PowerHintSession.h
index a56713a..82747c2 100644
--- a/PowerHintSession.h
+++ b/PowerHintSession.h
@@ -8,9 +8,7 @@
#include <aidl/android/hardware/power/WorkDuration.h>
#include <aidl/android/hardware/power/BnPowerHintSession.h>
-#if (PLATFORM_SDK_VERSION >= 34)
#include <aidl/android/hardware/power/SessionHint.h>
-#endif
std::shared_ptr<aidl::android::hardware::power::IPowerHintSession> setPowerHintSession();
int64_t getSessionPreferredRate();
@@ -23,9 +21,7 @@ public:
ndk::ScopedAStatus pause() override;
ndk::ScopedAStatus resume() override;
ndk::ScopedAStatus close() override;
- #if (PLATFORM_SDK_VERSION >= 34)
ndk::ScopedAStatus sendHint(aidl::android::hardware::power::SessionHint hint) override;
ndk::ScopedAStatus setThreads(const std::vector<int32_t>& threadIds) override;
- #endif
};
-#endif /* __POWERHINTSESSION__ */ \ No newline at end of file
+#endif /* __POWERHINTSESSION__ */
diff --git a/power.xml b/power.xml
deleted file mode 100644
index b8c6cba..0000000
--- a/power.xml
+++ /dev/null
@@ -1,38 +0,0 @@
-<!-- Copyright (c) 2020 The Linux Foundation. All rights reserved.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are
-met:
- * Redistributions of source code must retain the above copyright
- notice, this list of conditions and the following disclaimer.
- * Redistributions in binary form must reproduce the above
- copyright notice, this list of conditions and the following
- disclaimer in the documentation and/or other materials provided
- with the distribution.
- * Neither the name of The Linux Foundation nor the names of its
- contributors may be used to endorse or promote products derived
- from this software without specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
-WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
-MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
-ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
-BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
-BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
-WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
-OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
-IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-Changes from Qualcomm Innovation Center are provided under the following license:
-Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved.
-SPDX-License-Identifier: BSD-3-Clause-Clear
--->
-<manifest version="1.0" type="device">
- <hal format="aidl">
- <name>android.hardware.power</name>
- <version>3</version>
- <fqname>IPower/default</fqname>
- </hal>
-</manifest> \ No newline at end of file