Rename suppressal to suppression.
BUG: 26989170 Change-Id: Iafa21b885f7df7f5ec5e46f3fad095cf1a531cfc
This commit is contained in:
@@ -239,20 +239,20 @@ public class BlockedNumberContract {
|
||||
public static class SystemContract {
|
||||
/**
|
||||
* A protected broadcast intent action for letting components with
|
||||
* {@link android.Manifest.permission#READ_BLOCKED_NUMBERS} know that the block suppressal
|
||||
* status as returned by {@link #getBlockSuppressalStatus(Context)} has been updated.
|
||||
* {@link android.Manifest.permission#READ_BLOCKED_NUMBERS} know that the block suppression
|
||||
* status as returned by {@link #getBlockSuppressionStatus(Context)} has been updated.
|
||||
*/
|
||||
public static final String ACTION_BLOCK_SUPPRESSAL_STATE_CHANGED =
|
||||
"android.provider.action.BLOCK_SUPPRESSAL_STATE_CHANGED";
|
||||
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_SUPPRESSAL = "end_block_suppressal";
|
||||
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_SUPPRESSAL_STATUS =
|
||||
"get_block_suppresal_status";
|
||||
public static final String METHOD_GET_BLOCK_SUPPRESSION_STATUS =
|
||||
"get_block_suppression_status";
|
||||
|
||||
public static final String RES_IS_BLOCKING_SUPPRESSED = "blocking_suppressed";
|
||||
|
||||
@@ -264,7 +264,7 @@ public class BlockedNumberContract {
|
||||
* <p> This results in {@link #shouldSystemBlockNumber} returning {@code false} independent
|
||||
* of the contents of the provider for a duration defined by
|
||||
* {@link android.telephony.CarrierConfigManager#KEY_DURATION_BLOCKING_DISABLED_AFTER_EMERGENCY_INT}
|
||||
* the provider unless {@link #endBlockSuppressal(Context)} is called.
|
||||
* the provider unless {@link #endBlockSuppression(Context)} is called.
|
||||
*/
|
||||
public static void notifyEmergencyContact(Context context) {
|
||||
context.getContentResolver().call(
|
||||
@@ -275,9 +275,9 @@ public class BlockedNumberContract {
|
||||
* Notifies the provider to disable suppressing blocking. If emergency services were not
|
||||
* contacted recently at all, calling this method is a no-op.
|
||||
*/
|
||||
public static void endBlockSuppressal(Context context) {
|
||||
public static void endBlockSuppression(Context context) {
|
||||
context.getContentResolver().call(
|
||||
AUTHORITY_URI, METHOD_END_BLOCK_SUPPRESSAL, null, null);
|
||||
AUTHORITY_URI, METHOD_END_BLOCK_SUPPRESSION, null, null);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -292,26 +292,26 @@ public class BlockedNumberContract {
|
||||
return res != null && res.getBoolean(RES_NUMBER_IS_BLOCKED, false);
|
||||
}
|
||||
|
||||
public static BlockSuppressalStatus getBlockSuppressalStatus(Context context) {
|
||||
public static BlockSuppressionStatus getBlockSuppressionStatus(Context context) {
|
||||
final Bundle res = context.getContentResolver().call(
|
||||
AUTHORITY_URI, METHOD_GET_BLOCK_SUPPRESSAL_STATUS, null, null);
|
||||
return new BlockSuppressalStatus(res.getBoolean(RES_IS_BLOCKING_SUPPRESSED, false),
|
||||
AUTHORITY_URI, METHOD_GET_BLOCK_SUPPRESSION_STATUS, null, null);
|
||||
return new BlockSuppressionStatus(res.getBoolean(RES_IS_BLOCKING_SUPPRESSED, false),
|
||||
res.getLong(RES_BLOCKING_SUPPRESSED_UNTIL_TIMESTAMP, 0));
|
||||
}
|
||||
|
||||
/**
|
||||
* Represents the current status of {@link #shouldSystemBlockNumber(Context, String)}. If
|
||||
* emergency services have been contacted recently, {@link #isSuppressed} is {@code true},
|
||||
* and blocking is disabled until the timestamp {@link #untilTimestampMillis}.
|
||||
* and blocking is disabled until the timestamp {@link #untilTimestampMillis}.
|
||||
*/
|
||||
public static class BlockSuppressalStatus {
|
||||
public static class BlockSuppressionStatus {
|
||||
public final boolean isSuppressed;
|
||||
/**
|
||||
* Timestamp in milliseconds from epoch.
|
||||
*/
|
||||
public final long untilTimestampMillis;
|
||||
|
||||
public BlockSuppressalStatus(boolean isSuppressed, long untilTimestampMillis) {
|
||||
public BlockSuppressionStatus(boolean isSuppressed, long untilTimestampMillis) {
|
||||
this.isSuppressed = isSuppressed;
|
||||
this.untilTimestampMillis = untilTimestampMillis;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user