Add API in TelecomManager to launch the UI to manage blocked numbers.

BUG: 26917087
Change-Id: Ide328d250561577f652e3a1ee093b37ad19084d8
diff --git a/api/current.txt b/api/current.txt
index 61ae1e0..6e0b903 100644
--- a/api/current.txt
+++ b/api/current.txt
@@ -36330,6 +36330,7 @@
     method public boolean handleMmi(java.lang.String, android.telecom.PhoneAccountHandle);
     method public boolean isInCall();
     method public boolean isVoiceMailNumber(android.telecom.PhoneAccountHandle, java.lang.String);
+    method public void launchManageBlockedNumbersActivity();
     method public void placeCall(android.net.Uri, android.os.Bundle);
     method public void registerPhoneAccount(android.telecom.PhoneAccount);
     method public void showInCallScreen(boolean);
diff --git a/api/system-current.txt b/api/system-current.txt
index 321d817..91bddc5 100644
--- a/api/system-current.txt
+++ b/api/system-current.txt
@@ -38678,6 +38678,7 @@
     method public boolean isRinging();
     method public boolean isTtySupported();
     method public boolean isVoiceMailNumber(android.telecom.PhoneAccountHandle, java.lang.String);
+    method public void launchManageBlockedNumbersActivity();
     method public void placeCall(android.net.Uri, android.os.Bundle);
     method public void registerPhoneAccount(android.telecom.PhoneAccount);
     method public void showInCallScreen(boolean);
diff --git a/api/test-current.txt b/api/test-current.txt
index ad45752..833b0f9 100644
--- a/api/test-current.txt
+++ b/api/test-current.txt
@@ -36345,6 +36345,7 @@
     method public boolean handleMmi(java.lang.String, android.telecom.PhoneAccountHandle);
     method public boolean isInCall();
     method public boolean isVoiceMailNumber(android.telecom.PhoneAccountHandle, java.lang.String);
+    method public void launchManageBlockedNumbersActivity();
     method public void placeCall(android.net.Uri, android.os.Bundle);
     method public void registerPhoneAccount(android.telecom.PhoneAccount);
     method public void showInCallScreen(boolean);
diff --git a/telecomm/java/android/telecom/TelecomManager.java b/telecomm/java/android/telecom/TelecomManager.java
index 72ff272..c122c5a 100644
--- a/telecomm/java/android/telecom/TelecomManager.java
+++ b/telecomm/java/android/telecom/TelecomManager.java
@@ -1414,6 +1414,23 @@
         return result;
     }
 
+    /**
+     * Launches the {@link android.app.Activity} to manage blocked numbers.
+     * <p> This method displays the UI to manage blocked numbers only if
+     * {@link android.provider.BlockedNumberContract#canCurrentUserBlockNumbers(Context)} returns
+     * {@code true} for the current user.
+     */
+    public void launchManageBlockedNumbersActivity() {
+        ITelecomService service = getTelecomService();
+        if (service != null) {
+            try {
+                service.launchManageBlockedNumbersActivity(mContext.getPackageName());
+            } catch (RemoteException e) {
+                Log.e(TAG, "Error calling ITelecomService#manageBlockedNumbers", e);
+            }
+        }
+    }
+
     private ITelecomService getTelecomService() {
         if (mTelecomServiceOverride != null) {
             return mTelecomServiceOverride;