Merge "Reconfigure GNSS HAL NFW proxy app list on GNSS service crash" into qt-dev
This commit is contained in:
@@ -151,7 +151,6 @@ class GnssVisibilityControl {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void handleInitialize() {
|
private void handleInitialize() {
|
||||||
disableNfwLocationAccess(); // Disable until config properties are loaded.
|
|
||||||
listenForProxyAppsPackageUpdates();
|
listenForProxyAppsPackageUpdates();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -261,25 +260,21 @@ class GnssVisibilityControl {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void handleGpsEnabledChanged(boolean isEnabled) {
|
private void handleGpsEnabledChanged(boolean isGpsEnabled) {
|
||||||
if (DEBUG) Log.d(TAG, "handleGpsEnabledChanged, isEnabled: " + isEnabled);
|
if (DEBUG) {
|
||||||
|
Log.d(TAG, "handleGpsEnabledChanged, mIsGpsEnabled: " + mIsGpsEnabled
|
||||||
if (mIsGpsEnabled == isEnabled) {
|
+ ", isGpsEnabled: " + isGpsEnabled);
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
mIsGpsEnabled = isEnabled;
|
// The proxy app list in the GNSS HAL needs to be configured if it restarts after
|
||||||
|
// a crash. So, update HAL irrespective of the previous GPS enabled state.
|
||||||
|
mIsGpsEnabled = isGpsEnabled;
|
||||||
if (!mIsGpsEnabled) {
|
if (!mIsGpsEnabled) {
|
||||||
disableNfwLocationAccess();
|
disableNfwLocationAccess();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// When GNSS was disabled, we already set the proxy app list to empty in GNSS HAL.
|
setNfwLocationAccessProxyAppsInGnssHal(getLocationPermissionEnabledProxyApps());
|
||||||
// Update only if the proxy app list is not empty.
|
|
||||||
String[] locationPermissionEnabledProxyApps = getLocationPermissionEnabledProxyApps();
|
|
||||||
if (locationPermissionEnabledProxyApps.length != 0) {
|
|
||||||
setNfwLocationAccessProxyAppsInGnssHal(locationPermissionEnabledProxyApps);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void disableNfwLocationAccess() {
|
private void disableNfwLocationAccess() {
|
||||||
|
|||||||
Reference in New Issue
Block a user