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

Commit 10b5e03b authored by Manjunatha Prabhu's avatar Manjunatha Prabhu Committed by Steve Kondik
Browse files

FDN: Telephony plugin for SIMRecords

 - Add makeSIMRecords method in TelephonyPlugin
      to have  provision of extending it from proprietary space.
 - Added telephony delegate function and created QtiSimRecords
   in proprietary jar file

Change-Id: I97eda31c4ddb9f01ad4e06ce8d3ef02a8c960e0e
CRs-Fixed: 798105
parent f8a3a6ce
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -35,6 +35,8 @@ import com.android.internal.telephony.dataconnection.DcTracker;
import com.android.internal.telephony.dataconnection.DctController;
import com.android.internal.telephony.gsm.GSMPhone;
import com.android.internal.telephony.gsm.GsmServiceStateTracker;
import com.android.internal.telephony.uicc.SIMRecords;
import com.android.internal.telephony.uicc.UiccCardApplication;

public abstract class TelephonyPluginBase implements TelephonyPluginInterface {
    private String TAG = "TelephonyPluginBase";
@@ -92,4 +94,9 @@ public abstract class TelephonyPluginBase implements TelephonyPluginInterface {
    public GsmServiceStateTracker makeGsmServiceStateTracker(GSMPhone phone) {
        return new GsmServiceStateTracker(phone);
    }

    @Override
    public SIMRecords makeSIMRecords (UiccCardApplication app, Context c, CommandsInterface ci) {
        return new SIMRecords(app, c, ci);
    }
}
+6 −0
Original line number Diff line number Diff line
@@ -39,6 +39,8 @@ import com.android.internal.telephony.gsm.GSMPhone;
import com.android.internal.telephony.gsm.GsmServiceStateTracker;
import com.android.internal.telephony.TelephonyPluginBase;
import com.android.internal.telephony.DefaultTelephonyPlugin;
import com.android.internal.telephony.uicc.SIMRecords;
import com.android.internal.telephony.uicc.UiccCardApplication;
import com.android.internal.R;

import dalvik.system.PathClassLoader;
@@ -146,4 +148,8 @@ public class TelephonyPluginDelegate {
    public GsmServiceStateTracker makeGsmServiceStateTracker(GSMPhone phone) {
        return sPlugin.makeGsmServiceStateTracker(phone);
    }

    public SIMRecords makeSIMRecords (UiccCardApplication app, Context c, CommandsInterface ci) {
        return sPlugin.makeSIMRecords (app, c, ci);
    }
}
+5 −1
Original line number Diff line number Diff line
@@ -33,7 +33,8 @@ import com.android.internal.telephony.dataconnection.DcTracker;
import com.android.internal.telephony.dataconnection.DctController;
import com.android.internal.telephony.gsm.GSMPhone;
import com.android.internal.telephony.gsm.GsmServiceStateTracker;

import com.android.internal.telephony.uicc.SIMRecords;
import com.android.internal.telephony.uicc.UiccCardApplication;

public interface TelephonyPluginInterface {

@@ -61,4 +62,7 @@ public interface TelephonyPluginInterface {
            Phone[] phoneProxy, CommandsInterface[] commandsInterfaces);

    public GsmServiceStateTracker makeGsmServiceStateTracker(GSMPhone phone);

    public SIMRecords makeSIMRecords (UiccCardApplication app, Context c,
            CommandsInterface ci);
}
+2 −1
Original line number Diff line number Diff line
@@ -26,6 +26,7 @@ import android.telephony.Rlog;

import com.android.internal.telephony.CommandsInterface;
import com.android.internal.telephony.PhoneConstants;
import com.android.internal.telephony.TelephonyPluginDelegate;
import com.android.internal.telephony.uicc.IccCardApplicationStatus.AppState;
import com.android.internal.telephony.uicc.IccCardApplicationStatus.AppType;
import com.android.internal.telephony.uicc.IccCardApplicationStatus.PersoSubState;
@@ -179,7 +180,7 @@ public class UiccCardApplication {

    private IccRecords createIccRecords(AppType type, Context c, CommandsInterface ci) {
        if (type == AppType.APPTYPE_USIM || type == AppType.APPTYPE_SIM) {
            return new SIMRecords(this, c, ci);
            return TelephonyPluginDelegate.getInstance().makeSIMRecords(this, c, ci);
        } else if (type == AppType.APPTYPE_RUIM || type == AppType.APPTYPE_CSIM){
            return new RuimRecords(this, c, ci);
        } else if (type == AppType.APPTYPE_ISIM) {