[Streak 5 Q&A, Help & Troubleshooting] hunderteins:
diffs in framework.jar

I decompiled framework.jar with jad to detemine what hPa changed. That is not complete. Some of it is just garbage. But the diff gives some hints where to lay hand on, to port MIUI to the Streak:

diff -Nruw MIUI.us_passion_2.2.17/framework_decom/android/telephony/PhoneNumberUtils.jad MIUI.us_streak_2.2.17/framework_decom/android/telephony/PhoneNumberUtils.jad

--- MIUI.us_passion_2.2.17/framework_decom/android/telephony/PhoneNumberUtils.jad	2012-03-10 20:25:05.000000000 +0100

+++ MIUI.us_streak_2.2.17/framework_decom/android/telephony/PhoneNumberUtils.jad	2012-03-10 20:28:08.000000000 +0100

@@ -2134,6 +2134,103 @@

JapanesePhoneNumberFormatter.format(editable);

}

+ public static void formatKoreanNumber(Editable editable)

+ {

+ int i = editable.length();

+ if(i > 6) goto _L2; else goto _L1

+_L1:

+ return;

+_L2:

+ int k;

+ int ai[];

+ editable.subSequence(0, i);

+ for(int j = 0; j < editable.length();)

+ if(editable.charAt(j) == '-')

+ editable.delete(j, j + 1);

+ else

+ j++;

+

+ k = editable.length();

+ ai = new int[2];

+ if(editable.charAt(0) != '0' || editable.charAt(1) != '2') goto _L4; else goto _L3

+_L3:

+ k;

+ JVM INSTR tableswitch 7 10: default 136

+ // 7 139

+ // 8 139

+ // 9 139

+ // 10 195;

+ goto _L5 _L6 _L6 _L6 _L7

+_L5:

+ continue; /* Loop/switch isn't completed */

+_L6:

+ byte byte0;

+ ai[0] = 2;

+ ai[1] = 5;

+ byte0 = 2;

+_L9:

+ for(int l = 0; l < byte0; l++)

+ {

+ int j1 = ai[l];

+ editable.replace(j1 + l, j1 + l, "-");

+ }

+

+ break; /* Loop/switch isn't completed */

+_L7:

+ ai[0] = 2;

+ ai[1] = 6;

+ byte0 = 2;

+ if(true) goto _L9; else goto _L8

+_L4:

+ switch(k)

+ {

+ default:

+ continue; /* Loop/switch isn't completed */

+

+ case 7: // '\007'

+ ai[0] = 3;

+ byte0 = 1;

+ break;

+

+ case 8: // '\b'

+ ai[0] = 4;

+ byte0 = 1;

+ break;

+

+ case 9: // '\t'

+ case 10: // '\n'

+ ai[0] = 3;

+ ai[1] = 6;

+ byte0 = 2;

+ break;

+

+ case 11: // '\013'

+ ai[0] = 3;

+ ai[1] = 7;

+ byte0 = 2;

+ break;

+

+ case 12: // '\f'

+ ai[0] = 4;

+ ai[1] = 8;

+ byte0 = 2;

+ break;

+ }

+ continue; /* Loop/switch isn't completed */

+_L8:

+ int i1 = editable.length();

+ while(i1 > 0 && editable.charAt(i1 - 1) == '-')

+ {

+ editable.delete(i1 - 1, i1);

+ i1--;

+ }

+ continue; /* Loop/switch isn't completed */

+ if(true) goto _L9; else goto _L10

+_L10:

+ if(true) goto _L1; else goto _L11

+_L11:

+ }

+

public static void formatNanpNumber(Editable editable)

{

int i;

@@ -2298,6 +2395,10 @@

case 2: // '\002'

formatJapaneseNumber(editable);

break;

+

+ case 3: // '\003'

+ formatKoreanNumber(editable);

+ break;

}

continue; /* Loop/switch isn't completed */

if(true) goto _L1; else goto _L3

