Skip to content

Commit

Permalink
Remove vendor.lineage.power references
Browse files Browse the repository at this point in the history
  • Loading branch information
jhenrique09 committed Aug 7, 2018
1 parent 34c7410 commit 3449c93
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 41 deletions.
1 change: 0 additions & 1 deletion Android.mk
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,6 @@ LOCAL_MODULE := [email protected]
LOCAL_INIT_RC := [email protected]
LOCAL_SHARED_LIBRARIES += [email protected]
endif
LOCAL_SHARED_LIBRARIES += [email protected]_vendor
LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_OWNER := qcom
LOCAL_VENDOR_MODULE := true
Expand Down
30 changes: 0 additions & 30 deletions Power.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -236,36 +236,6 @@ Return<void> Power::powerHintAsync(PowerHint hint, int32_t data) {
}
#endif

Return<int32_t> Power::getFeature(LineageFeature feature) {
if (feature == LineageFeature::SUPPORTED_PROFILES) {
return get_number_of_profiles();
}
return -1;
}

status_t Power::registerAsSystemService() {
status_t ret = 0;

ret = IPower::registerAsService();
if (ret != 0) {
ALOGE("Failed to register IPower (%d)", ret);
goto fail;
} else {
ALOGI("Successfully registered IPower");
}

ret = ILineagePower::registerAsService();
if (ret != 0) {
ALOGE("Failed to register ILineagePower (%d)", ret);
goto fail;
} else {
ALOGI("Successfully registered ILineagePower");
}

fail:
return ret;
}

} // namespace implementation
} // namespace V1_0/1
} // namespace power
Expand Down
9 changes: 1 addition & 8 deletions Power.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
#else
#include <android/hardware/power/1.1/IPower.h>
#endif
#include <vendor/lineage/power/1.0/ILineagePower.h>
#include <hidl/MQDescriptor.h>
#include <hidl/Status.h>
#include <hardware/power.h>
Expand All @@ -45,16 +44,13 @@ using ::android::hardware::power::V1_0::IPower;
#else
using ::android::hardware::power::V1_1::IPower;
#endif
using ::vendor::lineage::power::V1_0::ILineagePower;
using ::vendor::lineage::power::V1_0::LineageFeature;
using ::android::hardware::Return;
using ::android::hardware::Void;

struct Power : public IPower, public ILineagePower {
struct Power : public IPower {
// Methods from ::android::hardware::power::V1_0::IPower follow.

Power();
status_t registerAsSystemService();

Return<void> setInteractive(bool interactive) override;
Return<void> powerHint(PowerHint hint, int32_t data) override;
Expand All @@ -67,9 +63,6 @@ struct Power : public IPower, public ILineagePower {
Return<void> powerHintAsync(PowerHint hint, int32_t data) override;
#endif

// Methods from ::vendor::lineage::power::V1_0::ILineagePower follow.
Return<int32_t> getFeature(LineageFeature feature) override;

// Methods from ::android::hidl::base::V1_0::IBase follow.

};
Expand Down
6 changes: 4 additions & 2 deletions service.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,15 +38,17 @@ using android::hardware::joinRpcThreadpool;

// Generated HIDL files
#ifdef V1_0_HAL
using android::hardware::power::V1_0::IPower;
using android::hardware::power::V1_0::implementation::Power;
#else
using android::hardware::power::V1_1::IPower;
using android::hardware::power::V1_1::implementation::Power;
#endif

int main() {

status_t status;
android::sp<Power> service = nullptr;
android::sp<IPower> service = nullptr;

#ifdef V1_0_HAL
ALOGI("Power HAL Service 1.0 for QCOM is starting.");
Expand All @@ -63,7 +65,7 @@ int main() {

configureRpcThreadpool(1, true /*callerWillJoin*/);

status = service->registerAsSystemService();
status = service->registerAsService();
if (status != OK) {
ALOGE("Could not register service for Power HAL Iface (%d).", status);
goto shutdown;
Expand Down

0 comments on commit 3449c93

Please sign in to comment.