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

Commit 969e5689 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Add log and turn on debug flag"

parents b2e6654b 37dd4f1c
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -35,7 +35,7 @@ public class AvailableMediaBluetoothDeviceUpdater extends BluetoothDeviceUpdater
        implements Preference.OnPreferenceClickListener {

    private static final String TAG = "AvailableMediaBluetoothDeviceUpdater";
    private static final boolean DBG = false;
    private static final boolean DBG = true;

    private final AudioManager mAudioManager;

+6 −0
Original line number Diff line number Diff line
@@ -19,6 +19,7 @@ import android.bluetooth.BluetoothDevice;
import android.content.Context;
import android.os.Bundle;
import android.os.SystemProperties;
import android.util.Log;

import com.android.settings.R;
import com.android.settings.connecteddevice.DevicePreferenceCallback;
@@ -49,6 +50,7 @@ import androidx.preference.Preference;
public abstract class BluetoothDeviceUpdater implements BluetoothCallback,
        LocalBluetoothProfileManager.ServiceListener {
    private static final String TAG = "BluetoothDeviceUpdater";
    private static final boolean DBG = true;
    private static final String BLUETOOTH_SHOW_DEVICES_WITHOUT_NAMES_PROPERTY =
            "persist.bluetooth.showdeviceswithoutnames";

@@ -250,6 +252,10 @@ public abstract class BluetoothDeviceUpdater implements BluetoothCallback,
            return false;
        }
        final BluetoothDevice device = cachedDevice.getDevice();
        if (DBG) {
            Log.d(TAG, "isDeviceConnected() device name : " + cachedDevice.getName() +
                    ", is connected : " + device.isConnected());
        }
        return device.getBondState() == BluetoothDevice.BOND_BONDED && device.isConnected();
    }
}
+1 −1
Original line number Diff line number Diff line
@@ -35,7 +35,7 @@ import androidx.preference.Preference;
public class ConnectedBluetoothDeviceUpdater extends BluetoothDeviceUpdater {

    private static final String TAG = "ConnBluetoothDeviceUpdater";
    private static final boolean DBG = false;
    private static final boolean DBG = true;

    private final AudioManager mAudioManager;

+6 −0
Original line number Diff line number Diff line
@@ -19,6 +19,7 @@ import android.bluetooth.BluetoothDevice;
import android.bluetooth.BluetoothProfile;
import android.content.Context;

import android.util.Log;
import com.android.settings.connecteddevice.DevicePreferenceCallback;
import com.android.settings.dashboard.DashboardFragment;
import com.android.settingslib.bluetooth.CachedBluetoothDevice;
@@ -33,6 +34,7 @@ import androidx.preference.Preference;
public class SavedBluetoothDeviceUpdater extends BluetoothDeviceUpdater
        implements Preference.OnPreferenceClickListener {
    private static final String TAG = "SavedBluetoothDeviceUpdater";
    private static final boolean DBG = true;

    public SavedBluetoothDeviceUpdater(Context context, DashboardFragment fragment,
            DevicePreferenceCallback devicePreferenceCallback) {
@@ -59,6 +61,10 @@ public class SavedBluetoothDeviceUpdater extends BluetoothDeviceUpdater
    @Override
    public boolean isFilterMatched(CachedBluetoothDevice cachedDevice) {
        final BluetoothDevice device = cachedDevice.getDevice();
        if (DBG) {
            Log.d(TAG, "isFilterMatched() device name : " + cachedDevice.getName() +
                    ", is connected : " + device.isConnected());
        }
        return device.getBondState() == BluetoothDevice.BOND_BONDED && !device.isConnected();
    }