Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b603e2c8 authored by Daniel Erat's avatar Daniel Erat
Browse files

Update libpowermanager to expose enum and export headers.

Move libpowermanager's transaction ID enum (needed when
implementing BnPowerManager::onTransact()) into
IPowerManager.h and update the library's Android.mk file to
export its headers.

Bug: 22122485
Change-Id: Ie97198c3d2ebe8e880125e19a001ef7162009858
parent f2e53c5e
Loading
Loading
Loading
Loading
+12 −1
Original line number Diff line number Diff line
@@ -25,12 +25,23 @@ namespace android {

// ----------------------------------------------------------------------------

// must be kept in sync with interface defined in IPowerManager.aidl
class IPowerManager : public IInterface
{
public:
    // These transaction IDs must be kept in sync with the method order from
    // IPowerManager.aidl.
    enum {
        ACQUIRE_WAKE_LOCK = IBinder::FIRST_CALL_TRANSACTION,
        ACQUIRE_WAKE_LOCK_UID = IBinder::FIRST_CALL_TRANSACTION + 1,
        RELEASE_WAKE_LOCK = IBinder::FIRST_CALL_TRANSACTION + 2,
        UPDATE_WAKE_LOCK_UIDS = IBinder::FIRST_CALL_TRANSACTION + 3,
        POWER_HINT = IBinder::FIRST_CALL_TRANSACTION + 4,
    };

    DECLARE_META_INTERFACE(PowerManager);

    // The parcels created by these methods must be kept in sync with the
    // corresponding methods from IPowerManager.aidl.
    // FIXME remove the bool isOneWay parameters as they are not oneway in the .aidl
    virtual status_t acquireWakeLock(int flags, const sp<IBinder>& lock, const String16& tag,
            const String16& packageName, bool isOneWay = false) = 0;
+2 −0
Original line number Diff line number Diff line
@@ -14,4 +14,6 @@ LOCAL_MODULE_TAGS := optional

LOCAL_CFLAGS += -Wall -Werror -Wunused -Wunreachable-code

LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH)/../../include

include $(BUILD_SHARED_LIBRARY)
+0 −9
Original line number Diff line number Diff line
@@ -27,15 +27,6 @@

namespace android {

// must be kept in sync with IPowerManager.aidl
enum {
    ACQUIRE_WAKE_LOCK = IBinder::FIRST_CALL_TRANSACTION,
    ACQUIRE_WAKE_LOCK_UID = IBinder::FIRST_CALL_TRANSACTION + 1,
    RELEASE_WAKE_LOCK = IBinder::FIRST_CALL_TRANSACTION + 2,
    UPDATE_WAKE_LOCK_UIDS = IBinder::FIRST_CALL_TRANSACTION + 3,
    POWER_HINT = IBinder::FIRST_CALL_TRANSACTION + 4,
};

class BpPowerManager : public BpInterface<IPowerManager>
{
public: