Loading telecomm/java/android/telecomm/TelecommManager.java +25 −3 Original line number Diff line number Diff line Loading @@ -286,17 +286,39 @@ public class TelecommManager { return null; } /** * Return the {@link PhoneAccount} which is the user-chosen default for making outgoing phone * calls. This {@code PhoneAccount} will always be a member of the list which is returned from * calling {@link #getEnabledPhoneAccounts()} * * Apps must be prepared for this method to return {@code null}, indicating that there currently * exists no user-chosen default {@code PhoneAccount}. * * @return The user outgoing phone account selected by the user. * @hide */ public PhoneAccountHandle getUserSelectedOutgoingPhoneAccount() { try { if (isServiceConnected()) { return getTelecommService().getUserSelectedOutgoingPhoneAccount(); } } catch (RemoteException e) { Log.e(TAG, "Error calling ITelecommService#getUserSelectedOutgoingPhoneAccount", e); } return null; } /** * Sets the default account for making outgoing phone calls. * @hide */ public void setDefaultOutgoingPhoneAccount(PhoneAccountHandle accountHandle) { public void setUserSelectedOutgoingPhoneAccount(PhoneAccountHandle accountHandle) { try { if (isServiceConnected()) { getTelecommService().setDefaultOutgoingPhoneAccount(accountHandle); getTelecommService().setUserSelectedOutgoingPhoneAccount(accountHandle); } } catch (RemoteException e) { Log.e(TAG, "Error calling ITelecommService#setDefaultOutgoingPhoneAccount"); Log.e(TAG, "Error calling ITelecommService#setUserSelectedOutgoingPhoneAccount"); } } Loading telecomm/java/com/android/internal/telecomm/ITelecommService.aidl +7 −2 Original line number Diff line number Diff line Loading @@ -40,9 +40,14 @@ interface ITelecommService { PhoneAccountHandle getDefaultOutgoingPhoneAccount(in String uriScheme); /** * @see TelecommServiceImpl#setDefaultOutgoingPhoneAccount * @see TelecommServiceImpl#getUserSelectedOutgoingPhoneAccount */ void setDefaultOutgoingPhoneAccount(in PhoneAccountHandle account); PhoneAccountHandle getUserSelectedOutgoingPhoneAccount(); /** * @see TelecommServiceImpl#setUserSelectedOutgoingPhoneAccount */ void setUserSelectedOutgoingPhoneAccount(in PhoneAccountHandle account); /** * @see TelecommServiceImpl#getOutgoingPhoneAccounts Loading Loading
telecomm/java/android/telecomm/TelecommManager.java +25 −3 Original line number Diff line number Diff line Loading @@ -286,17 +286,39 @@ public class TelecommManager { return null; } /** * Return the {@link PhoneAccount} which is the user-chosen default for making outgoing phone * calls. This {@code PhoneAccount} will always be a member of the list which is returned from * calling {@link #getEnabledPhoneAccounts()} * * Apps must be prepared for this method to return {@code null}, indicating that there currently * exists no user-chosen default {@code PhoneAccount}. * * @return The user outgoing phone account selected by the user. * @hide */ public PhoneAccountHandle getUserSelectedOutgoingPhoneAccount() { try { if (isServiceConnected()) { return getTelecommService().getUserSelectedOutgoingPhoneAccount(); } } catch (RemoteException e) { Log.e(TAG, "Error calling ITelecommService#getUserSelectedOutgoingPhoneAccount", e); } return null; } /** * Sets the default account for making outgoing phone calls. * @hide */ public void setDefaultOutgoingPhoneAccount(PhoneAccountHandle accountHandle) { public void setUserSelectedOutgoingPhoneAccount(PhoneAccountHandle accountHandle) { try { if (isServiceConnected()) { getTelecommService().setDefaultOutgoingPhoneAccount(accountHandle); getTelecommService().setUserSelectedOutgoingPhoneAccount(accountHandle); } } catch (RemoteException e) { Log.e(TAG, "Error calling ITelecommService#setDefaultOutgoingPhoneAccount"); Log.e(TAG, "Error calling ITelecommService#setUserSelectedOutgoingPhoneAccount"); } } Loading
telecomm/java/com/android/internal/telecomm/ITelecommService.aidl +7 −2 Original line number Diff line number Diff line Loading @@ -40,9 +40,14 @@ interface ITelecommService { PhoneAccountHandle getDefaultOutgoingPhoneAccount(in String uriScheme); /** * @see TelecommServiceImpl#setDefaultOutgoingPhoneAccount * @see TelecommServiceImpl#getUserSelectedOutgoingPhoneAccount */ void setDefaultOutgoingPhoneAccount(in PhoneAccountHandle account); PhoneAccountHandle getUserSelectedOutgoingPhoneAccount(); /** * @see TelecommServiceImpl#setUserSelectedOutgoingPhoneAccount */ void setUserSelectedOutgoingPhoneAccount(in PhoneAccountHandle account); /** * @see TelecommServiceImpl#getOutgoingPhoneAccounts Loading