blob: fdd2ebee00303b311875ca8390080bc4457134c2 [file] [log] [blame]
Wyatt Riley4d3c8e22017-11-07 17:39:29 -08001/*
2 * Copyright (C) 2017 The Android Open Source Project
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17package android.hardware.gnss@1.1;
18
19import @1.0::IGnssCallback;
20
21/**
22 * The interface is required for the HAL to communicate certain information
23 * like status and location info back to the platform, the platform implements
24 * the interfaces and passes a handle to the HAL.
25 */
26interface IGnssCallback extends @1.0::IGnssCallback {
27 /**
28 * Callback to inform framework of the GNSS HAL implementation model & version name.
29 *
30 * This is a user-visible string that identifies the model and version of the GNSS HAL.
31 * For example "ABC Co., Baseband Part 1234, RF Part 567, Software version 3.14.159"
32 *
33 * This must be called in response to IGnss::setCallback
34 *
35 * @param name String providing the name of the GNSS HAL implementation
36 */
37 gnssNameCb(string name);
Yu-Han Yang90a35dc2018-01-22 15:54:51 -080038
39 /**
40 * Callback for requesting Location.
41 *
Yu-Han Yang0e745912018-02-21 13:01:24 -080042 * HAL implementation must call this when it wants the framework to provide locations to assist
43 * with GNSS HAL operation, for example, to assist with time to first fix, error recovery, or to
44 * supplement GNSS location for other clients of the GNSS HAL.
45 *
46 * If a request is made with independentFromGnss set to true, the framework must avoid
47 * providing locations derived from GNSS locations (such as "fused" location), to help improve
48 * information independence for situations such as error recovery.
49 *
50 * In response to this method call, GNSS HAL can expect zero, one, or more calls to
51 * IGnss::injectLocation or IGnss::injectBestLocation, dependent on availability of location
52 * from other sources, which may happen at some arbitrary delay. Generally speaking, HAL
53 * implementations must be able to handle calls to IGnss::injectLocation or
54 * IGnss::injectBestLocation at any time.
Yu-Han Yang90a35dc2018-01-22 15:54:51 -080055 *
56 * @param independentFromGnss True if requesting a location that is independent from GNSS.
57 */
58 gnssRequestLocationCb(bool independentFromGnss);
Wyatt Riley4d3c8e22017-11-07 17:39:29 -080059};