power: update the AIDL client ver 3
The AIDL client is updated to use version 3. Change-Id: I6b7e559809629cf59e1359787d5e99fb151ef960
This commit is contained in:
@@ -11,7 +11,7 @@ LOCAL_MODULE_RELATIVE_PATH := hw
|
|||||||
LOCAL_SHARED_LIBRARIES := liblog libcutils libdl libxml2 libbase libutils libbinder_ndk
|
LOCAL_SHARED_LIBRARIES := liblog libcutils libdl libxml2 libbase libutils libbinder_ndk
|
||||||
|
|
||||||
ifeq ($(call math_gt_or_eq, 33, $(PLATFORM_SDK_VERSION)), true)
|
ifeq ($(call math_gt_or_eq, 33, $(PLATFORM_SDK_VERSION)), true)
|
||||||
LOCAL_SHARED_LIBRARIES += android.hardware.power-V1-ndk
|
LOCAL_SHARED_LIBRARIES += android.hardware.power-V3-ndk
|
||||||
else
|
else
|
||||||
LOCAL_SHARED_LIBRARIES += android.hardware.power-V1-ndk_platform
|
LOCAL_SHARED_LIBRARIES += android.hardware.power-V1-ndk_platform
|
||||||
endif
|
endif
|
||||||
|
|||||||
12
Power.cpp
12
Power.cpp
@@ -116,9 +116,19 @@ ndk::ScopedAStatus Power::isBoostSupported(Boost type, bool* _aidl_return) {
|
|||||||
*_aidl_return = false;
|
*_aidl_return = false;
|
||||||
return ndk::ScopedAStatus::ok();
|
return ndk::ScopedAStatus::ok();
|
||||||
}
|
}
|
||||||
|
ndk::ScopedAStatus Power::createHintSession(int32_t, int32_t, const std::vector<int32_t>&, int64_t,
|
||||||
|
std::shared_ptr<IPowerHintSession>* _aidl_return) {
|
||||||
|
*_aidl_return = nullptr;
|
||||||
|
return ndk::ScopedAStatus::fromExceptionCode(EX_UNSUPPORTED_OPERATION);
|
||||||
|
}
|
||||||
|
|
||||||
|
ndk::ScopedAStatus Power::getHintSessionPreferredRate(int64_t* outNanoseconds) {
|
||||||
|
*outNanoseconds = -1;
|
||||||
|
return ndk::ScopedAStatus::fromExceptionCode(EX_UNSUPPORTED_OPERATION);
|
||||||
|
}
|
||||||
|
|
||||||
} // namespace impl
|
} // namespace impl
|
||||||
} // namespace power
|
} // namespace power
|
||||||
} // namespace hardware
|
} // namespace hardware
|
||||||
} // namespace android
|
} // namespace android
|
||||||
} // namespace aidl
|
} // namespace aidl
|
||||||
|
|||||||
5
Power.h
5
Power.h
@@ -48,6 +48,11 @@ class Power : public BnPower {
|
|||||||
ndk::ScopedAStatus isModeSupported(Mode type, bool* _aidl_return) override;
|
ndk::ScopedAStatus isModeSupported(Mode type, bool* _aidl_return) override;
|
||||||
ndk::ScopedAStatus setBoost(Boost type, int32_t durationMs) override;
|
ndk::ScopedAStatus setBoost(Boost type, int32_t durationMs) override;
|
||||||
ndk::ScopedAStatus isBoostSupported(Boost type, bool* _aidl_return) override;
|
ndk::ScopedAStatus isBoostSupported(Boost type, bool* _aidl_return) override;
|
||||||
|
ndk::ScopedAStatus createHintSession(int32_t tgid, int32_t uid,
|
||||||
|
const std::vector<int32_t>& threadIds,
|
||||||
|
int64_t durationNanos,
|
||||||
|
std::shared_ptr<IPowerHintSession>* _aidl_return) override;
|
||||||
|
ndk::ScopedAStatus getHintSessionPreferredRate(int64_t* outNanoseconds) override;
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace impl
|
} // namespace impl
|
||||||
|
|||||||
Reference in New Issue
Block a user