mirror of
https://github.com/chararomandroid/android_device_samsung_a20
synced 2026-08-21 11:55:31 -04:00
universal7885: Delineageify
Change-Id: I0e2f60bb4ff6c5e095f5e5a57cf4bee9ed0ac2b6 Signed-off-by: SamarV-121 <samarvispute121@pm.me> Signed-off-by: roynatech2544 <whiteshell2544@naver.com>
This commit is contained in:
parent
97a81dec31
commit
ae36727519
6 changed files with 1 additions and 59 deletions
|
|
@ -241,13 +241,4 @@
|
|||
<instance>imsd2</instance>
|
||||
</interface>
|
||||
</hal>
|
||||
<hal format="hidl">
|
||||
<name>vendor.lineage.touch</name>
|
||||
<transport>hwbinder</transport>
|
||||
<version>1.0</version>
|
||||
<interface>
|
||||
<name>IGloveMode</name>
|
||||
<instance>default</instance>
|
||||
</interface>
|
||||
</hal>
|
||||
</manifest>
|
||||
|
|
|
|||
|
|
@ -31,7 +31,6 @@ cc_binary {
|
|||
"libhidlbase",
|
||||
"libutils",
|
||||
"android.hardware.power@1.0",
|
||||
"vendor.lineage.power@1.0",
|
||||
],
|
||||
|
||||
static_libs: ["libc++fs"],
|
||||
|
|
|
|||
|
|
@ -104,13 +104,6 @@ Return<void> Power::powerHint(PowerHint hint, int32_t data) {
|
|||
initialize();
|
||||
}
|
||||
|
||||
/* Bail out if low-power mode is active */
|
||||
if (current_profile == PowerProfile::POWER_SAVE && hint != PowerHint::LOW_POWER &&
|
||||
hint != static_cast<PowerHint>(LineagePowerHint::SET_PROFILE)) {
|
||||
LOG(VERBOSE) << "PROFILE_POWER_SAVE active, ignoring hint " << static_cast<int32_t>(hint);
|
||||
return Void();
|
||||
}
|
||||
|
||||
switch (hint) {
|
||||
case PowerHint::INTERACTION:
|
||||
case PowerHint::LAUNCH:
|
||||
|
|
@ -120,13 +113,6 @@ Return<void> Power::powerHint(PowerHint hint, int32_t data) {
|
|||
setProfile(data ? PowerProfile::POWER_SAVE : PowerProfile::BALANCED);
|
||||
break;
|
||||
default:
|
||||
if (hint == static_cast<PowerHint>(LineagePowerHint::SET_PROFILE)) {
|
||||
setProfile(static_cast<PowerProfile>(data));
|
||||
} else if (hint == static_cast<PowerHint>(LineagePowerHint::CPU_BOOST)) {
|
||||
sendBoost(data);
|
||||
} else {
|
||||
LOG(INFO) << "Unknown power hint: " << static_cast<int32_t>(hint);
|
||||
}
|
||||
break;
|
||||
}
|
||||
return Void();
|
||||
|
|
@ -149,15 +135,6 @@ Return<void> Power::getPlatformLowPowerStats(getPlatformLowPowerStats_cb _hidl_c
|
|||
return Void();
|
||||
}
|
||||
|
||||
Return<int32_t> Power::getFeature(LineageFeature feature) {
|
||||
switch (feature) {
|
||||
case LineageFeature::SUPPORTED_PROFILES:
|
||||
return static_cast<int32_t>(PowerProfile::MAX);
|
||||
default:
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
void Power::initialize() {
|
||||
findInputNodes();
|
||||
|
||||
|
|
|
|||
|
|
@ -20,7 +20,6 @@
|
|||
#include <android/hardware/power/1.0/IPower.h>
|
||||
#include <hidl/MQDescriptor.h>
|
||||
#include <hidl/Status.h>
|
||||
#include <vendor/lineage/power/1.0/ILineagePower.h>
|
||||
|
||||
namespace android {
|
||||
namespace hardware {
|
||||
|
|
@ -36,10 +35,6 @@ using ::android::hardware::hidl_vec;
|
|||
using ::android::hardware::Return;
|
||||
using ::android::hardware::Void;
|
||||
|
||||
using ::vendor::lineage::power::V1_0::ILineagePower;
|
||||
using ::vendor::lineage::power::V1_0::LineageFeature;
|
||||
using ::vendor::lineage::power::V1_0::LineagePowerHint;
|
||||
|
||||
// clang-format off
|
||||
enum PowerProfile {
|
||||
POWER_SAVE = 0,
|
||||
|
|
@ -49,14 +44,12 @@ enum PowerProfile {
|
|||
};
|
||||
// clang-format on
|
||||
|
||||
struct Power : public IPower, public ILineagePower {
|
||||
struct Power : public IPower {
|
||||
Return<void> setInteractive(bool interactive) override;
|
||||
Return<void> powerHint(PowerHint hint, int32_t data) override;
|
||||
Return<void> setFeature(Feature feature, bool activate) override;
|
||||
Return<void> getPlatformLowPowerStats(getPlatformLowPowerStats_cb _hidl_cb) override;
|
||||
|
||||
Return<int32_t> getFeature(LineageFeature feature) override;
|
||||
|
||||
private:
|
||||
void initialize();
|
||||
void findInputNodes();
|
||||
|
|
|
|||
|
|
@ -44,12 +44,6 @@ int main() {
|
|||
goto shutdown;
|
||||
}
|
||||
|
||||
status = power->ILineagePower::registerAsService();
|
||||
if (status != OK) {
|
||||
LOG(ERROR) << "Could not register service (ILineagePower) for Power HAL";
|
||||
goto shutdown;
|
||||
}
|
||||
|
||||
LOG(INFO) << "Power HAL service is Ready.";
|
||||
joinRpcThreadpool();
|
||||
|
||||
|
|
|
|||
|
|
@ -50,10 +50,6 @@ PRODUCT_PACKAGES += \
|
|||
android.hardware.drm@1.0-service \
|
||||
android.hardware.drm@1.3-service.clearkey
|
||||
|
||||
# FastCharge
|
||||
PRODUCT_PACKAGES += \
|
||||
vendor.lineage.fastcharge@1.0-service.samsung
|
||||
|
||||
# Figerprint
|
||||
PRODUCT_PACKAGES += \
|
||||
android.hardware.biometrics.fingerprint@2.1-service.samsung
|
||||
|
|
@ -215,14 +211,6 @@ PRODUCT_PACKAGES += \
|
|||
android.hardware.thermal@1.0-impl \
|
||||
android.hardware.thermal@1.0-service
|
||||
|
||||
# Touch
|
||||
PRODUCT_PACKAGES += \
|
||||
vendor.lineage.touch@1.0-service.samsung
|
||||
|
||||
# Trust HAL
|
||||
PRODUCT_PACKAGES += \
|
||||
vendor.lineage.trust@1.0-service
|
||||
|
||||
# USB
|
||||
PRODUCT_PACKAGES += \
|
||||
android.hardware.usb@1.1-service.typec
|
||||
|
|
|
|||
Loading…
Reference in a new issue