From 7a665af1d8445a05a85790304f54da54f46944f5 Mon Sep 17 00:00:00 2001 From: Tyler Gunn Date: Fri, 27 Mar 2020 12:51:26 -0700 Subject: [PATCH] Document that some Telecom broadcast and extra keys are dead-ends. Too late to @deprecate, but we can still at least indicate that the broadcasts are dead-ends and help the developer know the right way to go. Test: make -j offline-sdk-docs; confirm docs look good. Bug: 148268693 Fixes: 152915447 Change-Id: I88b03a62c812232cf0d5bbeb693cdaf3c2eed3e1 --- .../java/android/telecom/TelecomManager.java | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/telecomm/java/android/telecom/TelecomManager.java b/telecomm/java/android/telecom/TelecomManager.java index 8be146dd02fee..8d53158b9f323 100644 --- a/telecomm/java/android/telecom/TelecomManager.java +++ b/telecomm/java/android/telecom/TelecomManager.java @@ -192,13 +192,13 @@ public class TelecomManager { /** * Broadcast intent action indicating that the current default call screening app has changed. - * - * The string extra {@link #EXTRA_DEFAULT_CALL_SCREENING_APP_COMPONENT_NAME} will contain the - * name of the Component of the previous or the new call screening app. - * - * The boolean extra {@link #EXTRA_IS_DEFAULT_CALL_SCREENING_APP} will indicate the component - * name in the String extra {@link #EXTRA_DEFAULT_CALL_SCREENING_APP_COMPONENT_NAME} is default - * call screening app or not. + *

+ * Note: This intent is NEVER actually broadcast and will be deprecated in the future. + *

+ * An app that want to know if it holds the + * {@link android.app.role.RoleManager#ROLE_CALL_SCREENING} role can use + * {@link android.app.role.RoleManager#isRoleHeld(String)} to confirm if it holds the role or + * not. */ public static final String ACTION_DEFAULT_CALL_SCREENING_APP_CHANGED = "android.telecom.action.DEFAULT_CALL_SCREENING_APP_CHANGED"; @@ -206,6 +206,8 @@ public class TelecomManager { /** * Extra value used with {@link #ACTION_DEFAULT_CALL_SCREENING_APP_CHANGED} broadcast to * indicate the ComponentName of the call screening app which has changed. + *

+ * Note: This extra is NOT used and will be deprecated in the future. */ public static final String EXTRA_DEFAULT_CALL_SCREENING_APP_COMPONENT_NAME = "android.telecom.extra.DEFAULT_CALL_SCREENING_APP_COMPONENT_NAME"; @@ -213,6 +215,8 @@ public class TelecomManager { /** * Extra value used with {@link #ACTION_DEFAULT_CALL_SCREENING_APP_CHANGED} broadcast to * indicate whether an app is the default call screening app. + *

+ * Note: This extra is NOT used and will be deprecated in the future. */ public static final String EXTRA_IS_DEFAULT_CALL_SCREENING_APP = "android.telecom.extra.IS_DEFAULT_CALL_SCREENING_APP";