diff options
author | Yorke Lee <yorkelee@google.com> | 2014-07-09 14:11:46 -0700 |
---|---|---|
committer | Yorke Lee <yorkelee@google.com> | 2014-07-10 11:41:15 -0700 |
commit | 1854a60351443d0d3a06e561b945a039a5c167e6 (patch) | |
tree | 38d74f0ec81cae9d03834a854594f804fe9f7af1 /core/java/android/provider | |
parent | 35d552f7adf0ccffbd78c4220862188a198dda7d (diff) | |
download | frameworks_base-1854a60351443d0d3a06e561b945a039a5c167e6.zip frameworks_base-1854a60351443d0d3a06e561b945a039a5c167e6.tar.gz frameworks_base-1854a60351443d0d3a06e561b945a039a5c167e6.tar.bz2 |
Add EXTRA_CALL_TYPE_FILTER
Add an extra to allow the call log to be displayed with a filtered
list of calls
Bug: 15830957
Change-Id: I7104734a1972adf531f1b275347496282fee86a2
Diffstat (limited to 'core/java/android/provider')
-rw-r--r-- | core/java/android/provider/CallLog.java | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/core/java/android/provider/CallLog.java b/core/java/android/provider/CallLog.java index acc74d8..e4d6f10 100644 --- a/core/java/android/provider/CallLog.java +++ b/core/java/android/provider/CallLog.java @@ -20,6 +20,7 @@ package android.provider; import android.content.ContentResolver; import android.content.ContentValues; import android.content.Context; +import android.content.Intent; import android.database.Cursor; import android.net.Uri; import android.provider.ContactsContract.CommonDataKinds.Callable; @@ -87,6 +88,27 @@ public class CallLog { public static final String ALLOW_VOICEMAILS_PARAM_KEY = "allow_voicemails"; /** + * An optional extra used with {@link #CONTENT_TYPE Calls.CONTENT_TYPE} and + * {@link Intent#ACTION_VIEW} to specify that the presented list of calls should be + * filtered for a particular call type. + * + * Applications implementing a call log UI should check for this extra, and display a + * filtered list of calls based on the specified call type. If not applicable within the + * application's UI, it should be silently ignored. + * + * <p> + * The following example brings up the call log, showing only missed calls. + * <pre> + * Intent intent = new Intent(Intent.ACTION_VIEW); + * intent.setType(CallLog.Calls.CONTENT_TYPE); + * intent.putExtra(CallLog.Calls.EXTRA_CALL_TYPE_FILTER, CallLog.Calls.MISSED_TYPE); + * startActivity(intent); + * </pre> + * </p> + */ + public static final String EXTRA_CALL_TYPE_FILTER = "extra_call_type_filter"; + + /** * Content uri used to access call log entries, including voicemail records. You must have * the READ_CALL_LOG and WRITE_CALL_LOG permissions to read and write to the call log. */ |