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

Commit 4760c3c7 authored by Suresh Koleti's avatar Suresh Koleti Committed by Gerrit - the friendly Code Review server
Browse files

Create CatService if atleast one valid application is present

CatService creation is depends on only first application as of now.
If first application from card is not valid then CatService is
not being created
Create CatService if atleast one valid application is present.

Change-Id: Ic0ff82a5ea12d057e97544f56fcf554b60bba6d5
CRs-Fixed: 551622
parent 70224c53
Loading
Loading
Loading
Loading
+8 −4
Original line number Diff line number Diff line
@@ -35,6 +35,7 @@ import com.android.internal.telephony.uicc.IccRecords;
import com.android.internal.telephony.uicc.IccUtils;
import com.android.internal.telephony.uicc.UiccCard;
import com.android.internal.telephony.uicc.UiccCardApplication;
import com.android.internal.telephony.uicc.IccCardApplicationStatus.AppType;
import com.android.internal.telephony.uicc.IccCardStatus.CardState;
import com.android.internal.telephony.uicc.IccRefreshResponse;
import com.android.internal.telephony.uicc.UiccController;
@@ -712,10 +713,13 @@ public class CatService extends Handler implements AppInterface {
            /* Since Cat is not tied to any application, but rather is Uicc application
             * in itself - just get first FileHandler and IccRecords object
             */
            ca = ic.getApplicationIndex(0);
            if (ca != null) {
            for (int i = 0; i < ic.getNumApplications(); i++) {
                ca = ic.getApplicationIndex(i);
                if (ca != null && (ca.getType() != AppType.APPTYPE_UNKNOWN)) {
                    fh = ca.getIccFileHandler();
                    ir = ca.getIccRecords();
                    break;
                }
            }
        }
        synchronized (sInstanceLock) {