[Telephony mainline] Add SystemApi and NonNull annotation

Bug: 143860012
Test: make
Change-Id: I619d6ba04cb28830e3995feb02ffcb592ff65818
This commit is contained in:
zoey chen
2019-11-07 11:48:01 +08:00
parent a46b9ca083
commit fa86d5a012
3 changed files with 53 additions and 17 deletions

View File

@@ -36757,7 +36757,6 @@ package android.provider {
method @WorkerThread public static boolean isBlocked(android.content.Context, String);
method @WorkerThread public static int unblock(android.content.Context, String);
field public static final String AUTHORITY = "com.android.blockednumber";
field public static final android.net.Uri AUTHORITY_URI;
}
public static class BlockedNumberContract.BlockedNumbers {

View File

@@ -6000,6 +6000,19 @@ package android.printservice.recommendation {
package android.provider {
public class BlockedNumberContract {
field @NonNull public static final android.net.Uri AUTHORITY_URI;
field public static final String METHOD_NOTIFY_EMERGENCY_CONTACT = "notify_emergency_contact";
field public static final String METHOD_SHOULD_SYSTEM_BLOCK_NUMBER = "should_system_block_number";
field public static final String RES_BLOCK_STATUS = "block_status";
field public static final int STATUS_BLOCKED_IN_LIST = 1; // 0x1
field public static final int STATUS_BLOCKED_NOT_IN_CONTACTS = 5; // 0x5
field public static final int STATUS_BLOCKED_PAYPHONE = 4; // 0x4
field public static final int STATUS_BLOCKED_RESTRICTED = 2; // 0x2
field public static final int STATUS_BLOCKED_UNKNOWN_NUMBER = 3; // 0x3
field public static final int STATUS_NOT_BLOCKED = 0; // 0x0
}
public static final class ContactsContract.MetadataSync implements android.provider.BaseColumns android.provider.ContactsContract.MetadataSyncColumns {
field public static final String CONTENT_ITEM_TYPE = "vnd.android.cursor.item/contact_metadata";
field public static final String CONTENT_TYPE = "vnd.android.cursor.dir/contact_metadata";

View File

@@ -16,6 +16,8 @@
package android.provider;
import android.annotation.IntDef;
import android.annotation.NonNull;
import android.annotation.SystemApi;
import android.annotation.WorkerThread;
import android.content.Context;
import android.net.Uri;
@@ -153,7 +155,12 @@ public class BlockedNumberContract {
/** The authority for the blocked number provider */
public static final String AUTHORITY = "com.android.blockednumber";
/** A content:// style uri to the authority for the blocked number provider */
/**
* A content:// style uri to the authority for the blocked number provider
* @hide
*/
@NonNull
@SystemApi
public static final Uri AUTHORITY_URI = Uri.parse("content://" + AUTHORITY);
private static final String LOG_TAG = BlockedNumberContract.class.getSimpleName();
@@ -239,6 +246,7 @@ public class BlockedNumberContract {
* blocked.
* @hide
*/
@SystemApi
public static final int STATUS_NOT_BLOCKED = 0;
/**
@@ -246,6 +254,7 @@ public class BlockedNumberContract {
* because it is in the list of blocked numbers maintained by the provider.
* @hide
*/
@SystemApi
public static final int STATUS_BLOCKED_IN_LIST = 1;
/**
@@ -253,6 +262,7 @@ public class BlockedNumberContract {
* because it is from a restricted number.
* @hide
*/
@SystemApi
public static final int STATUS_BLOCKED_RESTRICTED = 2;
/**
@@ -260,6 +270,7 @@ public class BlockedNumberContract {
* because it is from an unknown number.
* @hide
*/
@SystemApi
public static final int STATUS_BLOCKED_UNKNOWN_NUMBER = 3;
/**
@@ -267,6 +278,7 @@ public class BlockedNumberContract {
* because it is from a pay phone.
* @hide
*/
@SystemApi
public static final int STATUS_BLOCKED_PAYPHONE = 4;
/**
@@ -274,12 +286,14 @@ public class BlockedNumberContract {
* because it is from a number not in the users contacts.
* @hide
*/
@SystemApi
public static final int STATUS_BLOCKED_NOT_IN_CONTACTS = 5;
/**
* Integer reason indicating whether a call was blocked, and if so why.
* @hide
*/
@SystemApi
public static final String RES_BLOCK_STATUS = "block_status";
/** @hide */
@@ -289,6 +303,31 @@ public class BlockedNumberContract {
public static final String METHOD_CAN_CURRENT_USER_BLOCK_NUMBERS =
"can_current_user_block_numbers";
/** @hide */
@SystemApi
public static final String METHOD_NOTIFY_EMERGENCY_CONTACT = "notify_emergency_contact";
/** @hide */
public static final String METHOD_END_BLOCK_SUPPRESSION = "end_block_suppression";
/** @hide */
@SystemApi
public static final String METHOD_SHOULD_SYSTEM_BLOCK_NUMBER = "should_system_block_number";
/** @hide */
public static final String METHOD_GET_BLOCK_SUPPRESSION_STATUS =
"get_block_suppression_status";
/** @hide */
public static final String METHOD_SHOULD_SHOW_EMERGENCY_CALL_NOTIFICATION =
"should_show_emergency_call_notification";
/** @hide */
public static final String METHOD_GET_ENHANCED_BLOCK_SETTING = "get_enhanced_block_setting";
/** @hide */
public static final String METHOD_SET_ENHANCED_BLOCK_SETTING = "set_enhanced_block_setting";
/** @hide */
public static final String RES_CAN_BLOCK_NUMBERS = "can_block";
@@ -406,26 +445,11 @@ public class BlockedNumberContract {
public static final String ACTION_BLOCK_SUPPRESSION_STATE_CHANGED =
"android.provider.action.BLOCK_SUPPRESSION_STATE_CHANGED";
public static final String METHOD_NOTIFY_EMERGENCY_CONTACT = "notify_emergency_contact";
public static final String METHOD_END_BLOCK_SUPPRESSION = "end_block_suppression";
public static final String METHOD_SHOULD_SYSTEM_BLOCK_NUMBER = "should_system_block_number";
public static final String METHOD_GET_BLOCK_SUPPRESSION_STATUS =
"get_block_suppression_status";
public static final String METHOD_SHOULD_SHOW_EMERGENCY_CALL_NOTIFICATION =
"should_show_emergency_call_notification";
public static final String RES_IS_BLOCKING_SUPPRESSED = "blocking_suppressed";
public static final String RES_BLOCKING_SUPPRESSED_UNTIL_TIMESTAMP =
"blocking_suppressed_until_timestamp";
public static final String METHOD_GET_ENHANCED_BLOCK_SETTING = "get_enhanced_block_setting";
public static final String METHOD_SET_ENHANCED_BLOCK_SETTING = "set_enhanced_block_setting";
/* Preference key of block numbers not in contacts setting. */
public static final String ENHANCED_SETTING_KEY_BLOCK_UNREGISTERED =
"block_numbers_not_in_contacts_setting";