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

Commit 9117037d authored by Gopal Krishna Shukla's avatar Gopal Krishna Shukla Committed by Philip P. Moltmann
Browse files

Avoid onServiceDisconnected() for unbind Service

onServiceDisconnected() and unbindLocked() both
are responsible to make mRemoteInstanceas null,
so ensure that the service is not unbinded already
while calling onServiceDisconnected()

Fixes:111631529
Test: Build Successful and device Running.
Change-Id: I505d97e32c4e76f06a358850e91fe189bf02654c
parent 73200d9a
Loading
Loading
Loading
Loading
+4 −2
Original line number Original line Diff line number Diff line
@@ -705,11 +705,13 @@ final class RemotePrintSpooler {
        @Override
        @Override
        public void onServiceDisconnected(ComponentName name) {
        public void onServiceDisconnected(ComponentName name) {
            synchronized (mLock) {
            synchronized (mLock) {
                if (mRemoteInstance != null) {
                    clearClientLocked();
                    clearClientLocked();
                    mRemoteInstance = null;
                    mRemoteInstance = null;
                }
                }
            }
            }
        }
        }
    }


    private static final class GetPrintJobInfosCaller
    private static final class GetPrintJobInfosCaller
            extends TimedRemoteCaller<List<PrintJobInfo>> {
            extends TimedRemoteCaller<List<PrintJobInfo>> {