power: update SDK version for QSSI13.
Update SDK version in PowerHintSession to support QSSI13.
Change-Id: I7b14160f9c536e9d16f7c7b97753d5c53faef5c1
diff --git a/Android.mk b/Android.mk
index 5a6e19b..7e3c79b 100644
--- a/Android.mk
+++ b/Android.mk
@@ -108,7 +108,11 @@
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 3fec48c..c4e9074 100644
--- a/PowerHintSession.cpp
+++ b/PowerHintSession.cpp
@@ -31,6 +31,7 @@
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();
}
@@ -41,3 +42,4 @@
}
return ndk::ScopedAStatus::ok();
}
+#endif
diff --git a/PowerHintSession.h b/PowerHintSession.h
index bdf7428..a56713a 100644
--- a/PowerHintSession.h
+++ b/PowerHintSession.h
@@ -7,8 +7,10 @@
#define __POWERHINTSESSION__
#include <aidl/android/hardware/power/WorkDuration.h>
-#include <aidl/android/hardware/power/SessionHint.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();
@@ -21,7 +23,9 @@
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
diff --git a/power.xml b/power.xml
index b6aa04b..b8c6cba 100644
--- a/power.xml
+++ b/power.xml
@@ -32,7 +32,7 @@
<manifest version="1.0" type="device">
<hal format="aidl">
<name>android.hardware.power</name>
- <version>4</version>
+ <version>3</version>
<fqname>IPower/default</fqname>
</hal>
</manifest>
\ No newline at end of file
diff --git a/vintf/sdk34/power.xml b/vintf/sdk34/power.xml
new file mode 100644
index 0000000..1e08685
--- /dev/null
+++ b/vintf/sdk34/power.xml
@@ -0,0 +1,11 @@
+<!--
+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>4</version>
+ <fqname>IPower/default</fqname>
+ </hal>
+</manifest>
\ No newline at end of file