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

Commit ac1f70bb authored by Jeff Brown's avatar Jeff Brown
Browse files

Use new PowerManager API.

Change-Id: I66165d9954e2d1da9204216382a05a873f1393f4
parent 01eb9792
Loading
Loading
Loading
Loading
+3 −4
Original line number Original line Diff line number Diff line
@@ -30,7 +30,7 @@ namespace android {
// must be kept in sync with IPowerManager.aidl
// must be kept in sync with IPowerManager.aidl
enum {
enum {
    ACQUIRE_WAKE_LOCK = IBinder::FIRST_CALL_TRANSACTION,
    ACQUIRE_WAKE_LOCK = IBinder::FIRST_CALL_TRANSACTION,
    RELEASE_WAKE_LOCK = IBinder::FIRST_CALL_TRANSACTION + 4,
    RELEASE_WAKE_LOCK = IBinder::FIRST_CALL_TRANSACTION + 1,
};
};


class BpPowerManager : public BpInterface<IPowerManager>
class BpPowerManager : public BpInterface<IPowerManager>
@@ -46,11 +46,10 @@ public:
        Parcel data, reply;
        Parcel data, reply;
        data.writeInterfaceToken(IPowerManager::getInterfaceDescriptor());
        data.writeInterfaceToken(IPowerManager::getInterfaceDescriptor());


        data.writeInt32(flags);
        data.writeStrongBinder(lock);
        data.writeStrongBinder(lock);
        data.writeInt32(flags);
        data.writeString16(tag);
        data.writeString16(tag);
        // no WorkSource passed
        data.writeInt32(0); // no WorkSource
        data.writeInt32(0);
        return remote()->transact(ACQUIRE_WAKE_LOCK, data, &reply);
        return remote()->transact(ACQUIRE_WAKE_LOCK, data, &reply);
    }
    }