DO NOT MERGE Expose phone account register/unregister intents.

These were previously @SystemApi.  Retaining the existing SystemAPI
behavior which sends the intents to those with a private permission.
Extending to ALSO send these intents to the default dialer app as well
using an explicit intent.
Cherry-pick from aosp-master to resolve merge conflicts.

Test: Manual
Bug: 37106957
Merged-In: Ifb72870105be5ba024af196a8c3165a9afb397ab
Change-Id: Ifb72870105be5ba024af196a8c3165a9afb397ab
(cherry picked from commit d9da6ce993)
This commit is contained in:
Tyler Gunn
2017-04-14 13:43:30 -07:00
parent 6acf7a7b45
commit 346892ff9f
3 changed files with 18 additions and 8 deletions

View File

@@ -112,20 +112,26 @@ public class TelecomManager {
"android.telecom.action.CHANGE_PHONE_ACCOUNTS";
/**
* The {@link android.content.Intent} action used indicate that a new phone account was
* just registered.
* @hide
* {@link android.content.Intent} action used indicate that a new phone account was just
* registered.
* <p>
* The Intent {@link Intent#getExtras() extras} will contain {@link #EXTRA_PHONE_ACCOUNT_HANDLE}
* to indicate which {@link PhoneAccount} was registered.
* <p>
* Will only be sent to the default dialer app (see {@link #getDefaultDialerPackage()}).
*/
@SystemApi
public static final String ACTION_PHONE_ACCOUNT_REGISTERED =
"android.telecom.action.PHONE_ACCOUNT_REGISTERED";
/**
* The {@link android.content.Intent} action used indicate that a phone account was
* just unregistered.
* @hide
* {@link android.content.Intent} action used indicate that a phone account was just
* unregistered.
* <p>
* The Intent {@link Intent#getExtras() extras} will contain {@link #EXTRA_PHONE_ACCOUNT_HANDLE}
* to indicate which {@link PhoneAccount} was unregistered.
* <p>
* Will only be sent to the default dialer app (see {@link #getDefaultDialerPackage()}).
*/
@SystemApi
public static final String ACTION_PHONE_ACCOUNT_UNREGISTERED =
"android.telecom.action.PHONE_ACCOUNT_UNREGISTERED";