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

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

Merge "Remove duplicate log of BluetoothProfile.ServiceListener"

parents a79bdc0d 97e4b200
Loading
Loading
Loading
Loading
+1 −4
Original line number Original line Diff line number Diff line
@@ -35,7 +35,6 @@ import java.util.List;


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


    private Context mContext;
    private Context mContext;


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


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


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


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


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


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


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


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


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


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


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


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


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