DO NOT MERGE: Restoring Network Available Notification to AGnssRil
Adds connectivity notification back for SUPL specific
case, needed esp. for case where WiFi is off and a
general purpose connectivity notification doesn't fire.
Bug: 33350903
Fixes: 33350903
Test: On device GPS-still-works checked, as well as notifications
going into HAL on airplane mode on/off, and SUPL call flows
(Further AGnssRil check to be done by partners)
Change-Id: I02af0b839d0bfd21dfefedff743208e02ab9c2dd
(cherry picked from commit 41f6bcebaf)
This commit is contained in:
committed by
Shreerag Jayakrishnan
parent
16ee12ac68
commit
3656457fac
@@ -464,6 +464,7 @@ public class GnssLocationProvider implements LocationProviderInterface {
|
|||||||
if (mDownloadXtraDataPending == STATE_PENDING_NETWORK) {
|
if (mDownloadXtraDataPending == STATE_PENDING_NETWORK) {
|
||||||
xtraDownloadRequest();
|
xtraDownloadRequest();
|
||||||
}
|
}
|
||||||
|
// Always on, notify HAL so it can get data it needs
|
||||||
sendMessage(UPDATE_NETWORK_STATE, 0 /*arg*/, network);
|
sendMessage(UPDATE_NETWORK_STATE, 0 /*arg*/, network);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -480,6 +481,12 @@ public class GnssLocationProvider implements LocationProviderInterface {
|
|||||||
*/
|
*/
|
||||||
private final ConnectivityManager.NetworkCallback mSuplConnectivityCallback =
|
private final ConnectivityManager.NetworkCallback mSuplConnectivityCallback =
|
||||||
new ConnectivityManager.NetworkCallback() {
|
new ConnectivityManager.NetworkCallback() {
|
||||||
|
@Override
|
||||||
|
public void onAvailable(Network network) {
|
||||||
|
// Specific to a change to a SUPL enabled network becoming ready
|
||||||
|
sendMessage(UPDATE_NETWORK_STATE, 0 /*arg*/, network);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onLost(Network network) {
|
public void onLost(Network network) {
|
||||||
releaseSuplConnection(GPS_RELEASE_AGPS_DATA_CONN);
|
releaseSuplConnection(GPS_RELEASE_AGPS_DATA_CONN);
|
||||||
|
|||||||
Reference in New Issue
Block a user