Closed fightyz closed 6 years ago
:exclamation: No coverage uploaded for pull request base (
master@062034b
). Click here to learn what that means. The diff coverage is66.66%
.
@@ Coverage Diff @@
## master #69 +/- ##
=========================================
Coverage ? 66.88%
=========================================
Files ? 31
Lines ? 1075
Branches ? 92
=========================================
Hits ? 719
Misses ? 297
Partials ? 59
Impacted Files | Coverage Δ | |
---|---|---|
...viders/locationprovider/DefaultLocationSource.java | 0% <0%> (ø) |
|
...ders/locationprovider/DefaultLocationProvider.java | 87.76% <100%> (ø) |
Continue to review full report at Codecov.
Legend - Click here to learn more
Δ = absolute <relative> (impact)
,ø = not affected
,? = missing data
Powered by Codecov. Last update 062034b...6231f44. Read the comment docs.
The
onLocationChanged(Location location)
callback is actually called in a thread's looper, which created the LocationManager. So, event if theDefaultLocationProvider.onDestroy()
is done, the message which has the callback, may not be destroyed (because theremoveUpdates(LocationListener listener)
method will call a system service, which is another process), and still in the looper's message queue. At this moment, executingonLocationChanged(Location location)
will cause a Null Point Exception, asgetSourceProvider()
returns null.