Bug:
24877230
Change-Id: I7c342641b87ae6b1fd3623e4436fd985f67e1848
gpsProvider.disable();
}
- FlpHardwareProvider flpHardwareProvider = FlpHardwareProvider.getInstance(mContext);
- if (FlpHardwareProvider.isSupported() && flpHardwareProvider != null) {
+ // 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);
flpHardwareProvider.cleanup();
}
}