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

Commit 61f7cb17 authored by Eino-Ville Talvala's avatar Eino-Ville Talvala Committed by android-build-merger
Browse files

Merge "ActivityManager: Add link/unlinkToDeath" into pi-dev am: 100697d6

am: 4d4c2757

Change-Id: Ic70472fc2b42f7104d682f44d4cffa3625d395aa
parents 4b7c4bc2 4d4c2757
Loading
Loading
Loading
Loading
+16 −0
Original line number Diff line number Diff line
@@ -80,4 +80,20 @@ void ActivityManager::unregisterUidObserver(const sp<IUidObserver>& observer)
    }
}

status_t ActivityManager::linkToDeath(const sp<IBinder::DeathRecipient>& recipient) {
    sp<IActivityManager> service = getService();
    if (service != NULL) {
        return IInterface::asBinder(service)->linkToDeath(recipient);
    }
    return INVALID_OPERATION;
}

status_t ActivityManager::unlinkToDeath(const sp<IBinder::DeathRecipient>& recipient) {
    sp<IActivityManager> service = getService();
    if (service != NULL) {
        return IInterface::asBinder(service)->unlinkToDeath(recipient);
    }
    return INVALID_OPERATION;
}

}; // namespace android
+3 −0
Original line number Diff line number Diff line
@@ -51,6 +51,9 @@ public:
                             const String16& callingPackage);
    void unregisterUidObserver(const sp<IUidObserver>& observer);

    status_t linkToDeath(const sp<IBinder::DeathRecipient>& recipient);
    status_t unlinkToDeath(const sp<IBinder::DeathRecipient>& recipient);

private:
    Mutex mLock;
    sp<IActivityManager> mService;