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 17 package android.net.wifi.rtt; 18 19 import static java.lang.annotation.RetentionPolicy.SOURCE; 20 21 import android.annotation.IntDef; 22 23 import java.lang.annotation.Retention; 24 25 /** 26 * Civic Address key types used to define address elements. 27 * 28 * <p>These keys can be used with {@code ResponderLocation.toCivicLocationSparseArray()} 29 * to look-up the corresponding string values.</p> 30 */ 31 public class CivicLocationKeys { 32 33 /** 34 * An enumeration of all civic location keys. 35 * 36 * @hide 37 */ 38 @Retention(SOURCE) 39 @IntDef({LANGUAGE, STATE, COUNTY, CITY, BOROUGH, NEIGHBORHOOD, GROUP_OF_STREETS, PRD, POD, STS, 40 HNO, HNS, LMK, LOC, NAM, POSTAL_CODE, BUILDING, APT, FLOOR, ROOM, TYPE_OF_PLACE, PCN, 41 PO_BOX, ADDITIONAL_CODE, DESK, PRIMARY_ROAD_NAME, ROAD_SECTION, BRANCH_ROAD_NAME, 42 SUBBRANCH_ROAD_NAME, STREET_NAME_PRE_MODIFIER, STREET_NAME_POST_MODIFIER, SCRIPT}) 43 public @interface CivicLocationKeysType { 44 } 45 46 /** Language key e.g. i-default. */ 47 public static final int LANGUAGE = 0; 48 /** Category label A1 key e.g. California. */ 49 public static final int STATE = 1; 50 /** Category label A2 key e.g. Marin. */ 51 public static final int COUNTY = 2; 52 /** Category label A3 key e.g. San Francisco. */ 53 public static final int CITY = 3; 54 /** Category label A4 key e.g. Westminster. */ 55 public static final int BOROUGH = 4; 56 /** Category label A5 key e.g. Pacific Heights. */ 57 public static final int NEIGHBORHOOD = 5; 58 /** Category label A6 key e.g. University District. */ 59 public static final int GROUP_OF_STREETS = 6; 60 // 7 - 15 not defined 61 /** Leading Street direction key e.g. N. */ 62 public static final int PRD = 16; 63 /** Trailing street suffix key e.g. SW. */ 64 public static final int POD = 17; 65 /** Street suffix or Type key e.g Ave, Platz. */ 66 public static final int STS = 18; 67 /** House Number key e.g. 123. */ 68 public static final int HNO = 19; 69 /** House number suffix key e.g. A, 1/2. */ 70 public static final int HNS = 20; 71 /** Landmark or vanity address key e.g. Golden Gate Bridge. */ 72 public static final int LMK = 21; 73 /** Additional Location info key e.g. South Wing. */ 74 public static final int LOC = 22; 75 /** Name of residence key e.g. Joe's Barbershop. */ 76 public static final int NAM = 23; 77 /** Postal or ZIP code key e.g. 10027-1234. */ 78 public static final int POSTAL_CODE = 24; 79 /** Building key e.g. Lincoln Library. */ 80 public static final int BUILDING = 25; 81 /** Apartment or suite key e.g. Apt 42. */ 82 public static final int APT = 26; 83 /** Floor key e.g. 4. */ 84 public static final int FLOOR = 27; 85 /** Room key e.g. 450F. */ 86 public static final int ROOM = 28; 87 /** Type of place key e.g. office. */ 88 public static final int TYPE_OF_PLACE = 29; 89 /** Postal community name key e.g. Leonia. */ 90 public static final int PCN = 30; 91 /** Post Office Box key e.g. 12345. */ 92 public static final int PO_BOX = 31; 93 /** Additional Code key e.g. 13203000003. */ 94 public static final int ADDITIONAL_CODE = 32; 95 /** Seat, desk, pole, or cubical key e.g. WS 181. */ 96 public static final int DESK = 33; 97 /** Primary road name key e.g. Shoreline. */ 98 public static final int PRIMARY_ROAD_NAME = 34; 99 /** Road Section key e.g. 14. */ 100 public static final int ROAD_SECTION = 35; 101 /** Branch Rd Name key e.g. Lane 7. */ 102 public static final int BRANCH_ROAD_NAME = 36; 103 /** Subbranch Rd Name key e.g. Alley 8. */ 104 public static final int SUBBRANCH_ROAD_NAME = 37; 105 /** Premodifier key e.g. Old. */ 106 public static final int STREET_NAME_PRE_MODIFIER = 38; 107 /** Postmodifier key e.g. Service. */ 108 public static final int STREET_NAME_POST_MODIFIER = 39; 109 /** Script key e.g. Latn. */ 110 public static final int SCRIPT = 128; 111 112 /** private constructor */ CivicLocationKeys()113 private CivicLocationKeys() {} 114 } 115 116