From b588abe4bc4e893f71c8598f97f1395f6c827613 Mon Sep 17 00:00:00 2001 From: zoey chen Date: Mon, 18 Nov 2019 19:11:54 +0800 Subject: [Telephony mainline] Move all METHOD_* constants from SystemContract to BlockedNumberContract Bug: 143860012 Test: make Change-Id: I5c4380f9343fa50f469dc59a54900bbdc6ea3693 Merged-In: I5c4380f9343fa50f469dc59a54900bbdc6ea3693 --- .../providers/blockednumber/BlockedNumberProvider.java | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/com/android/providers/blockednumber/BlockedNumberProvider.java b/src/com/android/providers/blockednumber/BlockedNumberProvider.java index 4d6a284..c70e1ee 100644 --- a/src/com/android/providers/blockednumber/BlockedNumberProvider.java +++ b/src/com/android/providers/blockednumber/BlockedNumberProvider.java @@ -326,17 +326,17 @@ public class BlockedNumberProvider extends ContentProvider { res.putInt(BlockedNumberContract.RES_NUM_ROWS_DELETED, unblock(arg)); break; - case SystemContract.METHOD_NOTIFY_EMERGENCY_CONTACT: + case BlockedNumberContract.METHOD_NOTIFY_EMERGENCY_CONTACT: enforceSystemWritePermissionAndPrimaryUser(); notifyEmergencyContact(); break; - case SystemContract.METHOD_END_BLOCK_SUPPRESSION: + case BlockedNumberContract.METHOD_END_BLOCK_SUPPRESSION: enforceSystemWritePermissionAndPrimaryUser(); endBlockSuppression(); break; - case SystemContract.METHOD_GET_BLOCK_SUPPRESSION_STATUS: + case BlockedNumberContract.METHOD_GET_BLOCK_SUPPRESSION_STATUS: enforceSystemReadPermissionAndPrimaryUser(); SystemContract.BlockSuppressionStatus status = getBlockSuppressionStatus(); @@ -344,19 +344,19 @@ public class BlockedNumberProvider extends ContentProvider { res.putLong(SystemContract.RES_BLOCKING_SUPPRESSED_UNTIL_TIMESTAMP, status.untilTimestampMillis); break; - case SystemContract.METHOD_SHOULD_SYSTEM_BLOCK_NUMBER: + case BlockedNumberContract.METHOD_SHOULD_SYSTEM_BLOCK_NUMBER: enforceSystemReadPermissionAndPrimaryUser(); int blockReason = shouldSystemBlockNumber(arg, extras); res.putBoolean(BlockedNumberContract.RES_NUMBER_IS_BLOCKED, blockReason != BlockedNumberContract.STATUS_NOT_BLOCKED); res.putInt(BlockedNumberContract.RES_BLOCK_STATUS, blockReason); break; - case SystemContract.METHOD_SHOULD_SHOW_EMERGENCY_CALL_NOTIFICATION: + case BlockedNumberContract.METHOD_SHOULD_SHOW_EMERGENCY_CALL_NOTIFICATION: enforceSystemReadPermissionAndPrimaryUser(); res.putBoolean(BlockedNumberContract.RES_SHOW_EMERGENCY_CALL_NOTIFICATION, shouldShowEmergencyCallNotification()); break; - case SystemContract.METHOD_GET_ENHANCED_BLOCK_SETTING: + case BlockedNumberContract.METHOD_GET_ENHANCED_BLOCK_SETTING: enforceSystemReadPermissionAndPrimaryUser(); if (extras != null) { String key = extras.getString(BlockedNumberContract.EXTRA_ENHANCED_SETTING_KEY); @@ -364,7 +364,7 @@ public class BlockedNumberProvider extends ContentProvider { res.putBoolean(BlockedNumberContract.RES_ENHANCED_SETTING_IS_ENABLED, value); } break; - case SystemContract.METHOD_SET_ENHANCED_BLOCK_SETTING: + case BlockedNumberContract.METHOD_SET_ENHANCED_BLOCK_SETTING: enforceSystemWritePermissionAndPrimaryUser(); if (extras != null) { String key = extras.getString(BlockedNumberContract.EXTRA_ENHANCED_SETTING_KEY); -- cgit v1.2.3