Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 6dd8bbc6 authored by Anil Admal's avatar Anil Admal Committed by android-build-merger
Browse files

Merge "Reconfigure GNSS HAL NFW proxy app list on GNSS service crash" into qt-dev

am: 2bc56a82

Change-Id: I85337c7e7ee2316bb90a72a9792134a347593895
parents c306592f 2bc56a82
Loading
Loading
Loading
Loading
+8 −13
Original line number Diff line number Diff line
@@ -151,7 +151,6 @@ class GnssVisibilityControl {
    }

    private void handleInitialize() {
        disableNfwLocationAccess(); // Disable until config properties are loaded.
        listenForProxyAppsPackageUpdates();
    }

@@ -261,25 +260,21 @@ class GnssVisibilityControl {
        return false;
    }

    private void handleGpsEnabledChanged(boolean isEnabled) {
        if (DEBUG) Log.d(TAG, "handleGpsEnabledChanged, isEnabled: " + isEnabled);

        if (mIsGpsEnabled == isEnabled) {
            return;
    private void handleGpsEnabledChanged(boolean isGpsEnabled) {
        if (DEBUG) {
            Log.d(TAG, "handleGpsEnabledChanged, mIsGpsEnabled: " + mIsGpsEnabled
                    + ", isGpsEnabled: " + isGpsEnabled);
        }

        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) {
            disableNfwLocationAccess();
            return;
        }

        // When GNSS was disabled, we already set the proxy app list to empty in GNSS HAL.
        // Update only if the proxy app list is not empty.
        String[] locationPermissionEnabledProxyApps = getLocationPermissionEnabledProxyApps();
        if (locationPermissionEnabledProxyApps.length != 0) {
            setNfwLocationAccessProxyAppsInGnssHal(locationPermissionEnabledProxyApps);
        }
        setNfwLocationAccessProxyAppsInGnssHal(getLocationPermissionEnabledProxyApps());
    }

    private void disableNfwLocationAccess() {
+1 −1

File changed.

Contains only whitespace changes.