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

Commit 42b1727b authored by Danny Baumann's avatar Danny Baumann
Browse files

Fix coding style.

Change-Id: I520b16f1c9a927a93d9e1bd4f7e712769d341e58
parent 0eb753d3
Loading
Loading
Loading
Loading
+5 −7
Original line number Diff line number Diff line
@@ -63,8 +63,8 @@ final class CachedBluetoothDevice implements Comparable<CachedBluetoothDevice> {
    private boolean mLocalNapRoleConnected;

    private boolean mVisible;

    private boolean mDeviceRemove;
    // Whether device is unpaired and out of range
    private boolean mRemovable;

    private int mPhonebookPermissionChoice;
    private int mMessagePermissionChoice;
@@ -403,10 +403,9 @@ final class CachedBluetoothDevice implements Comparable<CachedBluetoothDevice> {
    }

    boolean isRemovable () {
        return mDeviceRemove;
        return mRemovable;
    }


    void setVisible(boolean visible) {
        if (mVisible != visible) {
            mVisible = visible;
@@ -415,10 +414,9 @@ final class CachedBluetoothDevice implements Comparable<CachedBluetoothDevice> {
    }

    void setRemovable(boolean removable) {
        mDeviceRemove = removable;
        mRemovable = removable;
    }


    int getBondState() {
        return mDevice.getBondState();
    }
+4 −5
Original line number Diff line number Diff line
@@ -140,7 +140,6 @@ final class CachedBluetoothDeviceManager {
    }

    public synchronized void onDeviceDeleted(CachedBluetoothDevice cachedDevice) {
        Log.d(TAG,"onDeviceDeleted");
        if (cachedDevice != null &&
                cachedDevice.getBondState() == BluetoothDevice.BOND_NONE &&
                cachedDevice.isRemovable()) {
+15 −15
Original line number Diff line number Diff line
@@ -128,13 +128,13 @@ public abstract class DeviceListPreferenceFragment extends
        }
    }

    void removeOorDevices() {
    void removeOutOfRangeDevices() {
        Collection<CachedBluetoothDevice> cachedDevices =
            mLocalManager.getCachedDeviceManager().getCachedDevicesCopy();
        for (CachedBluetoothDevice cachedDevice : cachedDevices) {
            if (cachedDevice.getBondState() == BluetoothDevice.BOND_NONE &&
                    !cachedDevice.isVisible()) {
                 Log.d(TAG, "Device Removed " + cachedDevice);
                Log.d(TAG, "Device " + cachedDevice + " went out of range");
                BluetoothDevicePreference preference = mDevicePreferenceMap.get(cachedDevice);
                if (preference != null) {
                    mDeviceListGroup.removePreference(preference);
@@ -206,8 +206,8 @@ public abstract class DeviceListPreferenceFragment extends
    }

    public void onScanningStateChanged(boolean started) {
        if (started == false) {
          removeOorDevices();
        if (!started) {
            removeOutOfRangeDevices();
        }
        updateProgressUi(started);
    }