[LeBroadcast] Fix the NullPointerException for launching dialog
Since the BluetoothLeBroadcastMetadata is null, and it causes the NullPointerException. After the system starts broadcast, the framework sends two callbacks, first is onBroadcastStarted, and second one is onBroadcastMetadataChanged. The BluetoothLeBroadcastMetadata object is created before onBroadcastMetadataChanged. Therefore,the app needs to wait the onBroadcastMetadataChanged, and then launchs the broadcast dialog. If the app launchs after the onBroadcastStarted, then the broadcast dialog can't get the null BluetoothLeBroadcastMetadata and it causes UI show the wrong QR code. Bug: 237976782 Test: build pass and manually test Change-Id: I91a28079ae01bbc5cc4c3ce9331741f0b4ee81c0
Loading
Please register or sign in to comment