Home | History | Annotate | Download | only in list
      1 /*
      2  * Copyright (C) 2015 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 com.android.contacts.list;
     18 
     19 /**
     20  * Intent actions related to the Contacts app UI. In the past we decided to store these in a single
     21  * location in order to easily expose them via ContactsContract. We eventually decided
     22  * this wasn't useful.
     23  */
     24 public class UiIntentActions {
     25     /**
     26      * The action for the default contacts list tab.
     27      */
     28     public static final String LIST_DEFAULT =
     29             "com.android.contacts.action.LIST_DEFAULT";
     30 
     31     /**
     32      * The action for the contacts list tab.
     33      */
     34     public static final String LIST_GROUP_ACTION =
     35             "com.android.contacts.action.LIST_GROUP";
     36 
     37     /**
     38      * When in LIST_GROUP_ACTION mode, this is the group to display.
     39      */
     40     public static final String GROUP_NAME_EXTRA_KEY = "com.android.contacts.extra.GROUP";
     41 
     42     /**
     43      * The action for the all contacts list tab.
     44      */
     45     public static final String LIST_ALL_CONTACTS_ACTION =
     46             "com.android.contacts.action.LIST_ALL_CONTACTS";
     47 
     48     /**
     49      * The action for the contacts with phone numbers list tab.
     50      */
     51     public static final String LIST_CONTACTS_WITH_PHONES_ACTION =
     52             "com.android.contacts.action.LIST_CONTACTS_WITH_PHONES";
     53 
     54     /**
     55      * The action for the starred contacts list tab.
     56      */
     57     public static final String LIST_STARRED_ACTION =
     58             "com.android.contacts.action.LIST_STARRED";
     59 
     60     /**
     61      * The action for the frequent contacts list tab.
     62      */
     63     public static final String LIST_FREQUENT_ACTION =
     64             "com.android.contacts.action.LIST_FREQUENT";
     65 
     66     /**
     67      * The action for the "Join Contact" picker.
     68      */
     69     public static final String PICK_JOIN_CONTACT_ACTION =
     70             "com.android.contacts.action.JOIN_CONTACT";
     71 
     72     /**
     73      * The action for the "strequent" contacts list tab. It first lists the starred
     74      * contacts in alphabetical order and then the frequent contacts in descending
     75      * order of the number of times they have been contacted.
     76      */
     77     public static final String LIST_STREQUENT_ACTION =
     78             "com.android.contacts.action.LIST_STREQUENT";
     79 
     80     /**
     81      * A key for to be used as an intent extra to set the activity
     82      * title to a custom String value.
     83      */
     84     public static final String TITLE_EXTRA_KEY =
     85             "com.android.contacts.extra.TITLE_EXTRA";
     86 
     87     /**
     88      * Used as an int extra field in {@link #FILTER_CONTACTS_ACTION}
     89      * intents to supply the text on which to filter.
     90      */
     91     public static final String FILTER_TEXT_EXTRA_KEY =
     92             "com.android.contacts.extra.FILTER_TEXT";
     93 
     94     /**
     95      * Used with JOIN_CONTACT action to set the target for aggregation. This action type
     96      * uses contact ids instead of contact uris for the sake of backwards compatibility.
     97      * <p>
     98      * Type: LONG
     99      */
    100     public static final String TARGET_CONTACT_ID_EXTRA_KEY
    101             = "com.android.contacts.action.CONTACT_ID";
    102 }