Action.java revision af8e3864a2d0131f72337165c846fe909a099e52
1/* 2 * Copyright (C) 2010 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 17package com.android.contacts.quickcontact; 18 19import com.android.contacts.Collapser; 20 21import android.content.Intent; 22import android.graphics.drawable.Drawable; 23import android.net.Uri; 24 25/** 26 * Abstract definition of an action that could be performed, along with 27 * string description and icon. 28 */ 29public interface Action extends Collapser.Collapsible<Action> { 30 public CharSequence getHeader(); 31 public CharSequence getBody(); 32 33 public String getMimeType(); 34 public Drawable getFallbackIcon(); 35 36 /** 37 * Build an {@link Intent} that will perform this action. 38 */ 39 public Intent getIntent(); 40 41 /** 42 * Checks if the contact data for this action is primary. 43 */ 44 public Boolean isPrimary(); 45 46 /** 47 * Returns a lookup (@link Uri) for the contact data item. 48 */ 49 public Uri getDataUri(); 50} 51