Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 548a8ead authored by Chinmay Dhodapkar's avatar Chinmay Dhodapkar Committed by Android (Google) Code Review
Browse files

Merge "Do not send mock/spoofed location for emergency calls" into udc-dev

parents 37c6ced9 896f5fff
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -89,7 +89,6 @@ public class ConnectionServiceWrapper extends ServiceBinder implements
        ConnectionServiceFocusManager.ConnectionServiceFocus {

    private static final String TELECOM_ABBREVIATION = "cast";

    private CompletableFuture<Pair<Integer, Location>> mQueryLocationFuture = null;
    private @Nullable CancellationSignal mOngoingQueryLocationRequest = null;
    private final ExecutorService mQueryLocationExecutor = Executors.newSingleThreadExecutor();
@@ -1432,7 +1431,11 @@ public class ConnectionServiceWrapper extends ServiceBinder implements
                callback.send(0,
                        getQueryLocationErrorResult(QueryLocationException.ERROR_UNSPECIFIED));
            }
            //make sure we don't pass mock locations diretly, always reset() mock locations
            if (result.second != null) {
                if(result.second.isMock()) {
                    result.second.reset();
                }
                callback.send(1, getQueryLocationResult(result.second));
            } else {
                callback.send(0, getQueryLocationErrorResult(result.first));