• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1/*
2 * Copyright (C) 2018 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
17syntax = "proto2";
18
19package android.server.location;
20
21option java_outer_classname = "ServerLocationProtoEnums";
22option java_multiple_files = true;
23
24// GPS Signal Quality levels,
25// primarily used by location/java/com/android/internal/location/gnssmetrics/GnssMetrics.java
26enum GpsSignalQualityEnum {
27    GPS_SIGNAL_QUALITY_UNKNOWN = -1;
28    GPS_SIGNAL_QUALITY_POOR = 0;
29    GPS_SIGNAL_QUALITY_GOOD = 1;
30}
31
32// A type which distinguishes different categories of NI request, such as VOICE, UMTS_SUPL etc.
33enum GnssNiType {
34    VOICE = 1;
35    UMTS_SUPL = 2;
36    UMTS_CTRL_PLANE = 3;
37    EMERGENCY_SUPL = 4;
38};
39
40// GNSS NI responses, used to define the response in NI structures.
41enum GnssUserResponseType {
42    RESPONSE_ACCEPT = 1;
43    RESPONSE_DENY = 2;
44    RESPONSE_NORESP = 3;
45};
46
47// GNSS NI data encoding scheme.
48enum GnssNiEncodingType {
49    ENC_NONE = 0;
50    ENC_SUPL_GSM_DEFAULT = 1;
51    ENC_SUPL_UTF8 = 2;
52    ENC_SUPL_UCS2 = 3;
53    ENC_UNKNOWN = -1;
54};
55
56// Protocol stack that initiated the non-framework location request.
57enum NfwProtocolStack {
58    // Cellular control plane requests.
59    CTRL_PLANE = 0;
60    // All types of SUPL requests.
61    SUPL = 1;
62    // All types of requests from IMS.
63    IMS = 10;
64    // All types of requests from SIM.
65    SIM = 11;
66    // Requests from other protocol stacks.
67    OTHER_PROTOCOL_STACK = 100;
68};
69
70// Source initiating/receiving the location information.
71enum NfwRequestor  {
72    // Wireless service provider.
73    CARRIER = 0;
74    // Device manufacturer.
75    OEM = 10;
76    // Modem chipset vendor.
77    MODEM_CHIPSET_VENDOR = 11;
78    // GNSS chipset vendor.
79    GNSS_CHIPSET_VENDOR = 12;
80    // Other chipset vendor.
81    OTHER_CHIPSET_VENDOR = 13;
82    // Automobile client.
83    AUTOMOBILE_CLIENT = 20;
84    // Other sources.
85    OTHER_REQUESTOR = 100;
86};
87
88// Indicates whether location information was provided for this request.
89enum NfwResponseType {
90    // Request rejected because framework has not given permission for this use case.
91    REJECTED = 0;
92    // Request accepted but could not provide location because of a failure.
93    ACCEPTED_NO_LOCATION_PROVIDED = 1;
94    // Request accepted and location provided.
95    ACCEPTED_LOCATION_PROVIDED = 2;
96};
97
98// The SUPL mode.
99enum SuplMode {
100    // Mobile Station Based.
101    MSB = 0x01;
102    // Mobile Station Assisted.
103    MSA = 0x02;
104};
105
106// Enum that hold the bit masks for various LTE Positioning Profile settings (LPP_PROFILE
107// configuration parameter). If none of the bits in the enum are set, the default setting is
108// Radio Resource Location Protocol(RRLP).
109enum LppProfile {
110    // Enable LTE Positioning Protocol user plane.
111    USER_PLANE = 0x01;
112    // Enable LTE Positioning Protocol Control plane.
113    CONTROL_PLANE = 0x02;
114};
115
116// Positioning protocol on A-Glonass system.
117enum GlonassPosProtocol {
118    // Radio Resource Control(RRC) control-plane.
119    RRC_CPLANE = 0x01;
120    // Radio Resource Location user-plane.
121    RRLP_CPLANE = 0x02;
122    // LTE Positioning Protocol User plane.
123    LPP_UPLANE = 0x04;
124};
125
126// Configurations of how GPS functionalities should be locked when user turns off GPS On setting.
127enum GpsLock {
128    // Lock Mobile Originated GPS functionalitues.
129    MO = 0x01;
130    // Lock Network Initiated GPS functionalities.
131    NI = 0x02;
132};
133