Loading android/app/res/values/config.xml +0 −3 Original line number Diff line number Diff line Loading @@ -41,7 +41,4 @@ <integer name="gatt_high_priority_max_interval">12</integer> <integer name="gatt_low_power_min_interval">80</integer> <integer name="gatt_low_power_max_interval">100</integer> <!-- Specifies the component name of the service to be bound to for controlling HF --> <string name="headset_client_controller_service"></string> </resources> android/app/src/com/android/bluetooth/hfpclient/HeadsetClientService.java +0 −33 Original line number Diff line number Diff line Loading @@ -22,27 +22,20 @@ import android.bluetooth.BluetoothProfile; import android.bluetooth.BluetoothHeadsetClient; import android.bluetooth.BluetoothHeadsetClientCall; import android.bluetooth.IBluetoothHeadsetClient; import android.bluetooth.IBluetoothHeadsetClientController; import android.content.BroadcastReceiver; import android.content.ComponentName; import android.content.Context; import android.content.Intent; import android.content.IntentFilter; import android.content.ServiceConnection; import android.media.AudioManager; import android.os.Bundle; import android.os.IBinder; import android.os.Message; import android.provider.Settings; import android.text.TextUtils; import android.util.Log; import com.android.bluetooth.btservice.ProfileService; import com.android.bluetooth.Utils; import java.util.ArrayList; import java.util.List; import com.android.bluetooth.R; /** * Provides Bluetooth Headset Client (HF Role) profile, as a service in the * Bluetooth application. Loading @@ -54,22 +47,8 @@ public class HeadsetClientService extends ProfileService { private static final String TAG = "HeadsetClientService"; private HeadsetClientStateMachine mStateMachine; private static HeadsetClientService sHeadsetClientService; private ServiceConnection mControllerConnection = new ServiceConnection() { @Override public void onServiceConnected(ComponentName componentName, IBinder service) { mStateMachine.setClientController( IBluetoothHeadsetClientController.Stub.asInterface(service)); } @Override public void onServiceDisconnected(ComponentName componentName) { mStateMachine.setClientController(null); } }; @Override protected String getName() { return TAG; Loading @@ -90,18 +69,7 @@ public class HeadsetClientService extends ProfileService { } catch (Exception e) { Log.w(TAG, "Unable to register broadcat receiver", e); } final String controllerComponent = getResources().getString(R.string.headset_client_controller_service); if (!TextUtils.isEmpty(controllerComponent)) { Intent intent = new Intent(); intent.setComponent(ComponentName.unflattenFromString(controllerComponent)); bindService(intent, mControllerConnection, Context.BIND_AUTO_CREATE); } setHeadsetClientService(this); return true; } Loading Loading @@ -583,7 +551,6 @@ public class HeadsetClientService extends ProfileService { if (mStateMachine.isAudioOn()) { return false; } mStateMachine.sendMessage(HeadsetClientStateMachine.CONNECT_AUDIO); return true; } Loading android/app/src/com/android/bluetooth/hfpclient/HeadsetClientStateMachine.java +0 −16 Original line number Diff line number Diff line Loading @@ -40,11 +40,9 @@ import android.bluetooth.BluetoothHeadsetClient; import android.bluetooth.BluetoothHeadsetClientCall; import android.bluetooth.BluetoothProfile; import android.bluetooth.BluetoothUuid; import android.bluetooth.IBluetoothHeadsetClientController; import android.os.Bundle; import android.os.Message; import android.os.ParcelUuid; import android.os.RemoteException; import android.util.Log; import android.util.Pair; import android.content.Context; Loading Loading @@ -142,7 +140,6 @@ final class HeadsetClientStateMachine extends StateMachine { // indicator private Pair<Integer, Object> mPendingAction; private IBluetoothHeadsetClientController mClientController; private final AudioManager mAudioManager; private int mAudioState; private boolean mAudioWbs; Loading @@ -160,10 +157,6 @@ final class HeadsetClientStateMachine extends StateMachine { classInitNative(); } public void setClientController(IBluetoothHeadsetClientController clientController) { mClientController = clientController; } public void dump(StringBuilder sb) { ProfileService.println(sb, "mCurrentDevice: " + mCurrentDevice); ProfileService.println(sb, "mAudioOn: " + mAudioOn); Loading Loading @@ -2023,15 +2016,6 @@ final class HeadsetClientStateMachine extends StateMachine { mAudioWbs = true; // fall through case HeadsetClientHalConstants.AUDIO_STATE_CONNECTED: try { if (mClientController != null && !mClientController.allowAudioConnect()) { sendMessage(HeadsetClientStateMachine.DISCONNECT_AUDIO); break; } } catch (RemoteException remoteException) { Log.e(TAG, "ERROR: couldn't communicate with client controller"); } mAudioState = BluetoothHeadsetClient.STATE_AUDIO_CONNECTED; // request audio focus for call int newAudioMode = AudioManager.MODE_IN_CALL; Loading Loading
android/app/res/values/config.xml +0 −3 Original line number Diff line number Diff line Loading @@ -41,7 +41,4 @@ <integer name="gatt_high_priority_max_interval">12</integer> <integer name="gatt_low_power_min_interval">80</integer> <integer name="gatt_low_power_max_interval">100</integer> <!-- Specifies the component name of the service to be bound to for controlling HF --> <string name="headset_client_controller_service"></string> </resources>
android/app/src/com/android/bluetooth/hfpclient/HeadsetClientService.java +0 −33 Original line number Diff line number Diff line Loading @@ -22,27 +22,20 @@ import android.bluetooth.BluetoothProfile; import android.bluetooth.BluetoothHeadsetClient; import android.bluetooth.BluetoothHeadsetClientCall; import android.bluetooth.IBluetoothHeadsetClient; import android.bluetooth.IBluetoothHeadsetClientController; import android.content.BroadcastReceiver; import android.content.ComponentName; import android.content.Context; import android.content.Intent; import android.content.IntentFilter; import android.content.ServiceConnection; import android.media.AudioManager; import android.os.Bundle; import android.os.IBinder; import android.os.Message; import android.provider.Settings; import android.text.TextUtils; import android.util.Log; import com.android.bluetooth.btservice.ProfileService; import com.android.bluetooth.Utils; import java.util.ArrayList; import java.util.List; import com.android.bluetooth.R; /** * Provides Bluetooth Headset Client (HF Role) profile, as a service in the * Bluetooth application. Loading @@ -54,22 +47,8 @@ public class HeadsetClientService extends ProfileService { private static final String TAG = "HeadsetClientService"; private HeadsetClientStateMachine mStateMachine; private static HeadsetClientService sHeadsetClientService; private ServiceConnection mControllerConnection = new ServiceConnection() { @Override public void onServiceConnected(ComponentName componentName, IBinder service) { mStateMachine.setClientController( IBluetoothHeadsetClientController.Stub.asInterface(service)); } @Override public void onServiceDisconnected(ComponentName componentName) { mStateMachine.setClientController(null); } }; @Override protected String getName() { return TAG; Loading @@ -90,18 +69,7 @@ public class HeadsetClientService extends ProfileService { } catch (Exception e) { Log.w(TAG, "Unable to register broadcat receiver", e); } final String controllerComponent = getResources().getString(R.string.headset_client_controller_service); if (!TextUtils.isEmpty(controllerComponent)) { Intent intent = new Intent(); intent.setComponent(ComponentName.unflattenFromString(controllerComponent)); bindService(intent, mControllerConnection, Context.BIND_AUTO_CREATE); } setHeadsetClientService(this); return true; } Loading Loading @@ -583,7 +551,6 @@ public class HeadsetClientService extends ProfileService { if (mStateMachine.isAudioOn()) { return false; } mStateMachine.sendMessage(HeadsetClientStateMachine.CONNECT_AUDIO); return true; } Loading
android/app/src/com/android/bluetooth/hfpclient/HeadsetClientStateMachine.java +0 −16 Original line number Diff line number Diff line Loading @@ -40,11 +40,9 @@ import android.bluetooth.BluetoothHeadsetClient; import android.bluetooth.BluetoothHeadsetClientCall; import android.bluetooth.BluetoothProfile; import android.bluetooth.BluetoothUuid; import android.bluetooth.IBluetoothHeadsetClientController; import android.os.Bundle; import android.os.Message; import android.os.ParcelUuid; import android.os.RemoteException; import android.util.Log; import android.util.Pair; import android.content.Context; Loading Loading @@ -142,7 +140,6 @@ final class HeadsetClientStateMachine extends StateMachine { // indicator private Pair<Integer, Object> mPendingAction; private IBluetoothHeadsetClientController mClientController; private final AudioManager mAudioManager; private int mAudioState; private boolean mAudioWbs; Loading @@ -160,10 +157,6 @@ final class HeadsetClientStateMachine extends StateMachine { classInitNative(); } public void setClientController(IBluetoothHeadsetClientController clientController) { mClientController = clientController; } public void dump(StringBuilder sb) { ProfileService.println(sb, "mCurrentDevice: " + mCurrentDevice); ProfileService.println(sb, "mAudioOn: " + mAudioOn); Loading Loading @@ -2023,15 +2016,6 @@ final class HeadsetClientStateMachine extends StateMachine { mAudioWbs = true; // fall through case HeadsetClientHalConstants.AUDIO_STATE_CONNECTED: try { if (mClientController != null && !mClientController.allowAudioConnect()) { sendMessage(HeadsetClientStateMachine.DISCONNECT_AUDIO); break; } } catch (RemoteException remoteException) { Log.e(TAG, "ERROR: couldn't communicate with client controller"); } mAudioState = BluetoothHeadsetClient.STATE_AUDIO_CONNECTED; // request audio focus for call int newAudioMode = AudioManager.MODE_IN_CALL; Loading