diff options
author | Android Dialer <noreply@google.com> | 2018-06-26 15:52:43 -0700 |
---|---|---|
committer | android-build-merger <android-build-merger@google.com> | 2018-06-26 15:52:43 -0700 |
commit | aa090388041f4c7c6cdcbb90566c89ed5764a281 (patch) | |
tree | a4ac5d130c90a3cd1808e1957f18d4e2de6869af /java/com/android/incallui/calllocation/impl/LocationHelper.java | |
parent | cb3c124db723031e1d7b945f705cdebe95803d5f (diff) | |
parent | 5a345c0c330b6382fd85e8c6e12cf49af7127ea4 (diff) |
Merge changes I00772405,Id9a6c59d am: 6afea5ae88
am: 5a345c0c33
Change-Id: Ic15b37d8c003588d0617b00e2b6e5be233aada08
Diffstat (limited to 'java/com/android/incallui/calllocation/impl/LocationHelper.java')
-rw-r--r-- | java/com/android/incallui/calllocation/impl/LocationHelper.java | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/java/com/android/incallui/calllocation/impl/LocationHelper.java b/java/com/android/incallui/calllocation/impl/LocationHelper.java index 7fbd60d04..5c105e4c0 100644 --- a/java/com/android/incallui/calllocation/impl/LocationHelper.java +++ b/java/com/android/incallui/calllocation/impl/LocationHelper.java @@ -49,6 +49,7 @@ public class LocationHelper { public static final int LOCATION_STATUS_STALE = 2; public static final int LOCATION_STATUS_INACCURATE = 3; public static final int LOCATION_STATUS_NO_LOCATION = 4; + public static final int LOCATION_STATUS_MOCK = 5; /** Possible return values for {@code checkLocation()} */ @IntDef({ @@ -56,7 +57,8 @@ public class LocationHelper { LOCATION_STATUS_OK, LOCATION_STATUS_STALE, LOCATION_STATUS_INACCURATE, - LOCATION_STATUS_NO_LOCATION + LOCATION_STATUS_NO_LOCATION, + LOCATION_STATUS_MOCK }) @Retention(RetentionPolicy.SOURCE) public @interface LocationStatus {} @@ -118,6 +120,11 @@ public class LocationHelper { return LOCATION_STATUS_INACCURATE; } + if (location.isFromMockProvider()) { + LogUtil.i("LocationHelper.checkLocation", "from mock provider"); + return LOCATION_STATUS_MOCK; + } + return LOCATION_STATUS_OK; } |