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

Commit 5e22b4a3 authored by Ashwini Munigala's avatar Ashwini Munigala Committed by Linux Build Service Account
Browse files

MAP: Synchronize notifcationReg reply and MNS connect action.

Synchronize handleRegistration method in handler thread
to ensure setNotificationReg response from MSE is sent before
requesting a MNS Connect to MCE.

CRs-Fixed: 912607
Change-Id: I30559c643af7733754fce551b97e31543a0cb160
parent b753f101
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -195,7 +195,7 @@ public class BluetoothMnsObexClient {
    /**
     * Shutdown the MNS.
     */
    public void shutdown() {
    public synchronized void shutdown() {
        /* should shutdown handler thread first to make sure
         * handleRegistration won't be called when disconnect
         */
@@ -220,7 +220,7 @@ public class BluetoothMnsObexClient {
     * @param masId
     * @param notificationStatus
     */
    public void handleRegistration(int masId, int notificationStatus){
    public synchronized void handleRegistration(int masId, int notificationStatus){
        if(D) Log.d(TAG, "handleRegistration( " + masId + ", " + notificationStatus + ")");
        boolean sendObserverRegistration = true;
        if (notificationStatus == BluetoothMapAppParams.NOTIFICATION_STATUS_NO) {