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

Commit 35c92268 authored by Ron Shaffer's avatar Ron Shaffer Committed by Steve Kondik
Browse files

Bluetooth: Clear device properties when device is unpaired

Prevents a connect-disconnect-connect when pairing and connecting to a device
that has been unpaired but not rescanned. With this change, only connect
is executed when pairing and connecting.

Change-Id: Ib86844e78f421b27e2fabd9f80691166b4dd5463
CRs-fixed: 232987
parent c6fea2d3
Loading
Loading
Loading
Loading
+8 −1
Original line number Diff line number Diff line
/*
 * Copyright (C) 2008 The Android Open Source Project
 * Copyright (c) 2010, Code Aurora Forum. All rights reserved.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
@@ -1052,7 +1053,13 @@ public class BluetoothService extends IBluetooth.Stub {
        if (!BluetoothAdapter.checkBluetoothAddress(address)) {
            return false;
        }
        return removeDeviceNative(getObjectPathFromAddress(address));

        if (removeDeviceNative(getObjectPathFromAddress(address))) {
            removeRemoteDeviceProperties(address);
            return true;
        }

        return false;
    }

    public synchronized String[] listBonds() {