Loading src/java/com/android/internal/telephony/uicc/IccFileHandler.java +14 −20 Original line number Diff line number Diff line Loading @@ -22,6 +22,7 @@ import android.os.Build; import android.os.Handler; import android.os.Message; import com.android.internal.annotations.VisibleForTesting; import com.android.internal.telephony.CommandsInterface; import java.util.ArrayList; Loading Loading @@ -108,7 +109,7 @@ public abstract class IccFileHandler extends Handler implements IccConstants { @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553) protected final String mAid; static class LoadLinearFixedContext { public static class LoadLinearFixedContext { int mEfid; @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553) Loading Loading @@ -145,14 +146,11 @@ public abstract class IccFileHandler extends Handler implements IccConstants { mOnLoaded = onLoaded; mPath = path; } LoadLinearFixedContext(int efid, Message onLoaded) { mEfid = efid; mRecordNum = 1; mLoadAll = true; mOnLoaded = onLoaded; mPath = null; } @VisibleForTesting public int getEfid(LoadLinearFixedContext lc) { return lc.mEfid; } /** Loading @@ -164,6 +162,13 @@ public abstract class IccFileHandler extends Handler implements IccConstants { mCi = ci; } @VisibleForTesting public IccFileHandler(CommandsInterface ci) { mParentApp = null; mAid = null; mCi = ci; } public void dispose() { } Loading Loading @@ -267,8 +272,7 @@ public abstract class IccFileHandler extends Handler implements IccConstants { * @param path Path of the EF on the card * @param onLoaded ((AsnyncResult)(onLoaded.obj)).result is the size of data int */ public void getEFTransparentRecordSize(int fileid, String path, Message onLoaded) { String efPath = (path == null) ? getEFPath(fileid) : path; public void getEFTransparentRecordSize(int fileid, Message onLoaded) { Message response = obtainMessage(EVENT_GET_EF_TRANSPARENT_SIZE_DONE, fileid, 0, onLoaded); mCi.iccIOForApp( COMMAND_GET_RESPONSE, Loading @@ -283,16 +287,6 @@ public abstract class IccFileHandler extends Handler implements IccConstants { response); } /** * Get record size for a transparent EF * * @param fileid EF id * @param onLoaded ((AsnyncResult)(onLoaded.obj)).result is the size of the data int */ public void getEFTransparentRecordSize(int fileid, Message onLoaded) { getEFTransparentRecordSize(fileid, getEFPath(fileid), onLoaded); } /** * Load all records from a SIM Linear Fixed EF * Loading tests/telephonytests/src/com/android/internal/telephony/uicc/IccFileHandlerTest.java 0 → 100644 +537 −0 File added.Preview size limit exceeded, changes collapsed. Show changes Loading
src/java/com/android/internal/telephony/uicc/IccFileHandler.java +14 −20 Original line number Diff line number Diff line Loading @@ -22,6 +22,7 @@ import android.os.Build; import android.os.Handler; import android.os.Message; import com.android.internal.annotations.VisibleForTesting; import com.android.internal.telephony.CommandsInterface; import java.util.ArrayList; Loading Loading @@ -108,7 +109,7 @@ public abstract class IccFileHandler extends Handler implements IccConstants { @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553) protected final String mAid; static class LoadLinearFixedContext { public static class LoadLinearFixedContext { int mEfid; @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553) Loading Loading @@ -145,14 +146,11 @@ public abstract class IccFileHandler extends Handler implements IccConstants { mOnLoaded = onLoaded; mPath = path; } LoadLinearFixedContext(int efid, Message onLoaded) { mEfid = efid; mRecordNum = 1; mLoadAll = true; mOnLoaded = onLoaded; mPath = null; } @VisibleForTesting public int getEfid(LoadLinearFixedContext lc) { return lc.mEfid; } /** Loading @@ -164,6 +162,13 @@ public abstract class IccFileHandler extends Handler implements IccConstants { mCi = ci; } @VisibleForTesting public IccFileHandler(CommandsInterface ci) { mParentApp = null; mAid = null; mCi = ci; } public void dispose() { } Loading Loading @@ -267,8 +272,7 @@ public abstract class IccFileHandler extends Handler implements IccConstants { * @param path Path of the EF on the card * @param onLoaded ((AsnyncResult)(onLoaded.obj)).result is the size of data int */ public void getEFTransparentRecordSize(int fileid, String path, Message onLoaded) { String efPath = (path == null) ? getEFPath(fileid) : path; public void getEFTransparentRecordSize(int fileid, Message onLoaded) { Message response = obtainMessage(EVENT_GET_EF_TRANSPARENT_SIZE_DONE, fileid, 0, onLoaded); mCi.iccIOForApp( COMMAND_GET_RESPONSE, Loading @@ -283,16 +287,6 @@ public abstract class IccFileHandler extends Handler implements IccConstants { response); } /** * Get record size for a transparent EF * * @param fileid EF id * @param onLoaded ((AsnyncResult)(onLoaded.obj)).result is the size of the data int */ public void getEFTransparentRecordSize(int fileid, Message onLoaded) { getEFTransparentRecordSize(fileid, getEFPath(fileid), onLoaded); } /** * Load all records from a SIM Linear Fixed EF * Loading
tests/telephonytests/src/com/android/internal/telephony/uicc/IccFileHandlerTest.java 0 → 100644 +537 −0 File added.Preview size limit exceeded, changes collapsed. Show changes