Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 43f7bf26 authored by Sridhar Dubbaka's avatar Sridhar Dubbaka Committed by Ethan Chen
Browse files

Change subid from long to int type

Change subid from long to int type.

Change-Id: I589065f128b60237f55db2e7f32467e7509343df
parent ccf6031a
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -213,7 +213,7 @@ public final class PhoneAccountRegistrar {
    }

    PhoneAccountHandle getUserSelectedVoicePhoneAccount() {
        long voiceSubId = SubscriptionManager.getDefaultVoiceSubId();
        int voiceSubId = SubscriptionManager.getDefaultVoiceSubId();
        boolean isVoicePrompt = SubscriptionManager.isVoicePromptEnabled();
        PhoneAccountHandle prefPhoneAccount = null;

@@ -228,9 +228,9 @@ public final class PhoneAccountRegistrar {
                   Log.i(this, "getUserSelVoicePhoneAccount, emergency account ");
                   return mState.accounts.get(i).getAccountHandle();
                }
                long subId = voiceSubId;
                int subId = voiceSubId;
                try {
                    subId = Long.parseLong(id);
                    subId = Integer.parseInt(id);
                } catch (NumberFormatException e) {
                    Log.w(this, " NumberFormatException " + e);
                }
+2 −2
Original line number Diff line number Diff line
@@ -144,10 +144,10 @@ public class RespondViaSmsManager extends CallsManagerListenerBase {
    @Override
    public void onIncomingCallRejected(Call call, boolean rejectWithMessage, String textMessage) {
        if (call != null && rejectWithMessage) {
            long subId = SubscriptionManager.getDefaultSubId();
            int subId = SubscriptionManager.getDefaultSubId();
            if (call.getTargetPhoneAccount() != null) {
                try {
                    subId = Long.parseLong(call.getTargetPhoneAccount().getId());
                    subId = Integer.parseInt(call.getTargetPhoneAccount().getId());
                } catch (NumberFormatException e) {
                    Log.e(RespondViaSmsManager.this, e , "Exception e ");
                }
+3 −3
Original line number Diff line number Diff line
@@ -623,7 +623,7 @@ public class TelecomService extends Service {
            long token = Binder.clearCallingIdentity();
            String retval = "content://icc/adn/";
            try {
                long subId = mPhoneAccountRegistrar.getSubscriptionIdForPhoneAccount(accountHandle);
                int subId = mPhoneAccountRegistrar.getSubscriptionIdForPhoneAccount(accountHandle);
                retval = retval + "subId/" + subId;
            } finally {
                Binder.restoreCallingIdentity(token);
@@ -702,10 +702,10 @@ public class TelecomService extends Service {
        }

        @Override
        public long getActiveSubscription() { return 0; }
        public int getActiveSubscription() { return 0; }

        @Override
        public void switchToOtherActiveSub(long subId) { }
        public void switchToOtherActiveSub(int subId) { }

        /**
         * Dumps the current state of the TelecomService.  Used when generating problem reports.