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

Commit e3530571 authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "Handle NumberFormatException gracefully"

parents b02a957e 681943d0
Loading
Loading
Loading
Loading
+7 −3
Original line number Diff line number Diff line
@@ -190,9 +190,13 @@ final class Ringer extends CallsManagerListenerBase {
                // call (for the purposes of direct-to-voicemail), the information about custom
                // ringtones should be available by the time this code executes. We can safely
                // request the custom ringtone from the call and expect it to be current.
                try {
                    int phoneId = SubscriptionManager.getPhoneId(Long.valueOf(
                            foregroundCall.getTargetPhoneAccount().getId()));
                    mRingtonePlayer.setPhoneId(phoneId);
                } catch (NumberFormatException e) {
                    Log.w(this,"Sub Id is not a number " + e);
                }
                mRingtonePlayer.play(foregroundCall.getRingtone());
            } else {
                Log.v(this, "startRingingOrCallWaiting, skipping because volume is 0");