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

Commit 045adef5 authored by Hui Wang's avatar Hui Wang
Browse files

Catch exception when unlinkToDeath

Bug: 290192503
Bug: 290210830

Test: atest FrameworksTelephonyTests:GbaManagerTest
Change-Id: Ic1236b119359fa085bf39015cc964e2766dd1928
parent 3c8c1283
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -40,6 +40,7 @@ import com.android.internal.annotations.VisibleForTesting;
import com.android.internal.telephony.metrics.RcsStats;
import com.android.telephony.Rlog;

import java.util.NoSuchElementException;
import java.util.concurrent.ConcurrentLinkedQueue;

/**
@@ -155,7 +156,11 @@ public class GbaManager {

        public synchronized void unlinkToDeath() {
            if (mBinder != null) {
                try {
                    mBinder.unlinkToDeath(this, 0);
                } catch (NoSuchElementException e) {
                    // do nothing
                }
                mBinder = null;
            }
        }