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

Commit 2e38507b authored by destradaa's avatar destradaa
Browse files

Fix exception while shutting down FLP HW

Bug: 24877230
Change-Id: I7c342641b87ae6b1fd3623e4436fd985f67e1848
parent 49879ef1
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -341,8 +341,10 @@ public class LocationManagerService extends ILocationManager.Stub {
            gpsProvider.disable();
        }

        // it is needed to check if FLP HW provider is supported before accessing the instance, this
        // avoids an exception to be thrown by the singleton factory method
        if (FlpHardwareProvider.isSupported()) {
            FlpHardwareProvider flpHardwareProvider = FlpHardwareProvider.getInstance(mContext);
        if (FlpHardwareProvider.isSupported() && flpHardwareProvider != null) {
            flpHardwareProvider.cleanup();
        }
    }