Loading packages/SettingsLib/src/com/android/settingslib/bluetooth/BluetoothEventManager.java +0 −1 Original line number Original line Diff line number Diff line Loading @@ -386,7 +386,6 @@ public class BluetoothEventManager { case BluetoothDevice.UNBOND_REASON_AUTH_TIMEOUT: case BluetoothDevice.UNBOND_REASON_AUTH_TIMEOUT: case BluetoothDevice.UNBOND_REASON_REPEATED_ATTEMPTS: case BluetoothDevice.UNBOND_REASON_REPEATED_ATTEMPTS: case BluetoothDevice.UNBOND_REASON_REMOTE_AUTH_CANCELED: case BluetoothDevice.UNBOND_REASON_REMOTE_AUTH_CANCELED: case BluetoothDevice.UNBOND_REASON_REMOVED: errorMsg = R.string.bluetooth_pairing_error_message; errorMsg = R.string.bluetooth_pairing_error_message; break; break; default: default: Loading packages/SettingsLib/tests/robotests/src/com/android/settingslib/bluetooth/BluetoothEventManagerTest.java +0 −15 Original line number Original line Diff line number Diff line Loading @@ -352,21 +352,6 @@ public class BluetoothEventManagerTest { assertThat(mCachedDevice2.isActiveDevice(BluetoothProfile.HEARING_AID)).isFalse(); assertThat(mCachedDevice2.isActiveDevice(BluetoothProfile.HEARING_AID)).isFalse(); } } @Test public void showUnbondMessage_reasonRemoved_showCorrectedErrorCode() { mIntent = new Intent(BluetoothDevice.ACTION_BOND_STATE_CHANGED); mIntent.putExtra(BluetoothDevice.EXTRA_DEVICE, mBluetoothDevice); mIntent.putExtra(BluetoothDevice.EXTRA_BOND_STATE, BluetoothDevice.BOND_NONE); mIntent.putExtra(BluetoothDevice.EXTRA_REASON, BluetoothDevice.UNBOND_REASON_REMOVED); when(mCachedDeviceManager.findDevice(mBluetoothDevice)).thenReturn(mCachedDevice1); when(mCachedDevice1.getName()).thenReturn(DEVICE_NAME); mContext.sendBroadcast(mIntent); verify(mErrorListener).onShowError(any(Context.class), eq(DEVICE_NAME), eq(R.string.bluetooth_pairing_error_message)); } @Test @Test public void showUnbondMessage_reasonAuthTimeout_showCorrectedErrorCode() { public void showUnbondMessage_reasonAuthTimeout_showCorrectedErrorCode() { mIntent = new Intent(BluetoothDevice.ACTION_BOND_STATE_CHANGED); mIntent = new Intent(BluetoothDevice.ACTION_BOND_STATE_CHANGED); Loading Loading
packages/SettingsLib/src/com/android/settingslib/bluetooth/BluetoothEventManager.java +0 −1 Original line number Original line Diff line number Diff line Loading @@ -386,7 +386,6 @@ public class BluetoothEventManager { case BluetoothDevice.UNBOND_REASON_AUTH_TIMEOUT: case BluetoothDevice.UNBOND_REASON_AUTH_TIMEOUT: case BluetoothDevice.UNBOND_REASON_REPEATED_ATTEMPTS: case BluetoothDevice.UNBOND_REASON_REPEATED_ATTEMPTS: case BluetoothDevice.UNBOND_REASON_REMOTE_AUTH_CANCELED: case BluetoothDevice.UNBOND_REASON_REMOTE_AUTH_CANCELED: case BluetoothDevice.UNBOND_REASON_REMOVED: errorMsg = R.string.bluetooth_pairing_error_message; errorMsg = R.string.bluetooth_pairing_error_message; break; break; default: default: Loading
packages/SettingsLib/tests/robotests/src/com/android/settingslib/bluetooth/BluetoothEventManagerTest.java +0 −15 Original line number Original line Diff line number Diff line Loading @@ -352,21 +352,6 @@ public class BluetoothEventManagerTest { assertThat(mCachedDevice2.isActiveDevice(BluetoothProfile.HEARING_AID)).isFalse(); assertThat(mCachedDevice2.isActiveDevice(BluetoothProfile.HEARING_AID)).isFalse(); } } @Test public void showUnbondMessage_reasonRemoved_showCorrectedErrorCode() { mIntent = new Intent(BluetoothDevice.ACTION_BOND_STATE_CHANGED); mIntent.putExtra(BluetoothDevice.EXTRA_DEVICE, mBluetoothDevice); mIntent.putExtra(BluetoothDevice.EXTRA_BOND_STATE, BluetoothDevice.BOND_NONE); mIntent.putExtra(BluetoothDevice.EXTRA_REASON, BluetoothDevice.UNBOND_REASON_REMOVED); when(mCachedDeviceManager.findDevice(mBluetoothDevice)).thenReturn(mCachedDevice1); when(mCachedDevice1.getName()).thenReturn(DEVICE_NAME); mContext.sendBroadcast(mIntent); verify(mErrorListener).onShowError(any(Context.class), eq(DEVICE_NAME), eq(R.string.bluetooth_pairing_error_message)); } @Test @Test public void showUnbondMessage_reasonAuthTimeout_showCorrectedErrorCode() { public void showUnbondMessage_reasonAuthTimeout_showCorrectedErrorCode() { mIntent = new Intent(BluetoothDevice.ACTION_BOND_STATE_CHANGED); mIntent = new Intent(BluetoothDevice.ACTION_BOND_STATE_CHANGED); Loading