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

Commit 470c15ab authored by Steven Moreland's avatar Steven Moreland Committed by Automerger Merge Worker
Browse files

Merge "Ignore getService deprecation warning in IServiceManager" am:...

Merge "Ignore getService deprecation warning in IServiceManager" am: 71bf41ef am: abb6f938 am: 42bd0158

Original change: https://android-review.googlesource.com/c/platform/frameworks/native/+/2381613



Change-Id: Idd45313163bab9b7491444278a571ca4690c126e
Signed-off-by: default avatarAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
parents 7c6d0e5b 42bd0158
Loading
Loading
Loading
Loading
+3 −0
Original line number Original line Diff line number Diff line
@@ -198,7 +198,10 @@ status_t getService(const String16& name, sp<INTERFACE>* outService)
{
{
    const sp<IServiceManager> sm = defaultServiceManager();
    const sp<IServiceManager> sm = defaultServiceManager();
    if (sm != nullptr) {
    if (sm != nullptr) {
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
        *outService = interface_cast<INTERFACE>(sm->getService(name));
        *outService = interface_cast<INTERFACE>(sm->getService(name));
#pragma clang diagnostic pop // getService deprecation
        if ((*outService) != nullptr) return NO_ERROR;
        if ((*outService) != nullptr) return NO_ERROR;
    }
    }
    return NAME_NOT_FOUND;
    return NAME_NOT_FOUND;