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

Commit db908541 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Added missing calls to onConnected() and onDisconnected()."

parents f582d6c9 d473ec11
Loading
Loading
Loading
Loading
+25 −2
Original line number Diff line number Diff line
@@ -235,9 +235,20 @@ final class RemoteFillService implements DeathRecipient {
        }
        mBinding = false;
        if (isBound()) {
            // TODO(b/33197203, b/35395043): synchronize access instead
            // Need to double check if it's null, since it could be set on onServiceDisconnected()
            if (mAutoFillService != null) {
                try {
                    mAutoFillService.onDisconnected();
                } catch (Exception e) {
                    Slog.w(LOG_TAG, "Exception calling onDisconnected(): " + e);
                }
            }
            if (mAutoFillService != null) {
                mAutoFillService.asBinder().unlinkToDeath(this, 0);
                mAutoFillService = null;
            }
        }
        mContext.unbindService(mServiceConnection);
    }

@@ -305,6 +316,18 @@ final class RemoteFillService implements DeathRecipient {
                return;
            }

            try {
                // TODO(b/33197203, b/35395043): synchronize access instead
                // Need to double check if it's null, since it could be set on
                // onServiceDisconnected()
                if (mAutoFillService != null) {
                    mAutoFillService.onConnected();
                }
            } catch (RemoteException e) {
                Slog.w(LOG_TAG, "Exception calling onConnected(): " + e);
            }


            if (mPendingRequest != null) {
                handlePendingRequest(mPendingRequest);
            }