diff options
| author | 2021-03-15 02:04:40 +0000 | |
|---|---|---|
| committer | 2021-03-15 02:04:40 +0000 | |
| commit | 76186b256ef04cf4e0146c9ce2cd381628eac2f7 (patch) | |
| tree | 208a26723410fc7d51112f5ed008c18946c6dabe | |
| parent | be03858fa68c3d061ee0bf62c8ca1651e473c355 (diff) | |
| parent | 035d65e81b198bd51f38cf9519f54331fa967a26 (diff) | |
Merge "Do not show error toast when received UNBOND_REASON_REMOVED" into sc-dev
2 files changed, 0 insertions, 16 deletions
diff --git a/packages/SettingsLib/src/com/android/settingslib/bluetooth/BluetoothEventManager.java b/packages/SettingsLib/src/com/android/settingslib/bluetooth/BluetoothEventManager.java index 8fd1910041c8..129aca4a689f 100644 --- a/packages/SettingsLib/src/com/android/settingslib/bluetooth/BluetoothEventManager.java +++ b/packages/SettingsLib/src/com/android/settingslib/bluetooth/BluetoothEventManager.java @@ -386,7 +386,6 @@ public class BluetoothEventManager { case BluetoothDevice.UNBOND_REASON_AUTH_TIMEOUT: case BluetoothDevice.UNBOND_REASON_REPEATED_ATTEMPTS: case BluetoothDevice.UNBOND_REASON_REMOTE_AUTH_CANCELED: - case BluetoothDevice.UNBOND_REASON_REMOVED: errorMsg = R.string.bluetooth_pairing_error_message; break; default: diff --git a/packages/SettingsLib/tests/robotests/src/com/android/settingslib/bluetooth/BluetoothEventManagerTest.java b/packages/SettingsLib/tests/robotests/src/com/android/settingslib/bluetooth/BluetoothEventManagerTest.java index 6a4d650ebf31..4bff78f4af2c 100644 --- a/packages/SettingsLib/tests/robotests/src/com/android/settingslib/bluetooth/BluetoothEventManagerTest.java +++ b/packages/SettingsLib/tests/robotests/src/com/android/settingslib/bluetooth/BluetoothEventManagerTest.java @@ -353,21 +353,6 @@ public class BluetoothEventManagerTest { } @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 public void showUnbondMessage_reasonAuthTimeout_showCorrectedErrorCode() { mIntent = new Intent(BluetoothDevice.ACTION_BOND_STATE_CHANGED); mIntent.putExtra(BluetoothDevice.EXTRA_DEVICE, mBluetoothDevice); |