关键代码在Settings\smali\com\android\settings\usim\usimReceiver.smali中,这里就不附上了,请自行查看研究
最直接的解决方法是删除Settings\AndroidManifest.xml中的
<receiver android:name=".usim.usimReceiver"> <intent-filter> <action android:name="android.intent.action.SIM_STATE_CHANGED" /> <action android:name="com.android.settings.action.ISUSIMREADING" /> <action android:name="android.internal.telephony.sky.intent.action.TIME_VALID_CHECK" /> </intent-filter> </receiver>之后,也可以删除Settings\smali\com\android\settings\usim\文件夹,未发现有其他影响
invoke-direct {p0, v6, p1}, Lcom/android/settings/usim/usimReceiver;->changeLanguage(Ljava/lang/String;Landroid/content/Context;)V共有12处
最后附上Settings\smali\com\android\settings\usim\usimReceiver.smali对应的java代码供参考
// Decompiled by Jad v1.5.8e2. Copyright 2001 Pavel Kouznetsov. // Jad home page: http://kpdus.tripod.com/jad.html // Decompiler options: packimports(3) fieldsfirst ansi space // Source File Name: usimReceiver.java package com.android.settings.usim; import android.app.ActivityManagerNative; import android.app.IActivityManager; import android.app.backup.BackupManager; import android.content.*; import android.content.res.Configuration; import android.os.*; import android.util.Log; import com.android.internal.telephony.*; import java.util.Locale; public class usimReceiver extends BroadcastReceiver { private static final String COLUMN_NAMES[]; static final String PHONES_PROJECTION[]; private static final String USIM_COLUMN_NAMES[]; private static boolean isReadEF = 0; private Handler mHandler; private ISkyTelephony mPhone; public usimReceiver() { 1 1_1 = new 1(); mHandler = 1_1; } private void changeLanguage(String s, Context context) { String s1; String s2; s1 = Locale.getDefault().getLanguage(); s2 = Locale.KOREAN.getLanguage(); if (s1.equals(s2)) goto _L2; else goto _L1 _L1: String s3 = Locale.KOREA.getLanguage(); if (!s1.equals(s3)) goto _L3; else goto _L2 _L2: if (!s.equals("ko_KR")) goto _L5; else goto _L4 _L4: int i = Log.e("usimReceiverLocale", "No Change"); int j = Log.e("usimReceiver", "Load Dialton"); Handler handler = mHandler; Message message = mHandler.obtainMessage(203); boolean flag = handler.sendMessageDelayed(message, 20L); _L7: return; _L3: String s4 = Locale.ENGLISH.getLanguage(); if (!s1.equals(s4) || !s.equals("en_US")) goto _L5; else goto _L6 _L6: int k = Log.e("usimReceiverLocale", "No Change"); int l = Log.e("usimReceiver", "Load Dialton"); Handler handler1 = mHandler; Message message1 = mHandler.obtainMessage(203); boolean flag1 = handler1.sendMessageDelayed(message1, 20L); goto _L7 _L5: IActivityManager iactivitymanager; Configuration configuration; iactivitymanager = ActivityManagerNative.getDefault(); configuration = iactivitymanager.getConfiguration(); if (!s.equals("ko_KR")) goto _L9; else goto _L8 _L8: Locale locale = Locale.KOREA; configuration.locale = locale; _L11: configuration.userSetLocale = true; iactivitymanager.updateConfiguration(configuration); BackupManager.dataChanged("com.android.providers.settings"); int i1 = Log.e("usimReceiver", "Load Dialton"); Handler handler2 = mHandler; Message message2 = mHandler.obtainMessage(203); boolean flag2 = handler2.sendMessageDelayed(message2, 20L); goto _L7 _L9: if (!s.equals("en_US")) goto _L11; else goto _L10 _L10: Locale locale1 = Locale.ENGLISH; configuration.locale = locale1; goto _L11 RemoteException remoteexception; remoteexception; remoteexception.printStackTrace(); int j1 = Log.e("usimReceiver", "Load Dialton"); Handler handler3 = mHandler; Message message3 = mHandler.obtainMessage(203); boolean flag3 = handler3.sendMessageDelayed(message3, 20L); goto _L7 Exception exception; exception; int k1 = Log.e("usimReceiver", "Load Dialton"); Handler handler4 = mHandler; Message message4 = mHandler.obtainMessage(203); boolean flag4 = handler4.sendMessageDelayed(message4, 20L); throw exception; } private void checkUsimLanguage(Context context) { ISkyTelephony iskytelephony = com.android.internal.telephony.ISkyTelephony.Stub.asInterface(ServiceManager.getService("iskytelephony")); mPhone = iskytelephony; if (mPhone == null) goto _L2; else goto _L1 _L1: if (!SkyUsim.isUsimCard()) goto _L4; else goto _L3 _L3: byte abyte0[]; int i = Log.d("usimReceiverLocale", "USIM Mode"); abyte0 = mPhone.loadEFTransparent(28421); if (abyte0 == null) goto _L6; else goto _L5 _L5: int j = 0; _L17: int k = abyte0.length; if (j >= k) goto _L6; else goto _L7 _L7: if (abyte0[j] != 107) goto _L9; else goto _L8 _L8: int l = j + 1; if (abyte0[l] == 114) goto _L10; else goto _L9 _L9: if (abyte0[j] != 107) goto _L12; else goto _L11 _L11: int i1 = j + 1; if (abyte0[i1] != 111) goto _L12; else goto _L10 _L10: int j1 = Log.e("usimReceiverLocale", " language change KO From LI"); changeLanguage("ko_KR", context); _L16: return; _L12: if (abyte0[j] != 101) goto _L14; else goto _L13 _L13: int k1 = j + 1; if (abyte0[k1] != 110) goto _L14; else goto _L15 _L15: int l1 = Log.e("usimReceiverLocale", " language change EN From LI"); changeLanguage("en_US", context); goto _L16 RemoteException remoteexception; remoteexception; int i2 = Log.e("usimReceiverLocale", "checkUsimLanguage() ERROR"); goto _L16 _L14: j += 2; goto _L17 _L6: byte abyte1[] = mPhone.loadEFTransparent(12037); if (abyte1 == null) goto _L2; else goto _L18 _L18: j = 0; _L28: int j2 = abyte1.length; if (j >= j2) goto _L2; else goto _L19 _L19: if (abyte1[j] != 107) goto _L21; else goto _L20 _L20: int k2 = j + 1; if (abyte1[k2] == 114) goto _L22; else goto _L21 _L21: if (abyte1[j] != 107) goto _L24; else goto _L23 _L23: int l2 = j + 1; if (abyte1[l2] != 111) goto _L24; else goto _L22 _L22: int i3 = Log.d("usimReceiverLocale", " language change KO From PL"); changeLanguage("ko_KR", context); goto _L16 _L24: if (abyte1[j] != 101) goto _L26; else goto _L25 _L25: int j3 = j + 1; if (abyte1[j3] != 110) goto _L26; else goto _L27 _L27: int k3 = Log.d("usimReceiverLocale", " language change EN From PL"); changeLanguage("en_US", context); goto _L16 _L26: j += 2; goto _L28 _L4: if (!SkyUsim.isCsimCard()) goto _L30; else goto _L29 _L29: int l3 = Log.d("usimReceiverLocale", "GSM Mode"); abyte1 = mPhone.loadEFTransparent(12037); if (abyte1 == null) goto _L2; else goto _L31 _L31: j = 0; _L41: int i4 = abyte1.length; if (j >= i4) goto _L2; else goto _L32 _L32: if (abyte1[j] != 107) goto _L34; else goto _L33 _L33: int j4 = j + 1; if (abyte1[j4] == 114) goto _L35; else goto _L34 _L34: if (abyte1[j] != 107) goto _L37; else goto _L36 _L36: int k4 = j + 1; if (abyte1[k4] != 111) goto _L37; else goto _L35 _L35: int l4 = Log.d("usimReceiverLocale", " language change KO From PL"); changeLanguage("ko_KR", context); goto _L16 _L37: if (abyte1[j] != 101) goto _L39; else goto _L38 _L38: int i5 = j + 1; if (abyte1[i5] != 110) goto _L39; else goto _L40 _L40: int j5 = Log.d("usimReceiverLocale", " language change EN From PL"); changeLanguage("en_US", context); goto _L16 _L39: j += 2; goto _L41 _L30: int k5 = Log.d("usimReceiverLocale", "Others Mode"); abyte1 = mPhone.loadEFTransparent(12037); if (abyte1 == null) goto _L43; else goto _L42 _L42: j = 0; _L53: int l5 = abyte1.length; if (j >= l5) goto _L43; else goto _L44 _L44: if (abyte1[j] != 107) goto _L46; else goto _L45 _L45: int i6 = j + 1; if (abyte1[i6] == 114) goto _L47; else goto _L46 _L46: if (abyte1[j] != 107) goto _L49; else goto _L48 _L48: int j6 = j + 1; if (abyte1[j6] != 111) goto _L49; else goto _L47 _L47: int k6 = Log.d("usimReceiverLocale", " language change KO From PL"); changeLanguage("ko_KR", context); goto _L16 _L49: if (abyte1[j] != 101) goto _L51; else goto _L50 _L50: int l6 = j + 1; if (abyte1[l6] != 110) goto _L51; else goto _L52 _L52: int i7 = Log.d("usimReceiverLocale", " language change EN From PL"); changeLanguage("en_US", context); goto _L16 _L51: j += 2; goto _L53 _L43: abyte0 = mPhone.loadEFTransparent(28421); StringBuilder stringbuilder = (new StringBuilder()).append("checkUsimLanguage() :"); String s = IccUtils.bytesToHexString(abyte1); String s1 = stringbuilder.append(s).toString(); int j7 = Log.d("usimReceiver", s1); if (abyte0 == null) goto _L2; else goto _L54 _L54: int k7 = 0; _L60: int l7 = abyte0.length; if (k7 >= l7) goto _L2; else goto _L55 _L55: if (abyte0[k7] != 37) goto _L57; else goto _L56 _L56: int i8 = Log.e("usimReceiverLocale", " language change KO From LangList"); changeLanguage("ko_KR", context); goto _L16 _L57: if (abyte0[k7] != 1) goto _L59; else goto _L58 _L58: int j8 = Log.e("usimReceiverLocale", " language change EN From LangList"); changeLanguage("en_US", context); goto _L16 _L59: k7++; goto _L60 _L2: String s2 = Locale.getDefault().getLanguage(); String s3 = (new StringBuilder()).append("Default Locale language is : ").append(s2).toString(); int k8 = Log.d("usimReceiver", s3); if (s2 == null) break MISSING_BLOCK_LABEL_921; String s4 = Locale.ENGLISH.getLanguage(); if (!s2.equals(s4)) break MISSING_BLOCK_LABEL_921; changeLanguage("en_US", context); goto _L16 changeLanguage("ko_KR", context); goto _L16 } protected void log(String s) { String s1 = (new StringBuilder()).append("[usimReceiver] ").append(s).toString(); int i = Log.d("usimReceiver", s1); } public void onReceive(Context context, Intent intent) { String s1; String s = (new StringBuilder()).append("onReceive ").append(intent).toString(); log(s); s1 = intent.getAction(); if (s1.equals("com.android.settings.action.ISUSIMREADING")) { Intent intent1 = new Intent("com.android.settings.action.USIMREADINGDONE"); context.sendBroadcast(intent1); } if (!s1.equals("android.intent.action.SIM_STATE_CHANGED")) goto _L2; else goto _L1 _L1: String s2 = intent.getStringExtra("ss"); if (!"LOCKED".equals(s2)) goto _L4; else goto _L3 _L3: isReadEF = true; int i = Log.e("usimReceiverLocale", "Locked & Lock Event"); checkUsimLanguage(context); StringBuilder stringbuilder = (new StringBuilder()).append(""); boolean flag = isReadEF; String s3 = stringbuilder.append(flag).toString(); int j = Log.e("usimReceiverLocale", s3); _L2: return; _L4: if ("READY".equals(s2)) { StringBuilder stringbuilder1 = (new StringBuilder()).append(""); boolean flag1 = isReadEF; String s4 = stringbuilder1.append(flag1).toString(); int k = Log.e("usimReceiverLocale", s4); if (!isReadEF) { int l = Log.e("usimReceiverLocale", "unLocked & Ready Event"); checkUsimLanguage(context); } } if (true) goto _L2; else goto _L5 _L5: } static { String as[] = new String[5]; as[0] = "name"; as[1] = "number"; as[2] = "addnumber"; as[3] = "groupid"; as[4] = "email"; COLUMN_NAMES = as; String as1[] = new String[6]; as1[0] = "_id"; as1[1] = "name"; as1[2] = "number"; as1[3] = "addnumber"; as1[4] = "groupid"; as1[5] = "email"; USIM_COLUMN_NAMES = as1; String as2[] = new String[5]; as2[0] = "_id"; as2[1] = "display_name"; as2[2] = "type"; as2[3] = "label"; as2[4] = "number"; PHONES_PROJECTION = as2; } private class 1 extends Handler { final usimReceiver this$0; public void handleMessage(Message message) { message.what; JVM INSTR tableswitch 203 203: default 24 // 203 25; goto _L1 _L2 _L1: return; _L2: log("============USIM_MSG_ID_DIALTONE============="); SkyTouchFB.loadDialSound(); if (true) goto _L1; else goto _L3 _L3: } 1() { this$0 = usimReceiver.this; super(); } } }
转载请注明出处:http://blog.csdn.net/su_ky/article/details/7747394