Home | History | Annotate | Download | only in emergency
      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 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 address of the user. */
     33     public static final String KEY_ADDRESS = "address";
     34 
     35     /** Key to store and read the blood type of the user. */
     36     public static final String KEY_BLOOD_TYPE = "blood_type";
     37 
     38     /** Key to store and read the allergies of the user. */
     39     public static final String KEY_ALLERGIES = "allergies";
     40 
     41     /** Key to store and read the medications of the user. */
     42     public static final String KEY_MEDICATIONS = "medications";
     43 
     44     /** Key to store and read the medical conditions of the user. */
     45     public static final String KEY_MEDICAL_CONDITIONS = "medical_conditions";
     46 
     47     /** Key to store and read the organ donor choice of the user. */
     48     public static final String KEY_ORGAN_DONOR = "organ_donor";
     49 
     50     /**
     51      * Keys for all editable emergency info preferences.
     52      *
     53      * <p>Note: Do not change the order of these keys, since the order is used to collect TRON stats
     54      */
     55     public static final String[] KEYS_EDIT_EMERGENCY_INFO = {KEY_NAME, KEY_ADDRESS,
     56             KEY_BLOOD_TYPE, KEY_ALLERGIES, KEY_MEDICATIONS,
     57             KEY_MEDICAL_CONDITIONS, KEY_ORGAN_DONOR};
     58 
     59     /** Keys for all viewable emergency info preferences */
     60     public static final String[] KEYS_VIEW_EMERGENCY_INFO = {KEY_ADDRESS, KEY_BLOOD_TYPE,
     61             KEY_ALLERGIES, KEY_MEDICATIONS, KEY_MEDICAL_CONDITIONS, KEY_ORGAN_DONOR};
     62 }
     63