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

Commit 4a1dfae2 authored by xinhe's avatar xinhe Committed by John Huang
Browse files

Fix for CMAS is not turned on

CMAS is not turned on for several reasons:
(1) Exception happends when default SMS sub Id is not available.
(2) Cellbroadcast thread can die before the servicestate change triggered

Bug:17571958
Change-Id: I7b210226fa24f266896763ff80235c4ed4b936eb
parent b30d3481
Loading
Loading
Loading
Loading
+7 −1
Original line number Diff line number Diff line
@@ -296,7 +296,13 @@ public class UiccSmsController extends ISms.Stub {
     * get sms interface manager object based on subscription.
     **/
    private IccSmsInterfaceManager getIccSmsInterfaceManager(long subId) {
        long phoneId = SubscriptionController.getInstance().getPhoneId(subId);
        int phoneId = SubscriptionController.getInstance().getPhoneId(subId) ;
        //Fixme: for multi-subscription case
        if (!SubscriptionManager.isValidPhoneId(phoneId)
                || phoneId == SubscriptionManager.DEFAULT_PHONE_ID) {
            phoneId = 0;
        }

        try {
            return (IccSmsInterfaceManager)
                ((PhoneProxy)mPhone[(int)phoneId]).getIccSmsInterfaceManager();