GNSS HAL must be notified correctly when networks disconnect
When a network connection is lost, we cannot reliably get the network connection status information from the method ConnectivityManager.getNetworkInfo(). Sometimes, it returns null and other times it returns network information with incorrect connection status. It is a synchronous method and should not be called from within an async NetworkCallback class method such as onLost(). The GnssLocationProvider class should be modified to maintain the network type and other information of all connected networks reported to GNSS HAL and provide that information to GNSS HAL when a network disconnects so that the GNSS HAL knows which network actually disconnected. The impact of this bug is noted in b/110186412 and b/93175534. Fixes: 110186412 Fixes: 93175534 Test: On a Pixel device, tested XTRA/SUPL download in the following cases: WiFi/Cell OFF on boot 1. WiFi ON only - WiFi ON, Cell ON, Cell OFF 2. Cell ON only - WiFi ON, Cell ON, WiFi OFF 3. Both WiFi/Cell ON - WiFi ON, Cell ON 4. Both WiFi/Cell ON - WiFi ON, Cell ON, Cell OFF, Cell ON 4. Both WiFi/Cell ON - WiFi ON, Cell ON, WiFi OFF, WiFi ON 6. Both WiFi/Cell OFF - WiFi ON, Cell ON, Cell OFF, WiFi OFF 7. And few other sequences. Repeated similar test sequences with WiFi ON and Cell OFF on boot and with WiFi oFF and Cell ON boot. Reviewed the GNSS Framework/HAL log messages to confirm correct connect/disconnect notification to HAL. Observed issue noted in b/64816395. Change-Id: I0db44108b195c6d5c75f8247fe1796951d546e56
Loading
Please register or sign in to comment