PreferenceKeys.java revision c3f3dd28ae32c22f9e4908a8b6c5c4dc925fe429
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 */
16package com.android.emergency;
17
18/**
19 * Contains the keys of the preferences used in this app.
20 */
21public interface PreferenceKeys {
22
23    /** Key for emergency contacts preference */
24    public static final String KEY_EMERGENCY_CONTACTS = "emergency_contacts";
25
26    /** Key for the add contact preference */
27    public static final String KEY_ADD_CONTACT = "add_contact";
28
29    /** Key to store and read the name of the user. */
30    public static final String KEY_NAME = "name";
31
32    /** Key to store and read the date of birth of the user. */
33    public static final String KEY_DATE_OF_BIRTH = "date_of_birth";
34
35    /** Key to store and read the address of the user. */
36    public static final String KEY_ADDRESS = "address";
37
38    /** Key to store and read the blood type of the user. */
39    public static final String KEY_BLOOD_TYPE = "blood_type";
40
41    /** Key to store and read the allergies of the user. */
42    public static final String KEY_ALLERGIES = "allergies";
43
44    /** Key to store and read the medications of the user. */
45    public static final String KEY_MEDICATIONS = "medications";
46
47    /** Key to store and read the medical conditions of the user. */
48    public static final String KEY_MEDICAL_CONDITIONS = "medical_conditions";
49
50    /** Key to store and read the organ donor choice of the user. */
51    public static final String KEY_ORGAN_DONOR = "organ_donor";
52
53    /**
54     * Keys for all editable emergency info preferences.
55     *
56     * <p>Note: Do not change the order of these keys, since the order is used to collect TRON stats
57     */
58    public static final String[] KEYS_EDIT_EMERGENCY_INFO = {KEY_NAME, KEY_ADDRESS,
59            KEY_DATE_OF_BIRTH, KEY_BLOOD_TYPE, KEY_ALLERGIES, KEY_MEDICATIONS,
60            KEY_MEDICAL_CONDITIONS, KEY_ORGAN_DONOR};
61
62    /** Keys for all viewable emergency info preferences */
63    public static final String[] KEYS_VIEW_EMERGENCY_INFO = {KEY_ADDRESS, KEY_BLOOD_TYPE,
64            KEY_ALLERGIES, KEY_MEDICATIONS, KEY_MEDICAL_CONDITIONS, KEY_ORGAN_DONOR};
65}
66