1d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd/* 2d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd * Copyright (C) 2015 The Android Open Source Project 3d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd * 4d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd * Licensed under the Apache License, Version 2.0 (the "License"); 5d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd * you may not use this file except in compliance with the License. 6d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd * You may obtain a copy of the License at 7d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd * 8d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd * http://www.apache.org/licenses/LICENSE-2.0 9d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd * 10d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd * Unless required by applicable law or agreed to in writing, software 11d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd * distributed under the License is distributed on an "AS IS" BASIS, 12d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd * See the License for the specific language governing permissions and 14d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd * limitations under the License. 15d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd */ 16d3b009ae55651f1e60950342468e3c37fdeb0796Mike Doddpackage com.android.messaging.ui; 17d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd 18d3b009ae55651f1e60950342468e3c37fdeb0796Mike Doddimport android.app.Activity; 19d3b009ae55651f1e60950342468e3c37fdeb0796Mike Doddimport android.app.Fragment; 20d3b009ae55651f1e60950342468e3c37fdeb0796Mike Doddimport android.app.PendingIntent; 21d3b009ae55651f1e60950342468e3c37fdeb0796Mike Doddimport android.content.ContentValues; 22d3b009ae55651f1e60950342468e3c37fdeb0796Mike Doddimport android.content.Context; 23d3b009ae55651f1e60950342468e3c37fdeb0796Mike Doddimport android.content.Intent; 24d3b009ae55651f1e60950342468e3c37fdeb0796Mike Doddimport android.graphics.Point; 25d3b009ae55651f1e60950342468e3c37fdeb0796Mike Doddimport android.graphics.Rect; 26d3b009ae55651f1e60950342468e3c37fdeb0796Mike Doddimport android.net.Uri; 27d3b009ae55651f1e60950342468e3c37fdeb0796Mike Doddimport android.os.Bundle; 28d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd 29d3b009ae55651f1e60950342468e3c37fdeb0796Mike Doddimport com.android.messaging.Factory; 30d3b009ae55651f1e60950342468e3c37fdeb0796Mike Doddimport com.android.messaging.datamodel.data.MessageData; 31d3b009ae55651f1e60950342468e3c37fdeb0796Mike Doddimport com.android.messaging.util.ConversationIdSet; 32d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd 33d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd/** 34d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd * A central repository of Intents used to start activities. 35d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd */ 36d3b009ae55651f1e60950342468e3c37fdeb0796Mike Doddpublic abstract class UIIntents { 37d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd public static UIIntents get() { 38d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd return Factory.get().getUIIntents(); 39d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd } 40d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd 41d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd // Intent extras 42d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd public static final String UI_INTENT_EXTRA_CONVERSATION_ID = "conversation_id"; 43d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd 44d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd // Sending draft data (from share intent / message forwarding) to the ConversationActivity. 45d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd public static final String UI_INTENT_EXTRA_DRAFT_DATA = "draft_data"; 46d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd 47d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd // The request code for picking image from the Document picker. 48d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd public static final int REQUEST_PICK_IMAGE_FROM_DOCUMENT_PICKER = 1400; 49d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd 50d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd // Indicates what type of notification this applies to (See BugleNotifications: 51d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd // UPDATE_NONE, UPDATE_MESSAGES, UPDATE_ERRORS, UPDATE_ALL) 52d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd public static final String UI_INTENT_EXTRA_NOTIFICATIONS_UPDATE = "notifications_update"; 53d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd 54d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd // Pass a set of conversation id's. 55d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd public static final String UI_INTENT_EXTRA_CONVERSATION_ID_SET = "conversation_id_set"; 56d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd 57d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd // Sending class zero message to its activity 58d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd public static final String UI_INTENT_EXTRA_MESSAGE_VALUES = "message_values"; 59d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd 60d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd // For the widget to go to the ConversationList from the Conversation. 61d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd public static final String UI_INTENT_EXTRA_GOTO_CONVERSATION_LIST = "goto_conv_list"; 62d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd 63d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd // Indicates whether a conversation is launched with custom transition. 64d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd public static final String UI_INTENT_EXTRA_WITH_CUSTOM_TRANSITION = "with_custom_transition"; 65d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd 66d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd public static final String ACTION_RESET_NOTIFICATIONS = 67d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd "com.android.messaging.reset_notifications"; 68d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd 69d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd // Sending VCard uri to VCard detail activity 70d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd public static final String UI_INTENT_EXTRA_VCARD_URI = "vcard_uri"; 71d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd 72d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd public static final String CMAS_COMPONENT = "com.android.cellbroadcastreceiver"; 73d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd 74d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd // Intent action for local broadcast receiver for conversation self id change. 75d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd public static final String CONVERSATION_SELF_ID_CHANGE_BROADCAST_ACTION = 76d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd "conversation_self_id_change"; 77d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd 78d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd // Conversation self id 79d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd public static final String UI_INTENT_EXTRA_CONVERSATION_SELF_ID = "conversation_self_id"; 80d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd 81d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd // For opening an APN editor on a particular row in the apn database. 82d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd public static final String UI_INTENT_EXTRA_APN_ROW_ID = "apn_row_id"; 83d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd 84d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd // Subscription id 85d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd public static final String UI_INTENT_EXTRA_SUB_ID = "sub_id"; 86d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd 87d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd // Per-Subscription setting activity title 88d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd public static final String UI_INTENT_EXTRA_PER_SUBSCRIPTION_SETTING_TITLE = 89d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd "per_sub_setting_title"; 90d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd 91d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd // Is application settings launched as the top level settings activity? 92d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd public static final String UI_INTENT_EXTRA_TOP_LEVEL_SETTINGS = "top_level_settings"; 93d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd 94d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd // Sending attachment uri from widget 95d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd public static final String UI_INTENT_EXTRA_ATTACHMENT_URI = "attachment_uri"; 96d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd 97d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd // Sending attachment content type from widget 98d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd public static final String UI_INTENT_EXTRA_ATTACHMENT_TYPE = "attachment_type"; 99d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd 100d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd public static final String ACTION_WIDGET_CONVERSATION = 101d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd "com.android.messaging.widget_conversation:"; 102d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd 103d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd public static final String UI_INTENT_EXTRA_REQUIRES_MMS = "requires_mms"; 104d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd 105d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd public static final String UI_INTENT_EXTRA_SELF_ID = "self_id"; 106d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd 107d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd // Message position to scroll to. 108d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd public static final String UI_INTENT_EXTRA_MESSAGE_POSITION = "message_position"; 109d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd 110d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd /** 111d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd * Launch the permission check activity 112d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd */ 113d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd public abstract void launchPermissionCheckActivity(final Context context); 114d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd 115d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd public abstract void launchConversationListActivity(final Context context); 116d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd 117d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd /** 118d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd * Launch an activity to show a conversation. This method by default provides no additional 119d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd * activity options. 120d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd */ 121d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd public void launchConversationActivity(final Context context, 122d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd final String conversationId, final MessageData draft) { 123d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd launchConversationActivity(context, conversationId, draft, null, 124d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd false /* withCustomTransition */); 125d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd } 126d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd 127d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd /** 128d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd * Launch an activity to show a conversation. 129d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd */ 130d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd public abstract void launchConversationActivity(final Context context, 131d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd final String conversationId, final MessageData draft, final Bundle activityOptions, 132d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd final boolean withCustomTransition); 133d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd 134d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd 135d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd /** 136d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd * Launch an activity to show conversation with conversation list in back stack. 137d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd */ 138d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd public abstract void launchConversationActivityWithParentStack(Context context, 139d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd String conversationId, String smsBody); 140d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd 141d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd /** 142d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd * Launch an activity to show a conversation as a new task. 143d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd */ 144d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd public abstract void launchConversationActivityNewTask(final Context context, 145d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd final String conversationId); 146d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd 147d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd /** 148d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd * Launch an activity to start a new conversation 149d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd */ 150d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd public abstract void launchCreateNewConversationActivity(final Context context, 151d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd final MessageData draft); 152d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd 153d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd /** 154d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd * Launch debug activity to set MMS config options. 155d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd */ 156d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd public abstract void launchDebugMmsConfigActivity(final Context context); 157d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd 158d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd /** 159d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd * Launch an activity to change settings. 160d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd */ 161d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd public abstract void launchSettingsActivity(final Context context); 162d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd 163d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd /** 164d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd * Launch an activity to add a contact with a given destination. 165d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd */ 166d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd public abstract void launchAddContactActivity(final Context context, final String destination); 167d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd 168d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd /** 169d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd * Launch an activity to show the document picker to pick an image. 170d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd * @param fragment the requesting fragment 171d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd */ 172d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd public abstract void launchDocumentImagePicker(final Fragment fragment); 173d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd 174d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd /** 175d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd * Launch an activity to show people & options for a given conversation. 176d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd */ 177d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd public abstract void launchPeopleAndOptionsActivity(final Activity context, 178d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd final String conversationId); 179d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd 180d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd /** 181d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd * Launch an external activity to handle a phone call 182d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd * @param phoneNumber the phone number to call 183d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd * @param clickPosition is the location tapped to start this launch for transition use 184d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd */ 185d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd public abstract void launchPhoneCallActivity(final Context context, final String phoneNumber, 186d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd final Point clickPosition); 187d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd 188d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd /** 189d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd * Launch an activity to show archived conversations. 190d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd */ 191d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd public abstract void launchArchivedConversationsActivity(final Context context); 192d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd 193d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd /** 194d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd * Launch an activity to show blocked participants. 195d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd */ 196d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd public abstract void launchBlockedParticipantsActivity(final Context context); 197d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd 198d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd /** 199d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd * Launch an activity to show a class zero message 200d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd */ 201d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd public abstract void launchClassZeroActivity(Context context, ContentValues messageValues); 202d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd 203d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd /** 204d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd * Launch an activity to let the user forward a message 205d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd */ 206d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd public abstract void launchForwardMessageActivity(Context context, MessageData message); 207d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd 208d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd /** 209d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd * Launch an activity to show details for a VCard 210d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd */ 211d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd public abstract void launchVCardDetailActivity(Context context, Uri vcardUri); 212d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd 213d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd /** 214d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd * Launch an external activity that handles the intent to add VCard to contacts 215d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd */ 216d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd public abstract void launchSaveVCardToContactsActivity(Context context, Uri vcardUri); 217d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd 218d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd /** 219d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd * Launch an activity to let the user select & unselect the list of attachments to send. 220d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd */ 221d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd public abstract void launchAttachmentChooserActivity(final Activity activity, 222d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd final String conversationId, final int requestCode); 223d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd 224d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd /** 225d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd * Launch full screen video viewer. 226d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd */ 227d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd public abstract void launchFullScreenVideoViewer(Context context, Uri videoUri); 228d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd 229d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd /** 230d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd * Launch full screen photo viewer. 231d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd */ 232d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd public abstract void launchFullScreenPhotoViewer(Activity activity, Uri initialPhoto, 233d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd Rect initialPhotoBounds, Uri photosUri); 234d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd 235d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd /** 236d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd * Launch an activity to show general app settings 237d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd * @param topLevel indicates whether the app settings is launched as the top-level settings 238d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd * activity (instead of SettingsActivity which shows a collapsed view of the app 239d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd * settings + one settings item per subscription). This is true when there's only one 240d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd * active SIM in the system so we can show this activity directly. 241d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd */ 242d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd public abstract void launchApplicationSettingsActivity(Context context, boolean topLevel); 243d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd 244d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd /** 245d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd * Launch an activity to show per-subscription settings 246d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd */ 247d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd public abstract void launchPerSubscriptionSettingsActivity(Context context, int subId, 248d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd String settingTitle); 249d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd 250d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd /** 251d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd * Get a ACTION_VIEW intent 252d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd * @param url display the data in the url to users 253d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd */ 254d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd public abstract Intent getViewUrlIntent(final String url); 255d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd 256d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd /** 257d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd * Get an intent to launch the ringtone picker 258d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd * @param title the title to show in the ringtone picker 259d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd * @param existingUri the currently set uri 260d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd * @param defaultUri the default uri if none is currently set 261d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd * @param toneType type of ringtone to pick, maybe any of RingtoneManager.TYPE_* 262d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd */ 263d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd public abstract Intent getRingtonePickerIntent(final String title, final Uri existingUri, 264d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd final Uri defaultUri, final int toneType); 265d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd 266d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd /** 267d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd * Get an intent to launch the wireless alert viewer. 268d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd */ 269d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd public abstract Intent getWirelessAlertsIntent(); 270d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd 271d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd /** 272d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd * Get an intent to launch the dialog for changing the default SMS App. 273d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd */ 274d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd public abstract Intent getChangeDefaultSmsAppIntent(final Activity activity); 275d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd 276d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd /** 277d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd * Broadcast conversation self id change so it may be reflected in the message compose UI. 278d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd */ 279d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd public abstract void broadcastConversationSelfIdChange(final Context context, 280d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd final String conversationId, final String conversationSelfId); 281d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd 282d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd /** 283d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd * Get a PendingIntent for starting conversation list from notifications. 284d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd */ 285d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd public abstract PendingIntent getPendingIntentForConversationListActivity( 286d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd final Context context); 287d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd 288d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd /** 289d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd * Get a PendingIntent for starting conversation list from widget. 290d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd */ 291d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd public abstract PendingIntent getWidgetPendingIntentForConversationListActivity( 292d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd final Context context); 293d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd 294d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd /** 295d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd * Get a PendingIntent for showing a conversation from notifications. 296d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd */ 297d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd public abstract PendingIntent getPendingIntentForConversationActivity(final Context context, 298d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd final String conversationId, final MessageData draft); 299d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd 300d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd /** 301d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd * Get an Intent for showing a conversation from the widget. 302d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd */ 303d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd public abstract Intent getIntentForConversationActivity(final Context context, 304d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd final String conversationId, final MessageData draft); 305d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd 306d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd /** 307d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd * Get a PendingIntent for sending a message to a conversation, without opening the Bugle UI. 308d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd * 309d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd * <p>This is intended to be used by the Android Wear companion app when sending transcribed 310d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd * voice replies. 311d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd */ 312d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd public abstract PendingIntent getPendingIntentForSendingMessageToConversation( 313d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd final Context context, final String conversationId, final String selfId, 314d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd final boolean requiresMms, final int requestCode); 315d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd 316d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd /** 317d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd * Get a PendingIntent for clearing notifications. 318d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd * 319d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd * <p>This is intended to be used by notifications. 320d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd */ 321d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd public abstract PendingIntent getPendingIntentForClearingNotifications(final Context context, 322d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd final int updateTargets, final ConversationIdSet conversationIdSet, 323d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd final int requestCode); 324d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd 325d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd /** 326d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd * Get a PendingIntent for showing low storage notifications. 327d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd */ 328d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd public abstract PendingIntent getPendingIntentForLowStorageNotifications(final Context context); 329d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd 330d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd /** 331d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd * Get a PendingIntent for showing a new message to a secondary user. 332d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd */ 333d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd public abstract PendingIntent getPendingIntentForSecondaryUserNewMessageNotification( 334d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd final Context context); 335d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd 336d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd /** 337d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd * Get an intent for showing the APN editor. 338d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd */ 339d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd public abstract Intent getApnEditorIntent(final Context context, final String rowId, int subId); 340d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd 341d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd /** 342d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd * Get an intent for showing the APN settings. 343d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd */ 344d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd public abstract Intent getApnSettingsIntent(final Context context, final int subId); 345d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd 346d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd /** 347d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd * Get an intent for showing advanced settings. 348d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd */ 349d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd public abstract Intent getAdvancedSettingsIntent(final Context context); 350d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd 351d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd /** 352d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd * Get an intent for the LaunchConversationActivity. 353d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd */ 354d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd public abstract Intent getLaunchConversationActivityIntent(final Context context); 355d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd 356d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd /** 357d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd * Tell MediaScanner to re-scan the specified volume. 358d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd */ 359d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd public abstract void kickMediaScanner(final Context context, final String volume); 360d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd 361d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd /** 362d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd * Launch to browser for a url. 363d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd */ 364d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd public abstract void launchBrowserForUrl(final Context context, final String url); 365d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd 366d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd /** 367d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd * Get a PendingIntent for the widget conversation template. 368d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd */ 369d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd public abstract PendingIntent getWidgetPendingIntentForConversationActivity( 370d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd final Context context, final String conversationId, final int requestCode); 371d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd 372d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd /** 373d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd * Get a PendingIntent for the conversation widget configuration activity template. 374d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd */ 375d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd public abstract PendingIntent getWidgetPendingIntentForConfigurationActivity( 376d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd final Context context, final int appWidgetId); 377d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd 378d3b009ae55651f1e60950342468e3c37fdeb0796Mike Dodd} 379