Skip to content

Commit 8ab11f8

Browse files
committed
Fix for GPS engines without separate session and engine status events.
GPS_STATUS_SESSION_BEGIN now implies GPS_STATUS_ENGINE_ON and GPS_STATUS_ENGINE_OFF now implies GPS_STATUS_SESSION_END. Change-Id: Ifeeb1d5094d1e7304974b7c3ac27dd83b1e65bca Signed-off-by: Mike Lockwood <lockwood@android.com>
1 parent c2a6738 commit 8ab11f8

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

location/java/com/android/internal/location/GpsLocationProvider.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -885,6 +885,7 @@ private void reportStatus(int status) {
885885
switch (status) {
886886
case GPS_STATUS_SESSION_BEGIN:
887887
mNavigating = true;
888+
mEngineOn = true;
888889
break;
889890
case GPS_STATUS_SESSION_END:
890891
mNavigating = false;
@@ -894,6 +895,7 @@ private void reportStatus(int status) {
894895
break;
895896
case GPS_STATUS_ENGINE_OFF:
896897
mEngineOn = false;
898+
mNavigating = false;
897899
break;
898900
}
899901

0 commit comments

Comments
 (0)