@@ -2385,6 +2486,9 @@

if("jp".compareToIgnoreCase(s) == 0)

k = 2;

else

+ if("kr".compareToIgnoreCase(s) == 0)

+ k = 3;

+ else

k = 0;

goto _L4

}

@@ -3456,6 +3560,7 @@

private static final boolean COUNTLY_CALLING_CALL[];

private static final boolean DBG = false;

public static final int FORMAT_JAPAN = 2;

+ public static final int FORMAT_KOREA = 3;

public static final int FORMAT_NANP = 1;

public static final int FORMAT_UNKNOWN = 0;

private static final Pattern GLOBAL_PHONE_NUMBER_PATTERN = Pattern.compile("[\\+]?[0-9.-]+");

diff -Nruw MIUI.us_passion_2.2.17/framework_decom/com/android/internal/telephony/gsm/SIMFileHandler.jad MIUI.us_streak_2.2.17/framework_decom/com/android/internal/telephony/gsm/SIMFileHandler.jad

--- MIUI.us_passion_2.2.17/framework_decom/com/android/internal/telephony/gsm/SIMFileHandler.jad	2012-03-10 20:25:35.000000000 +0100

+++ MIUI.us_streak_2.2.17/framework_decom/com/android/internal/telephony/gsm/SIMFileHandler.jad	2012-03-10 20:28:43.000000000 +0100

@@ -34,55 +34,98 @@

protected String getEFPath(int i)

{

- i;

- JVM INSTR lookupswitch 18: default 156

- // 20272: 214

- // 28433: 208

- // 28435: 208

- // 28436: 208

- // 28438: 208

- // 28439: 208

- // 28440: 208

- // 28472: 202

- // 28476: 196

- // 28486: 202

- // 28589: 202

- // 28613: 202

- // 28615: 202

- // 28616: 202

- // 28617: 202

- // 28618: 202

- // 28619: 202

- // 28621: 202;

- goto _L1 _L2 _L3 _L3 _L3 _L3 _L3 _L3 _L4 _L5 _L4 _L4 _L4 _L4 _L4 _L4 _L4 _L4 _L4

+ if(RIL.mAPPTYPE_VAL != com.android.internal.telephony.IccCardApplication.AppType.APPTYPE_USIM) goto _L2; else goto _L1

_L1:

- String s1 = getCommonIccEFPath(i);

- if(s1 != null) goto _L7; else goto _L6

-_L6:

- IccCard icccard = super.phone.getIccCard();

- if(icccard == null || !icccard.isApplicationOnIcc(com.android.internal.telephony.IccCardApplication.AppType.APPTYPE_USIM)) goto _L9; else goto _L8

-_L8:

- String s = "3F007F105F3A";

-_L11:

+ i;

+ JVM INSTR lookupswitch 21: default 188

+ // 20272: 211

+ // 28433: 205

+ // 28435: 205

+ // 28436: 205

+ // 28438: 205

+ // 28439: 205

+ // 28440: 205

+ // 28472: 205

+ // 28475: 205

+ // 28476: 205

+ // 28480: 205

+ // 28486: 205

+ // 28589: 205

+ // 28613: 205

+ // 28614: 205

+ // 28615: 205

+ // 28616: 205

+ // 28617: 205

+ // 28618: 205

+ // 28619: 205

+ // 28621: 205;

+ goto _L3 _L4 _L5 _L5 _L5 _L5 _L5 _L5 _L5 _L5 _L5 _L5 _L5 _L5 _L5 _L5 _L5 _L5 _L5 _L5 _L5 _L5

+_L3:

+ String s;

+ String s2 = getCommonIccEFPath(i);

+ if(s2 == null)

+ s = "3F007F105F3A";

+ else

+ s = s2;

+_L7:

return s;

_L5:

- s = "3F007F10";

+ s = "3F007FFF";

continue; /* Loop/switch isn't completed */

_L4:

- s = "3F007F20";

- continue; /* Loop/switch isn't completed */

-_L3:

- s = "3F007F20";

+ s = "3F007F105F3A";

continue; /* Loop/switch isn't completed */

_L2:

+ switch(i)

+ {

+ default:

+ String s1 = getCommonIccEFPath(i);

+ if(s1 == null)

+ {

+ IccCard icccard = phone.getIccCard();

+ if(icccard != null && icccard.isApplicationOnIcc(com.android.internal.telephony.IccCardApplication.AppType.APPTYPE_USIM))

+ {

s = "3F007F105F3A";

- continue; /* Loop/switch isn't completed */

-_L9:

+ break;

+ }

Log.e("GSM", "Error: EF Path being returned in null");

-_L7:

+ }

s = s1;

- if(true) goto _L11; else goto _L10

-_L10:

+ break;

+

+ case 28476:

+ s = "3F007F10";

+ break;

+

+ case 28472:

+ case 28486:

+ case 28589:

+ case 28613:

+ case 28615:

+ case 28616:

+ case 28617:

+ case 28618:

+ case 28619:

+ case 28621:

+ s = "3F007F20";

+ break;

+

+ case 28433:

+ case 28435:

+ case 28436:

+ case 28437:

+ case 28438:

+ case 28439:

+ case 28440:

+ s = "3F007F20";

+ break;

+

+ case 20272:

+ s = "3F007F105F3A";

+ break;

+ }

+ if(true) goto _L7; else goto _L6

+_L6:

}

