From ec0d33490ab48b40d1d18723935f49f41072164b Mon Sep 17 00:00:00 2001 From: Brad Ebinger Date: Fri, 29 Jan 2016 15:40:43 -0800 Subject: [PATCH] Update TelecomManager docs regarding PhoneAccounts Updates the docs for addNewIncomingCall to mention that if the PhoneAccountHandle representing a PhoneAccount is not registered or not enabled, a SecurityException will be thrown (as of b/26864502). Also notifies the user that PhoneAccounts are stored in DE storage in registerPhoneAccount. Bug: 26874536 Bug: 26780305 Change-Id: I2dae932cfa3404d7d5060dad840a75227793603e --- .../java/android/telecom/TelecomManager.java | 21 ++++++++++++------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/telecomm/java/android/telecom/TelecomManager.java b/telecomm/java/android/telecom/TelecomManager.java index c122c5a365fc2..f1cbb9ab73d3f 100644 --- a/telecomm/java/android/telecom/TelecomManager.java +++ b/telecomm/java/android/telecom/TelecomManager.java @@ -774,9 +774,9 @@ public class TelecomManager { } /** - * Register a {@link PhoneAccount} for use by the system. When registering - * {@link PhoneAccount}s, existing registrations will be overwritten if the - * {@link PhoneAccountHandle} matches that of a {@link PhoneAccount} which is already + * Register a {@link PhoneAccount} for use by the system that will be stored in Device Encrypted + * storage. When registering {@link PhoneAccount}s, existing registrations will be overwritten + * if the {@link PhoneAccountHandle} matches that of a {@link PhoneAccount} which is already * registered. Once registered, the {@link PhoneAccount} is listed to the user as an option * when placing calls. The user may still need to enable the {@link PhoneAccount} within * the phone app settings before the account is usable. @@ -1166,11 +1166,16 @@ public class TelecomManager { /** * Registers a new incoming call. A {@link ConnectionService} should invoke this method when it * has an incoming call. The specified {@link PhoneAccountHandle} must have been registered - * with {@link #registerPhoneAccount}. Once invoked, this method will cause the system to bind - * to the {@link ConnectionService} associated with the {@link PhoneAccountHandle} and request - * additional information about the call (See - * {@link ConnectionService#onCreateIncomingConnection}) before starting the incoming call UI. - * + * with {@link #registerPhoneAccount} and the user must have enabled the corresponding + * {@link PhoneAccount}. This can be checked using {@link #getPhoneAccount}. Once invoked, this + * method will cause the system to bind to the {@link ConnectionService} associated with the + * {@link PhoneAccountHandle} and request additional information about the call + * (See {@link ConnectionService#onCreateIncomingConnection}) before starting the incoming + * call UI. + *

+ * A {@link SecurityException} will be thrown if either the {@link PhoneAccountHandle} does not + * correspond to a registered {@link PhoneAccount} or the associated {@link PhoneAccount} is not + * currently enabled by the user. * @param phoneAccount A {@link PhoneAccountHandle} registered with * {@link #registerPhoneAccount}. * @param extras A bundle that will be passed through to