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

Commit bb564a28 authored by Nick Pelly's avatar Nick Pelly Committed by The Android Open Source Project
Browse files

Automated import from //branches/master/...@141981,141981

parent 84108d91
Loading
Loading
Loading
Loading
+5 −4
Original line number Diff line number Diff line
@@ -51,6 +51,7 @@ import java.io.UnsupportedEncodingException;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashMap;
import java.util.Iterator;
import java.util.Map;

import com.android.internal.app.IBatteryStats;
@@ -189,14 +190,14 @@ public class BluetoothDeviceService extends IBluetoothDevice.Stub {
        // Remove remoteServiceChannelCallbacks
        HashMap<String, IBluetoothDeviceCallback> callbacksMap =
            mEventLoop.getRemoteServiceChannelCallbacks();
        IBluetoothDeviceCallback callback;

        for (String address : callbacksMap.keySet()) {
            callback = callbacksMap.get(address);
        for (Iterator<String> i = callbacksMap.keySet().iterator(); i.hasNext();) {
            String address = i.next();
            IBluetoothDeviceCallback callback = callbacksMap.get(address);
            try {
                callback.onGetRemoteServiceChannelResult(address, BluetoothError.ERROR_DISABLED);
            } catch (RemoteException e) {}
            callbacksMap.remove(address);
            i.remove();
        }

        // update mode