public void handleMessage(Message message)

diff -Nruw MIUI.us_passion_2.2.17/framework_decom/com/android/internal/telephony/IccConstants.jad MIUI.us_streak_2.2.17/framework_decom/com/android/internal/telephony/IccConstants.jad

--- MIUI.us_passion_2.2.17/framework_decom/com/android/internal/telephony/IccConstants.jad	2012-03-10 20:25:31.000000000 +0100

+++ MIUI.us_streak_2.2.17/framework_decom/com/android/internal/telephony/IccConstants.jad	2012-03-10 20:28:37.000000000 +0100

@@ -9,6 +9,7 @@

public interface IccConstants

{

+ public static final String ADF = "7FFF";

public static final String DF_CDMA = "7F25";

public static final String DF_GRAPHICS = "5F50";

public static final String DF_GSM = "7F20";

@@ -18,6 +19,7 @@

public static final int EF_ADN = 28474;

public static final int EF_CFF_CPHS = 28435;

public static final int EF_CFIS = 28619;

+ public static final int EF_CSP_CPHS = 28437;

public static final int EF_CST = 28466;

public static final int EF_EXT1 = 28490;

public static final int EF_EXT2 = 28491;

@@ -32,6 +34,7 @@

public static final int EF_MBI = 28617;

public static final int EF_MSISDN = 28480;

public static final int EF_MWIS = 28618;

+ public static final int EF_OPL = 28614;

public static final int EF_PBR = 20272;

public static final int EF_PNN = 28613;

public static final int EF_RUIM_SPN = 28481;

diff -Nruw MIUI.us_passion_2.2.17/framework_decom/com/android/internal/telephony/PhoneFactory.jad MIUI.us_streak_2.2.17/framework_decom/com/android/internal/telephony/PhoneFactory.jad

--- MIUI.us_passion_2.2.17/framework_decom/com/android/internal/telephony/PhoneFactory.jad	2012-03-10 20:25:32.000000000 +0100

+++ MIUI.us_streak_2.2.17/framework_decom/com/android/internal/telephony/PhoneFactory.jad	2012-03-10 20:28:39.000000000 +0100

@@ -18,7 +18,7 @@

// Referenced classes of package com.android.internal.telephony:

// PhoneProxy, Phone, DefaultPhoneNotifier, SamsungRIL,

-// HTCRIL, LGEStarRIL, SemcRIL, MotoTegraRIL,

+// HTCRIL, LGEStarRIL, SemcRIL, QualcommNoSimReadyRIL,

// RIL, CommandsInterface, PhoneNotifier

public class PhoneFactory

@@ -164,10 +164,10 @@

Log.i("PHONE", "Using Semc RIL");

sCommandsInterface = new SemcRIL(context, j, k);

} else

