Use default locale when formatting passkey

Bug: 332677725
Test: atest BluetoothPairingControllerTest
Change-Id: I21d6606e71eefd2f00994993d3ed277742c5f9b0
This commit is contained in:
Haijie Hong
2024-04-09 14:19:13 +08:00
parent 91b9b1f65a
commit 04404a37c7

View File

@@ -448,7 +448,7 @@ public class BluetoothPairingController implements OnCheckedChangeListener,
switch (mType) {
case BluetoothDevice.PAIRING_VARIANT_PASSKEY_CONFIRMATION:
case BluetoothDevice.PAIRING_VARIANT_DISPLAY_PASSKEY:
return String.format(Locale.US, "%06d", passkey);
return String.format(Locale.getDefault(), "%06d", passkey);
case BluetoothDevice.PAIRING_VARIANT_DISPLAY_PIN:
return String.format("%04d", passkey);