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

Commit 8d882a2d authored by Raphael Kim's avatar Raphael Kim Committed by Automerger Merge Worker
Browse files

Merge "Move binder death handling logic to ServiceConnector#binderDied()."...

Merge "Move binder death handling logic to ServiceConnector#binderDied()." into tm-dev am: 0bdc2763

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/18585033



Change-Id: I9cd5f94b18339048bb5269e5cc3784c4f228769c
Signed-off-by: default avatarAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
parents dd705aca 0bdc2763
Loading
Loading
Loading
Loading
+11 −1
Original line number Diff line number Diff line
@@ -119,13 +119,23 @@ class CompanionDeviceServiceConnector extends ServiceConnector.Impl<ICompanionDe
        }
    }

    // This method is only called when app is force-closed via settings,
    // but does not handle crashes. Binder death should be handled in #binderDied()
    @Override
    public void onBindingDied(@NonNull ComponentName name) {
        // IMPORTANT: call super!
        // IMPORTANT: call super! this will also invoke binderDied()
        super.onBindingDied(name);

        if (DEBUG) Log.d(TAG, "onBindingDied() " + mComponentName.toShortString());
    }

    @Override
    public void binderDied() {
        super.binderDied();

        if (DEBUG) Log.d(TAG, "binderDied() " + mComponentName.toShortString());

        // Handle primary process being killed
        if (mListener != null) {
            mListener.onBindingDied(mUserId, mComponentName.getPackageName());
        }