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

Commit 97e4b200 authored by Chienyuan's avatar Chienyuan
Browse files

Remove duplicate log of BluetoothProfile.ServiceListener

BluetoothProfile will print log when service connected/disconnected, we
don't need to print it at LocalBluetoothProfile.

Bug: 115587413
Test: build pass
Change-Id: Iab3bb5d7a8840264a163ccf9a8f3508679d73b94
parent 6150cc58
Loading
Loading
Loading
Loading
+1 −4
Original line number Diff line number Diff line
@@ -35,7 +35,6 @@ import java.util.List;

public class A2dpProfile implements LocalBluetoothProfile {
    private static final String TAG = "A2dpProfile";
    private static boolean V = false;

    private Context mContext;

@@ -60,7 +59,6 @@ public class A2dpProfile implements LocalBluetoothProfile {
            implements BluetoothProfile.ServiceListener {

        public void onServiceConnected(int profile, BluetoothProfile proxy) {
            if (V) Log.d(TAG,"Bluetooth service connected");
            mService = (BluetoothA2dp) proxy;
            // We just bound to the service, so refresh the UI for any connected A2DP devices.
            List<BluetoothDevice> deviceList = mService.getConnectedDevices();
@@ -79,7 +77,6 @@ public class A2dpProfile implements LocalBluetoothProfile {
        }

        public void onServiceDisconnected(int profile) {
            if (V) Log.d(TAG,"Bluetooth service disconnected");
            mIsProfileReady=false;
        }
    }
@@ -302,7 +299,7 @@ public class A2dpProfile implements LocalBluetoothProfile {
    }

    protected void finalize() {
        if (V) Log.d(TAG, "finalize()");
        Log.d(TAG, "finalize()");
        if (mService != null) {
            try {
                BluetoothAdapter.getDefaultAdapter().closeProfileProxy(BluetoothProfile.A2DP,
+0 −2
Original line number Diff line number Diff line
@@ -55,7 +55,6 @@ final class A2dpSinkProfile implements LocalBluetoothProfile {
            implements BluetoothProfile.ServiceListener {

        public void onServiceConnected(int profile, BluetoothProfile proxy) {
            Log.d(TAG, "Bluetooth service connected");
            mService = (BluetoothA2dpSink) proxy;
            // We just bound to the service, so refresh the UI for any connected A2DP devices.
            List<BluetoothDevice> deviceList = mService.getConnectedDevices();
@@ -74,7 +73,6 @@ final class A2dpSinkProfile implements LocalBluetoothProfile {
        }

        public void onServiceDisconnected(int profile) {
            Log.d(TAG, "Bluetooth service disconnected");
            mIsProfileReady=false;
        }
    }
+0 −2
Original line number Diff line number Diff line
@@ -58,7 +58,6 @@ public class HeadsetProfile implements LocalBluetoothProfile {
            implements BluetoothProfile.ServiceListener {

        public void onServiceConnected(int profile, BluetoothProfile proxy) {
            Log.d(TAG,"Bluetooth service connected");
            mService = (BluetoothHeadset) proxy;
            // We just bound to the service, so refresh the UI for any connected HFP devices.
            List<BluetoothDevice> deviceList = mService.getConnectedDevices();
@@ -80,7 +79,6 @@ public class HeadsetProfile implements LocalBluetoothProfile {
        }

        public void onServiceDisconnected(int profile) {
            Log.d(TAG,"Bluetooth service disconnected");
            mProfileManager.callServiceDisconnectedListeners();
            mIsProfileReady=false;
        }
+1 −3
Original line number Diff line number Diff line
@@ -51,7 +51,6 @@ public class HearingAidProfile implements LocalBluetoothProfile {
            implements BluetoothProfile.ServiceListener {

        public void onServiceConnected(int profile, BluetoothProfile proxy) {
            if (V) Log.d(TAG,"Bluetooth service connected");
            mService = (BluetoothHearingAid) proxy;
            // We just bound to the service, so refresh the UI for any connected HearingAid devices.
            List<BluetoothDevice> deviceList = mService.getConnectedDevices();
@@ -77,7 +76,6 @@ public class HearingAidProfile implements LocalBluetoothProfile {
        }

        public void onServiceDisconnected(int profile) {
            if (V) Log.d(TAG,"Bluetooth service disconnected");
            mIsProfileReady=false;
        }
    }
@@ -234,7 +232,7 @@ public class HearingAidProfile implements LocalBluetoothProfile {
    }

    protected void finalize() {
        if (V) Log.d(TAG, "finalize()");
        Log.d(TAG, "finalize()");
        if (mService != null) {
            try {
                BluetoothAdapter.getDefaultAdapter().closeProfileProxy(BluetoothProfile.HEARING_AID,
+0 −2
Original line number Diff line number Diff line
@@ -59,7 +59,6 @@ final class HfpClientProfile implements LocalBluetoothProfile {

        @Override
        public void onServiceConnected(int profile, BluetoothProfile proxy) {
            Log.d(TAG, "Bluetooth service connected");
            mService = (BluetoothHeadsetClient) proxy;
            // We just bound to the service, so refresh the UI for any connected HFP devices.
            List<BluetoothDevice> deviceList = mService.getConnectedDevices();
@@ -80,7 +79,6 @@ final class HfpClientProfile implements LocalBluetoothProfile {

        @Override
        public void onServiceDisconnected(int profile) {
            Log.d(TAG, "Bluetooth service disconnected");
            mIsProfileReady=false;
        }
    }
Loading