- if("mototegra".equals(s))

+ if("streak".equals(s))

{

- Log.i("PHONE", "Using Motorola Tegra2 RIL");

- sCommandsInterface = new MotoTegraRIL(context, j, k);

+ Log.i("PHONE", "Using Dell Streak Qualcomm RIL");

+ sCommandsInterface = new QualcommNoSimReadyRIL(context, j, k);

} else

{

sCommandsInterface = new RIL(context, j, k);

diff -Nruw MIUI.us_passion_2.2.17/framework_decom/com/android/internal/telephony/RIL.jad MIUI.us_streak_2.2.17/framework_decom/com/android/internal/telephony/RIL.jad

--- MIUI.us_passion_2.2.17/framework_decom/com/android/internal/telephony/RIL.jad	2012-03-10 20:25:33.000000000 +0100

+++ MIUI.us_streak_2.2.17/framework_decom/com/android/internal/telephony/RIL.jad	2012-03-10 20:28:40.000000000 +0100

@@ -1139,7 +1139,7 @@

{

RILRequest rilrequest = RILRequest.obtain(6, message);

riljLog((new StringBuilder()).append(rilrequest.serialString()).append("> ").append(requestToString(rilrequest.mRequest)).toString());

- rilrequest.mp.writeInt(2);

+ rilrequest.mp.writeString(mAid);

rilrequest.mp.writeString(s);

rilrequest.mp.writeString(s1);

send(rilrequest);

@@ -1149,7 +1149,7 @@

{

RILRequest rilrequest = RILRequest.obtain(7, message);

riljLog((new StringBuilder()).append(rilrequest.serialString()).append("> ").append(requestToString(rilrequest.mRequest)).toString());

- rilrequest.mp.writeInt(2);

+ rilrequest.mp.writeString(mAid);

rilrequest.mp.writeString(s);

rilrequest.mp.writeString(s1);

send(rilrequest);

@@ -1349,7 +1349,8 @@

public void getIMSI(Message message)

{

RILRequest rilrequest = RILRequest.obtain(11, message);

- riljLog((new StringBuilder()).append(rilrequest.serialString()).append("> getIMSI:RIL_REQUEST_GET_IMSI ").append(11).append(" ").append(requestToString(rilrequest.mRequest)).toString());

+ rilrequest.mp.writeString(mAid);

+ riljLog((new StringBuilder()).append(rilrequest.serialString()).append("> getIMSI:RIL_REQUEST_GET_IMSI ").append(11).append(" aid: ").append(mAid).append(" ").append(requestToString(rilrequest.mRequest)).toString());

send(rilrequest);

}

@@ -1539,6 +1540,7 @@

String s2, Message message)

{

RILRequest rilrequest = RILRequest.obtain(28, message);

+ rilrequest.mp.writeString(mAid);

rilrequest.mp.writeInt(i);

rilrequest.mp.writeInt(j);

rilrequest.mp.writeString(s);

@@ -1547,7 +1549,7 @@

rilrequest.mp.writeInt(i1);

rilrequest.mp.writeString(s1);

rilrequest.mp.writeString(s2);

- riljLog((new StringBuilder()).append(rilrequest.serialString()).append("> iccIO: ").append(requestToString(rilrequest.mRequest)).append(" 0x").append(Integer.toHexString(i)).append(" 0x").append(Integer.toHexString(j)).append(" ").append(" path: ").append(s).append(",").append(k).append(",").append(l).append(",").append(i1).toString());

+ riljLog((new StringBuilder()).append(rilrequest.serialString()).append("> iccIO: ").append(" aid: ").append(mAid).append(" ").append(requestToString(rilrequest.mRequest)).append(" 0x").append(Integer.toHexString(i)).append(" 0x").append(Integer.toHexString(j)).append(" ").append(" path: ").append(s).append(",").append(k).append(",").append(l).append(",").append(i1).toString());

send(rilrequest);

}

@@ -2610,8 +2612,9 @@

public void queryFacilityLock(String s, String s1, int i, Message message)

{

RILRequest rilrequest = RILRequest.obtain(42, message);

- riljLog((new StringBuilder()).append(rilrequest.serialString()).append("> ").append(requestToString(rilrequest.mRequest)).toString());

- rilrequest.mp.writeInt(3);

+ riljLog((new StringBuilder()).append(rilrequest.serialString()).append("> ").append(requestToString(rilrequest.mRequest)).append(" aid: ").append(mAid).append(" facility: ").append(s).toString());

+ rilrequest.mp.writeInt(4);

+ rilrequest.mp.writeString(mAid);

rilrequest.mp.writeString(s);

rilrequest.mp.writeString(s1);

rilrequest.mp.writeString(Integer.toString(i));

@@ -2865,6 +2868,8 @@

if(s != null)

s = s.split(" ")[0];

datacallstate.address = s;

+ parcel.readInt();

+ parcel.readInt();

arraylist.add(datacallstate);

}

@@ -2904,30 +2909,73 @@

protected Object responseIccCardStatus(Parcel parcel)

{

- IccCardStatus icccardstatus = new IccCardStatus();

+ IccCardStatus icccardstatus;

+ int ai[];

+ int ai1[];

+ int i;

+ int k;

+ int i1;

+ int j1;

+ icccardstatus = new IccCardStatus();

+ ai = new int[8];

+ ai1 = new int[8];

icccardstatus.setCardState(parcel.readInt());

icccardstatus.setUniversalPinState(parcel.readInt());

- icccardstatus.setGsmUmtsSubscriptionAppIndex(parcel.readInt());

- icccardstatus.setCdmaSubscriptionAppIndex(parcel.readInt());

- int i = parcel.readInt();

- if(i > 8)

- i = 8;

- icccardstatus.setNumApplications(i);

+ i = parcel.readInt();

for(int j = 0; j < i; j++)

- {

- IccCardApplication icccardapplication = new IccCardApplication();

- icccardapplication.app_type = icccardapplication.AppTypeFromRILInt(parcel.readInt());

- icccardapplication.app_state = icccardapplication.AppStateFromRILInt(parcel.readInt());

- icccardapplication.perso_substate = icccardapplication.PersoSubstateFromRILInt(parcel.readInt());

+ ai[j] = parcel.readInt();

+

+ k = parcel.readInt();

+ for(int l = 0; l < k; l++)

+ ai1[l] = parcel.readInt();

+

+ i1 = parcel.readInt();

+ if(i1 > 8)

+ i1 = 8;

+ icccardstatus.setNumApplications(i1);

+ j1 = 0;

+_L9:

+ if(j1 >= i1) goto _L2; else goto _L1

+_L1:

+ IccCardApplication icccardapplication;

+ int k1;

+ int l1;

+ int i2;

+ icccardapplication = new IccCardApplication();

+ k1 = parcel.readInt();

+ icccardapplication.app_type = icccardapplication.AppTypeFromRILInt(k1);

+ l1 = parcel.readInt();

+ icccardapplication.app_state = icccardapplication.AppStateFromRILInt(l1);

+ i2 = parcel.readInt();

+ icccardapplication.perso_substate = icccardapplication.PersoSubstateFromRILInt(i2);

icccardapplication.aid = parcel.readString();

icccardapplication.app_label = parcel.readString();

icccardapplication.pin1_replaced = parcel.readInt();

icccardapplication.pin1 = icccardapplication.PinStateFromRILInt(parcel.readInt());

icccardapplication.pin2 = icccardapplication.PinStateFromRILInt(parcel.readInt());

+ if(k1 <= 0 || l1 <= 0 || i2 <= 0) goto _L4; else goto _L3

+_L3:

+ if(i <= 0) goto _L6; else goto _L5

+_L5:

+ mAPPTYPE_VAL = icccardapplication.app_type;

+ icccardstatus.setGsmUmtsSubscriptionAppIndex(ai[j1]);

+_L7:

+ mAid = icccardapplication.aid;

+_L4:

icccardstatus.addApplication(icccardapplication);

+ j1++;

+ continue; /* Loop/switch isn't completed */

+_L6:

+ if(k > 0)

+ {

+ mAPPTYPE_VAL = icccardapplication.app_type;

+ icccardstatus.setCdmaSubscriptionAppIndex(ai1[j1]);

}

-

+ if(true) goto _L7; else goto _L2

+_L2:

return icccardstatus;

+ if(true) goto _L9; else goto _L8

+_L8:

}

protected Object responseInts(Parcel parcel)

@@ -3330,8 +3378,9 @@

public void setFacilityLock(String s, boolean flag, String s1, int i, Message message)

{

RILRequest rilrequest = RILRequest.obtain(43, message);

- riljLog((new StringBuilder()).append(rilrequest.serialString()).append("> ").append(requestToString(rilrequest.mRequest)).toString());

- rilrequest.mp.writeInt(4);

+ riljLog((new StringBuilder()).append(rilrequest.serialString()).append("> ").append(requestToString(rilrequest.mRequest)).append(" aid: ").append(mAid).append(" facility: ").append(s).append(" lockstate: ").append(flag).toString());

+ rilrequest.mp.writeInt(5);

+ rilrequest.mp.writeString(mAid);

rilrequest.mp.writeString(s);

String s2;

if(flag)

@@ -3551,7 +3600,7 @@

{

RILRequest rilrequest = RILRequest.obtain(2, message);

riljLog((new StringBuilder()).append(rilrequest.serialString()).append("> ").append(requestToString(rilrequest.mRequest)).toString());

- rilrequest.mp.writeInt(1);

+ rilrequest.mp.writeString(mAid);

rilrequest.mp.writeString(s);

send(rilrequest);

}

@@ -3560,7 +3609,7 @@

{

RILRequest rilrequest = RILRequest.obtain(4, message);

riljLog((new StringBuilder()).append(rilrequest.serialString()).append("> ").append(requestToString(rilrequest.mRequest)).toString());

- rilrequest.mp.writeInt(1);

+ rilrequest.mp.writeString(mAid);

rilrequest.mp.writeString(s);

send(rilrequest);

}

@@ -3569,7 +3618,7 @@

{

RILRequest rilrequest = RILRequest.obtain(3, message);

riljLog((new StringBuilder()).append(rilrequest.serialString()).append("> ").append(requestToString(rilrequest.mRequest)).toString());

- rilrequest.mp.writeInt(2);

+ rilrequest.mp.writeString(mAid);

rilrequest.mp.writeString(s);

rilrequest.mp.writeString(s1);

send(rilrequest);

@@ -3579,7 +3628,7 @@

{

RILRequest rilrequest = RILRequest.obtain(5, message);

riljLog((new StringBuilder()).append(rilrequest.serialString()).append("> ").append(requestToString(rilrequest.mRequest)).toString());

- rilrequest.mp.writeInt(2);

+ rilrequest.mp.writeString(mAid);

rilrequest.mp.writeString(s);

rilrequest.mp.writeString(s1);

send(rilrequest);

@@ -3708,6 +3757,8 @@

static final int RIL_MAX_COMMAND_BYTES = 8192;

static final String SOCKET_NAME_RIL = "rild";

static final int SOCKET_OPEN_RETRY_MILLIS = 4000;

+ public static IccCardApplication.AppType mAPPTYPE_VAL;

+ public static String mAid;

protected Context mContext;

protected boolean mInitialRadioStateChange;

BroadcastReceiver mIntentReceiver;