am 5610e1de: Merge "Revert "Add API method to extract subscription ID from phone account (2/3)"" into lmp-sprout-dev
* commit '5610e1de7ee7bfb1543efce4a09b60028aba5ba5':
Revert "Add API method to extract subscription ID from phone account (2/3)"
diff --git a/src/com/android/server/telecom/PhoneAccountRegistrar.java b/src/com/android/server/telecom/PhoneAccountRegistrar.java
index 05c7d19..16177f4 100644
--- a/src/com/android/server/telecom/PhoneAccountRegistrar.java
+++ b/src/com/android/server/telecom/PhoneAccountRegistrar.java
@@ -114,38 +114,6 @@
}
/**
- * Retrieves the phone account id for a given subscription id if it exists. Subscription ids
- * apply only to PSTN/SIM card phone accounts so all other accounts should not have a
- * subscription id.
- * @param subscriptionId The subscription id for which to construct the phone account id
- * @return The string representing the phone account id for the subscription id.
- */
-
- public String getPhoneAccountIdForSubscriptionId(long subscriptionId) {
- return String.valueOf(subscriptionId);
- }
-
- /**
- * Retrieves the subscription id for a given phone account if it exists. Subscription ids
- * apply only to PSTN/SIM card phone accounts so all other accounts should not have a
- * subscription id.
- * @param accountHandle The handle for the phone account for which to retrieve the
- * subscription id.
- * @return The value of the subscription id (long) or -1 if it does not exist or is not valid.
- */
-
- public long getSubscriptionIdForPhoneAccount(PhoneAccountHandle accountHandle) {
- PhoneAccount account = getPhoneAccount(accountHandle);
- if (account == null || !account.hasCapabilities(PhoneAccount.CAPABILITY_SIM_SUBSCRIPTION) ||
- !TextUtils.isDigitsOnly(accountHandle.getId())) {
- // Since no decimals or negative numbers can be valid subscription ids, only a string of
- // numbers can be subscription id
- return -1;
- }
- return Long.parseLong(accountHandle.getId());
- }
-
- /**
* Retrieves the default outgoing phone account supporting the specified uriScheme.
* @param uriScheme The URI scheme for the outgoing call.
* @return The {@link PhoneAccountHandle} to use.
diff --git a/src/com/android/server/telecom/TelecomServiceImpl.java b/src/com/android/server/telecom/TelecomServiceImpl.java
index ee7606c..ad2f39b 100644
--- a/src/com/android/server/telecom/TelecomServiceImpl.java
+++ b/src/com/android/server/telecom/TelecomServiceImpl.java
@@ -163,26 +163,6 @@
//
@Override
- public String getPhoneAccountIdForSubscriptionId(long subscriptionId) {
- try {
- return mPhoneAccountRegistrar.getPhoneAccountIdForSubscriptionId(subscriptionId);
- } catch (Exception e) {
- Log.e(this, e, "getPhoneAccountIdForSubscriptionId");
- throw e;
- }
- }
-
- @Override
- public long getSubscriptionIdForPhoneAccount(PhoneAccountHandle accountHandle) {
- try {
- return mPhoneAccountRegistrar.getSubscriptionIdForPhoneAccount(accountHandle);
- } catch (Exception e) {
- Log.e(this, e, "getSubscriptionIdForPhoneAccount");
- throw e;
- }
- }
-
- @Override
public PhoneAccountHandle getDefaultOutgoingPhoneAccount(String uriScheme) {
try {
return mPhoneAccountRegistrar.getDefaultOutgoingPhoneAccount(uriScheme);