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 contacts list tab.
33      */
34     public static final String LIST_CONTACTS =
35             "com.android.contacts.action.LIST_CONTACTS";
36 
37     /**
38      * The action for selecting multiple items (email, phone) from a list.
39      */
40     public static final String ACTION_SELECT_ITEMS =
41             "com.android.contacts.action.ACTION_SELECT_ITEMS";
42 
43     /**
44      * The action for the contacts list tab.
45      */
46     public static final String LIST_GROUP_ACTION =
47             "com.android.contacts.action.LIST_GROUP";
48 
49     /**
50      * The send scheme for multi email/phone picker fragment
51      */
52     public static final String SELECTION_SEND_SCHEME =
53             "com.android.contacts.extra.SELECTION_SEND_SCHEME";
54 
55     /**
56      * The send title for multi email/phone picker fragment
57      */
58     public static final String SELECTION_SEND_TITLE =
59             "com.android.contacts.extra.SELECTION_SEND_TITLE";
60 
61     /**
62      * The item ids for multi select picker fragment/adapter
63      */
64     public static final String SELECTION_ITEM_LIST =
65             "com.android.contacts.extra.SELECTION_ITEM_LIST";
66 
67     /**
68      * The default selection flags for the multi select picker fragment/adapter
69      */
70     public static final String SELECTION_DEFAULT_SELECTION =
71             "com.android.contacts.extra.SELECTION_DEFAULT_SELECTION";
72 
73     /**
74      * When in LIST_GROUP_ACTION mode, this is the group to display.
75      */
76     public static final String GROUP_NAME_EXTRA_KEY = "com.android.contacts.extra.GROUP";
77 
78     /**
79      * The account name used to filter potential new group members.
80      */
81     public static final String GROUP_ACCOUNT_NAME =
82             "com.android.contacts.extra.GROUP_ACCOUNT_NAME";
83 
84     /**
85      * The account type used to filter potential new group members.
86      */
87     public static final String GROUP_ACCOUNT_TYPE =
88             "com.android.contacts.extra.GROUP_ACCOUNT_TYPE";
89 
90     /**
91      * The account data set used to filter potential new group members.
92      */
93     public static final String GROUP_ACCOUNT_DATA_SET =
94             "com.android.contacts.extra.GROUP_ACCOUNT_DATA_SET";
95 
96     /**
97      * The contact IDs for existing group members.
98      */
99     public static final String GROUP_CONTACT_IDS =
100             "com.android.contacts.extra.GROUP_CONTACT_IDS";
101 
102     /**
103      * The action for the all contacts list tab.
104      */
105     public static final String LIST_ALL_CONTACTS_ACTION =
106             "com.android.contacts.action.LIST_ALL_CONTACTS";
107 
108     /**
109      * The action for the contacts with phone numbers list tab.
110      */
111     public static final String LIST_CONTACTS_WITH_PHONES_ACTION =
112             "com.android.contacts.action.LIST_CONTACTS_WITH_PHONES";
113 
114     /**
115      * The action for the starred contacts list tab.
116      */
117     public static final String LIST_STARRED_ACTION =
118             "com.android.contacts.action.LIST_STARRED";
119 
120     /**
121      * The action for the frequent contacts list tab.
122      */
123     public static final String LIST_FREQUENT_ACTION =
124             "com.android.contacts.action.LIST_FREQUENT";
125 
126     /**
127      * The action for the "Join Contact" picker.
128      */
129     public static final String PICK_JOIN_CONTACT_ACTION =
130             "com.android.contacts.action.JOIN_CONTACT";
131 
132     /**
133      * The action for the "strequent" contacts list tab. It first lists the starred
134      * contacts in alphabetical order and then the frequent contacts in descending
135      * order of the number of times they have been contacted.
136      */
137     public static final String LIST_STREQUENT_ACTION =
138             "com.android.contacts.action.LIST_STREQUENT";
139 
140     /**
141      * A key for to be used as an intent extra to set the activity
142      * title to a custom String value.
143      */
144     public static final String TITLE_EXTRA_KEY =
145             "com.android.contacts.extra.TITLE_EXTRA";
146 
147     /**
148      * Used as an int extra field in {@link #FILTER_CONTACTS_ACTION}
149      * intents to supply the text on which to filter.
150      */
151     public static final String FILTER_TEXT_EXTRA_KEY =
152             "com.android.contacts.extra.FILTER_TEXT";
153 
154     /**
155      * Used with JOIN_CONTACT action to set the target for aggregation. This action type
156      * uses contact ids instead of contact uris for the sake of backwards compatibility.
157      * <p>
158      * Type: LONG
159      */
160     public static final String TARGET_CONTACT_ID_EXTRA_KEY
161             = "com.android.contacts.action.CONTACT_ID";
162 
163     public static final String TARGET_CONTACT_IDS_EXTRA_KEY
164             = "com.android.contacts.action.CONTACT_IDS";
165 }