• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (C) 2016 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 package com.android.emergency;
17 
18 /**
19  * Contains the keys of the preferences used in this app.
20  */
21 public interface PreferenceKeys {
22 
23     /** Key for the medical info preference category in the edit screen. */
24     public static final String KEY_MEDICAL_INFO = "medical_info";
25 
26     /** Key for the medical info preference */
27     public static final String KEY_EDIT_MEDICAL_INFO = "edit_medical_info";
28 
29     /** Key for emergency contacts preference */
30     public static final String KEY_EMERGENCY_CONTACTS = "emergency_contacts";
31 
32     /** Key for the add emergency contact preference */
33     public static final String KEY_ADD_EMERGENCY_CONTACT = "add_emergency_contact";
34 
35     /** Key for emergency name preference */
36     public static final String KEY_NAME = "name";
37 
38     /** Key to store and read the address of the user. */
39     public static final String KEY_ADDRESS = "address";
40 
41     /** Key to store and read the blood type of the user. */
42     public static final String KEY_BLOOD_TYPE = "blood_type";
43 
44     /** Key to store and read the allergies of the user. */
45     public static final String KEY_ALLERGIES = "allergies";
46 
47     /** Key to store and read the medications of the user. */
48     public static final String KEY_MEDICATIONS = "medications";
49 
50     /** Key to store and read the medical conditions of the user. */
51     public static final String KEY_MEDICAL_CONDITIONS = "medical_conditions";
52 
53     /** Key to store and read the organ donor choice of the user. */
54     public static final String KEY_ORGAN_DONOR = "organ_donor";
55 
56     /**
57      * Keys for all editable emergency info preferences.
58      *
59      * <p>Note: Do not change the order of these keys, since the order is used to collect TRON stats
60      */
61     public static final String[] KEYS_EDIT_EMERGENCY_INFO = {KEY_ADDRESS,
62             KEY_BLOOD_TYPE, KEY_ALLERGIES, KEY_MEDICATIONS,
63             KEY_MEDICAL_CONDITIONS, KEY_ORGAN_DONOR};
64 
65     /** Keys for all viewable emergency info preferences */
66     public static final String[] KEYS_VIEW_EMERGENCY_INFO = {KEY_ADDRESS, KEY_BLOOD_TYPE,
67             KEY_ALLERGIES, KEY_MEDICATIONS, KEY_MEDICAL_CONDITIONS, KEY_ORGAN_DONOR};
68 }
69