Loading packages/SettingsLib/src/com/android/settingslib/bluetooth/LocalBluetoothLeBroadcastMetadata.java +22 −17 Original line number Diff line number Diff line Loading @@ -261,10 +261,12 @@ public class LocalBluetoothLeBroadcastMetadata { Pattern pattern = Pattern.compile(PATTERN_BT_BROADCAST_METADATA); Matcher match = pattern.matcher(qrCodeString); if (match.find()) { try { mSourceAddressType = Integer.parseInt(match.group(MATCH_INDEX_ADDRESS_TYPE)); mSourceDevice = BluetoothAdapter.getDefaultAdapter().getRemoteDevice( match.group(MATCH_INDEX_DEVICE)); mSourceAdvertisingSid = Integer.parseInt(match.group(MATCH_INDEX_ADVERTISING_SID)); mSourceAdvertisingSid = Integer.parseInt( match.group(MATCH_INDEX_ADVERTISING_SID)); mBroadcastId = Integer.parseInt(match.group(MATCH_INDEX_BROADCAST_ID)); mPaSyncInterval = Integer.parseInt(match.group(MATCH_INDEX_SYNC_INTERVAL)); mIsEncrypted = Boolean.valueOf(match.group(MATCH_INDEX_IS_ENCRYPTED)); Loading Loading @@ -296,10 +298,13 @@ public class LocalBluetoothLeBroadcastMetadata { .setPresentationDelayMicros(mPresentationDelayMicros) .addSubgroup(mSubgroup) .build(); } catch (IllegalArgumentException e) { Log.d(TAG, "IllegalArgumentException when convert : " + e); return null; } } else { if (DEBUG) { Log.d(TAG, "The match fail, can not convert it to BluetoothLeBroadcastMetadata."); Log.d(TAG, "The match fail, can not convert it to BluetoothLeBroadcastMetadata."); } return null; } Loading Loading
packages/SettingsLib/src/com/android/settingslib/bluetooth/LocalBluetoothLeBroadcastMetadata.java +22 −17 Original line number Diff line number Diff line Loading @@ -261,10 +261,12 @@ public class LocalBluetoothLeBroadcastMetadata { Pattern pattern = Pattern.compile(PATTERN_BT_BROADCAST_METADATA); Matcher match = pattern.matcher(qrCodeString); if (match.find()) { try { mSourceAddressType = Integer.parseInt(match.group(MATCH_INDEX_ADDRESS_TYPE)); mSourceDevice = BluetoothAdapter.getDefaultAdapter().getRemoteDevice( match.group(MATCH_INDEX_DEVICE)); mSourceAdvertisingSid = Integer.parseInt(match.group(MATCH_INDEX_ADVERTISING_SID)); mSourceAdvertisingSid = Integer.parseInt( match.group(MATCH_INDEX_ADVERTISING_SID)); mBroadcastId = Integer.parseInt(match.group(MATCH_INDEX_BROADCAST_ID)); mPaSyncInterval = Integer.parseInt(match.group(MATCH_INDEX_SYNC_INTERVAL)); mIsEncrypted = Boolean.valueOf(match.group(MATCH_INDEX_IS_ENCRYPTED)); Loading Loading @@ -296,10 +298,13 @@ public class LocalBluetoothLeBroadcastMetadata { .setPresentationDelayMicros(mPresentationDelayMicros) .addSubgroup(mSubgroup) .build(); } catch (IllegalArgumentException e) { Log.d(TAG, "IllegalArgumentException when convert : " + e); return null; } } else { if (DEBUG) { Log.d(TAG, "The match fail, can not convert it to BluetoothLeBroadcastMetadata."); Log.d(TAG, "The match fail, can not convert it to BluetoothLeBroadcastMetadata."); } return null; } Loading