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

Commit 06979d71 authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "MAP: Fix MNS observer sync and sendevent exception issue."

parents 239265ae b09505e4
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -262,8 +262,8 @@ public class BluetoothMapContentObserver {
        Log.d(TAG, "sendEvent: " + evt.eventType + " " + evt.handle + " "
        + evt.folder + " " + evt.oldFolder + " " + evt.msgType.name());

        if (mMnsClient == null) {
            Log.d(TAG, "sendEvent: No MNS client registered - don't send event");
        if (mMnsClient == null || mMnsClient.isConnected() == false) {
            Log.d(TAG, "sendEvent: No MNS client registered or connected- don't send event");
            return;
        }

+6 −4
Original line number Diff line number Diff line
@@ -115,7 +115,7 @@ public class BluetoothMnsObexClient {
        return mConnected;
    }

    public void disconnect() {
    public synchronized void disconnect() {
        if(D) Log.d(TAG, "BluetoothMnsObexClient: disconnect");
        acquireMnsLock();
        try {
@@ -186,12 +186,14 @@ public class BluetoothMnsObexClient {
            /* Connect if we do not have a connection, and start the content observers providing
             * this thread as Handler.
             */
            if(mObserverRegistered == false) {
            synchronized (this) {
                if(mObserverRegistered == false && mObserver != null) {
                    mObserver.registerObserver(this, masId);
                    mObserverRegistered = true;
                }
            }
        }
    }

    public void connect() {
        Log.d(TAG, "handleRegistration: connect 2");