Loading packages/SettingsLib/src/com/android/settingslib/bluetooth/BluetoothEventManager.java +0 −5 Original line number Diff line number Diff line Loading @@ -548,11 +548,6 @@ public class BluetoothEventManager { return; } // Avoid to notify Settings UI for Hearing Aid sub device. if (mDeviceManager.isSubDevice(device)) { return; } final String action = intent.getAction(); if (action == null) { Log.w(TAG, "AclStateChangedHandler: action is null"); Loading packages/SettingsLib/tests/robotests/src/com/android/settingslib/bluetooth/BluetoothEventManagerTest.java +0 −26 Original line number Diff line number Diff line Loading @@ -340,32 +340,6 @@ public class BluetoothEventManagerTest { BluetoothAdapter.STATE_CONNECTED); } @Test public void dispatchAclConnectionStateChanged_aclDisconnected_shouldNotCallbackSubDevice() { when(mCachedDeviceManager.isSubDevice(mBluetoothDevice)).thenReturn(true); mBluetoothEventManager.registerCallback(mBluetoothCallback); mIntent = new Intent(BluetoothDevice.ACTION_ACL_DISCONNECTED); mIntent.putExtra(BluetoothDevice.EXTRA_DEVICE, mBluetoothDevice); mContext.sendBroadcast(mIntent); verify(mBluetoothCallback, never()).onAclConnectionStateChanged(mCachedBluetoothDevice, BluetoothAdapter.STATE_DISCONNECTED); } @Test public void dispatchAclConnectionStateChanged_aclConnected_shouldNotCallbackSubDevice() { when(mCachedDeviceManager.isSubDevice(mBluetoothDevice)).thenReturn(true); mBluetoothEventManager.registerCallback(mBluetoothCallback); mIntent = new Intent(BluetoothDevice.ACTION_ACL_CONNECTED); mIntent.putExtra(BluetoothDevice.EXTRA_DEVICE, mBluetoothDevice); mContext.sendBroadcast(mIntent); verify(mBluetoothCallback, never()).onAclConnectionStateChanged(mCachedBluetoothDevice, BluetoothAdapter.STATE_CONNECTED); } @Test public void dispatchAclConnectionStateChanged_aclBeforeDeviceCreation_shouldDispatchCallback() { when(mCachedDeviceManager.findDevice(mBluetoothDevice)).thenReturn(null); Loading Loading
packages/SettingsLib/src/com/android/settingslib/bluetooth/BluetoothEventManager.java +0 −5 Original line number Diff line number Diff line Loading @@ -548,11 +548,6 @@ public class BluetoothEventManager { return; } // Avoid to notify Settings UI for Hearing Aid sub device. if (mDeviceManager.isSubDevice(device)) { return; } final String action = intent.getAction(); if (action == null) { Log.w(TAG, "AclStateChangedHandler: action is null"); Loading
packages/SettingsLib/tests/robotests/src/com/android/settingslib/bluetooth/BluetoothEventManagerTest.java +0 −26 Original line number Diff line number Diff line Loading @@ -340,32 +340,6 @@ public class BluetoothEventManagerTest { BluetoothAdapter.STATE_CONNECTED); } @Test public void dispatchAclConnectionStateChanged_aclDisconnected_shouldNotCallbackSubDevice() { when(mCachedDeviceManager.isSubDevice(mBluetoothDevice)).thenReturn(true); mBluetoothEventManager.registerCallback(mBluetoothCallback); mIntent = new Intent(BluetoothDevice.ACTION_ACL_DISCONNECTED); mIntent.putExtra(BluetoothDevice.EXTRA_DEVICE, mBluetoothDevice); mContext.sendBroadcast(mIntent); verify(mBluetoothCallback, never()).onAclConnectionStateChanged(mCachedBluetoothDevice, BluetoothAdapter.STATE_DISCONNECTED); } @Test public void dispatchAclConnectionStateChanged_aclConnected_shouldNotCallbackSubDevice() { when(mCachedDeviceManager.isSubDevice(mBluetoothDevice)).thenReturn(true); mBluetoothEventManager.registerCallback(mBluetoothCallback); mIntent = new Intent(BluetoothDevice.ACTION_ACL_CONNECTED); mIntent.putExtra(BluetoothDevice.EXTRA_DEVICE, mBluetoothDevice); mContext.sendBroadcast(mIntent); verify(mBluetoothCallback, never()).onAclConnectionStateChanged(mCachedBluetoothDevice, BluetoothAdapter.STATE_CONNECTED); } @Test public void dispatchAclConnectionStateChanged_aclBeforeDeviceCreation_shouldDispatchCallback() { when(mCachedDeviceManager.findDevice(mBluetoothDevice)).thenReturn(null); Loading