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

Commit bc428861 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Fixes multiuser GNSS Bug." into qt-dev

parents 4a58ec22 037ef9d5
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -966,8 +966,9 @@ public class GnssLocationProvider extends AbstractLocationProvider implements
    }

    private void updateEnabled() {
        // Generally follow location setting
        boolean enabled = mContext.getSystemService(LocationManager.class).isLocationEnabled();
        // Generally follow location setting for current user
        boolean enabled = mContext.getSystemService(LocationManager.class)
                .isLocationEnabledForUser(UserHandle.CURRENT);

        // ... but disable if PowerManager overrides
        enabled &= !mDisableGpsForPowerManager;