summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--java/com/android/incallui/calllocation/impl/LocationHelper.java9
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;
}