From 2934e1908ea54aee26dbce6c196a086eb3c46398 Mon Sep 17 00:00:00 2001 From: Danny Baumann Date: Wed, 26 Jun 2013 17:05:55 +0200 Subject: Store phone blacklist in content provider (1/4) Change-Id: I9dafdb3e10bd2a71695c2a02cc483c594d86c543 --- src/java/android/provider/Telephony.java | 71 ++++++++++++++++++++++++++++++++ 1 file changed, 71 insertions(+) diff --git a/src/java/android/provider/Telephony.java b/src/java/android/provider/Telephony.java index e932e2b..81e8fa8 100644 --- a/src/java/android/provider/Telephony.java +++ b/src/java/android/provider/Telephony.java @@ -1996,4 +1996,75 @@ public final class Telephony { CMAS_CERTAINTY }; } + + /** + * Contains phone numbers that are blacklisted + * for phone and/or message purposes. + * @hide + */ + public static final class Blacklist implements BaseColumns { + /** + * The content:// style URL for this table + */ + public static final Uri CONTENT_URI = + Uri.parse("content://blacklist"); + + /** + * The content:// style URL for filtering this table by number. + * When using this, make sure the number is correctly encoded + * when appended to the Uri. + */ + public static final Uri CONTENT_FILTER_BYNUMBER_URI = + Uri.parse("content://blacklist/bynumber"); + + /** + * The content:// style URL for filtering this table on phone numbers + */ + public static final Uri CONTENT_PHONE_URI = + Uri.parse("content://blacklist/phone"); + + /** + * The content:// style URL for filtering this table on message numbers + */ + public static final Uri CONTENT_MESSAGE_URI = + Uri.parse("content://blacklist/message"); + + + /** + * Query parameter used to match numbers by regular-expression like + * matching. Supported are the '*' and the '.' operators. + *

+ * TYPE: boolean + */ + public static final String REGEX_KEY = "regex"; + + /** + * The default sort order for this table + */ + public static final String DEFAULT_SORT_ORDER = "number ASC"; + + /** + * The phone number as the user entered it. + *

Type: TEXT

+ */ + public static final String NUMBER = "number"; + + /** + * Whether the number contains a regular expression pattern + *

Type: BOOLEAN (read only)

+ */ + public static final String IS_REGEX = "is_regex"; + + /** + * Blacklisting mode for phone calls + *

Type: INTEGER (int)

+ */ + public static final String PHONE_MODE = "phone"; + + /** + * Blacklisting mode for messages + *

Type: INTEGER (int)

+ */ + public static final String MESSAGE_MODE = "message"; + } } -- cgit v1.1