Language Support 에서 Input Method 만 ibus를 선택 후 시스템 restart.
이후 태스크 메뉴의 ibus 아이콘을 클릭하여 Preference 에서 Input Method 에 Korean 을 추가하고 Input Method On/Off 단축키를 Shift+space로 설정
NOTE: Must be JDK 1.6 - Don't use other versions.
Correct file will be something like: jdk-6u##-linux-x64.bin , where ## is the version number and will change with updates.
5.6 - Close and open new terminal.
6.3 - Close and open new terminal.
NOTE: If you have trouble syncing due to connection issues, try repo sync -j1. It's slower but some ISPs have issues with -j16
Want to make sure you didn't get any connection errors and have the complete repository? Just run the repo sync command again. It can't give you ANY errors.
Go get a beer. And another. And another...
Get more beer...
6.9 - Close and open new terminal.
Go get a beer. And another. And another...
8.2 - Optional: Download Google Apps for Jelly Bean from http://goo.im/gapps and place it on the root of the SD card.
8.3 - Flash both of these .zip files from recovery.
Call your mother. She misses you.
...and that's it.
NOTE: If you have trouble syncing due to connection issues, try repo sync -j1. It's slower but some ISPs have issues with -j16
...get beer, build and install.
Want to go "Steve Jobs" on the Android build? (Warning: Will take a gazillion years to re-build everything again)
diff --git a/core/java/com/google/android/mms/pdu/CharacterSets.java b/core/java/com/google/android/mms/pdu/CharacterSets.java
index 4e22ca5..78441b3 100644
--- a/core/java/com/google/android/mms/pdu/CharacterSets.java
+++ b/core/java/com/google/android/mms/pdu/CharacterSets.java
@@ -40,6 +40,7 @@ public class CharacterSets {
public static final int ISO_8859_8 = 0x0B;
public static final int ISO_8859_9 = 0x0C;
public static final int SHIFT_JIS = 0x11;
+ public static final int EUC_KR = 0x26;
public static final int UTF_8 = 0x6A;
public static final int BIG5 = 0x07EA;
public static final int UCS2 = 0x03E8;
@@ -66,6 +67,7 @@ public class CharacterSets {
ISO_8859_8,
ISO_8859_9,
SHIFT_JIS,
+ EUC_KR,
UTF_8,
BIG5,
UCS2,
@@ -87,6 +89,7 @@ public class CharacterSets {
public static final String MIMENAME_ISO_8859_8 = "iso-8859-8";
public static final String MIMENAME_ISO_8859_9 = "iso-8859-9";
public static final String MIMENAME_SHIFT_JIS = "shift_JIS";
+ public static final String MIMENAME_EUC_KR = "euc-kr";
public static final String MIMENAME_UTF_8 = "utf-8";
public static final String MIMENAME_BIG5 = "big5";
public static final String MIMENAME_UCS2 = "iso-10646-ucs-2";
@@ -110,6 +113,7 @@ public class CharacterSets {
MIMENAME_ISO_8859_8,
MIMENAME_ISO_8859_9,
MIMENAME_SHIFT_JIS,
+ MIMENAME_EUC_KR,
MIMENAME_UTF_8,
MIMENAME_BIG5,
MIMENAME_UCS2,
diff --git a/core/java/com/google/android/mms/pdu/PduPersister.java b/core/java/com/google/android/mms/pdu/PduPersister.java
index 9fdd204..09c2214 100644
--- a/core/java/com/google/android/mms/pdu/PduPersister.java
+++ b/core/java/com/google/android/mms/pdu/PduPersister.java
@@ -425,8 +425,13 @@ public class PduPersister {
if (ContentType.TEXT_PLAIN.equals(type) || ContentType.APP_SMIL.equals(type)
|| ContentType.TEXT_HTML.equals(type)) {
String text = c.getString(PART_COLUMN_TEXT);
- byte [] blob = new EncodedStringValue(text != null ? text : "")
- .getTextString();
+ byte [] blob;
+ try {
+ blob = (text != null ? text : "").getBytes(CharacterSets.getMimeName(charset));
+ } catch (Exception e) {
+ Log.w(TAG, "Failed to decode an MMS text.", e);
+ blob = new byte[0];
+ }
baos.write(blob, 0, blob.length);
} else {
@@ -741,7 +746,7 @@ public class PduPersister {
|| ContentType.APP_SMIL.equals(contentType)
|| ContentType.TEXT_HTML.equals(contentType)) {
ContentValues cv = new ContentValues();
- cv.put(Telephony.Mms.Part.TEXT, new EncodedStringValue(data).getString());
+ cv.put(Telephony.Mms.Part.TEXT, new EncodedStringValue(part.getCharset(), data).getString());
if (mContentResolver.update(uri, cv, null, null) != 1) {
throw new MmsException("unable to update " + uri.toString());
}
diff --git a/telephony/java/com/android/internal/telephony/SimRegionCache.java b/telephony/java/com/android/internal/telephony/SimRegionCache.java
index 2cf6d25..7825781 100644
--- a/telephony/java/com/android/internal/telephony/SimRegionCache.java
+++ b/telephony/java/com/android/internal/telephony/SimRegionCache.java
@@ -17,14 +17,58 @@
package com.android.internal.telephony;
import android.os.SystemProperties;
+import android.util.Log;
public class SimRegionCache {
+
+ private static final String LOG_TAG = "GSM";
+ private static final String PROPERTY_CACHED_MCC = "gsm.cachedMcc";
+
public static final int MCC_UNSET = Integer.MIN_VALUE;
public static final int MCC_KOREAN = 450;
private static int regionFromMcc = MCC_UNSET;
/**
+ * Updates the cache of the SIM card region code manually with the
+ * specified MCC (Mobile Country Code). Specify null if you want
+ * to get the ICC operator numeric from SystemProperties.
+ */
+ public static void setRegion(String mcc) {
+ if (mcc == null) {
+ if (regionFromMcc != MCC_UNSET) {
+ return;
+ }
+ mcc = SystemProperties.get(PROPERTY_CACHED_MCC, null);
+ if (mcc == null) {
+ mcc = SystemProperties.get(TelephonyProperties.PROPERTY_ICC_OPERATOR_NUMERIC, null);
+ }
+ }
+ if (mcc == null || mcc.length() < 3) {
+ regionFromMcc = MCC_UNSET;
+ return;
+ }
+
+ mcc = mcc.substring(0, 3);
+
+ try {
+ regionFromMcc = Integer.parseInt(mcc);
+ } catch (Exception e) {
+ Log.w(LOG_TAG, "Invalid MCC: " + mcc, e);
+ return;
+ }
+
+ // Store the cached MCC in the system properties to avoid class loader issues.
+ SystemProperties.set(PROPERTY_CACHED_MCC, mcc);
+
+ if (regionFromMcc == MCC_KOREAN) {
+ Log.w(LOG_TAG, "Korean SIM detected - alternative message encoding might be applied on the received SMS and MMS messages.");
+ } else {
+ Log.d(LOG_TAG, "Detected MCC: " + regionFromMcc);
+ }
+ }
+
+ /**
* Returns the region as read from the MCC of the SIM card.
* If the property {@link TelephonyProperties#
* PROPERTY_ICC_OPERATOR_NUMERIC}
@@ -34,17 +78,7 @@ public class SimRegionCache {
*/
public static int getRegion() {
if (regionFromMcc == MCC_UNSET) {
- String plmn = SystemProperties.get(
- TelephonyProperties.PROPERTY_ICC_OPERATOR_NUMERIC,
- null);
-
- if (plmn != null && plmn.length() >= 3) {
- try {
- regionFromMcc = Integer.parseInt(plmn.substring(0, 3));
- } catch(Exception e) {
- // Nothing that can be done here.
- }
- }
+ setRegion(null);
}
return regionFromMcc;
}
diff --git a/telephony/java/com/android/internal/telephony/gsm/SIMRecords.java b/telephony/java/com/android/internal/telephony/gsm/SIMRecords.java
index b4e7b63..ddd1c5d 100644
--- a/telephony/java/com/android/internal/telephony/gsm/SIMRecords.java
+++ b/telephony/java/com/android/internal/telephony/gsm/SIMRecords.java
@@ -35,6 +35,7 @@ import com.android.internal.telephony.IccUtils;
import com.android.internal.telephony.IccVmFixedException;
import com.android.internal.telephony.IccVmNotSupportedException;
import com.android.internal.telephony.MccTable;
+import com.android.internal.telephony.SimRegionCache;
import java.util.ArrayList;
@@ -498,6 +499,8 @@ public final class SIMRecords extends IccRecords {
Log.d(LOG_TAG, "IMSI: " + imsi.substring(0, 6) + "xxxxxxxxx");
+ SimRegionCache.setRegion(imsi);
+
if (mncLength == UNKNOWN) {
// the SIM has told us all it knows, but it didn't know the mnc length.
// guess using the mcc
diff --git a/telephony/java/com/android/internal/telephony/gsm/SmsMessage.java b/telephony/java/com/android/internal/telephony/gsm/SmsMessage.java
index d87f395..331648c 100644
--- a/telephony/java/com/android/internal/telephony/gsm/SmsMessage.java
+++ b/telephony/java/com/android/internal/telephony/gsm/SmsMessage.java
@@ -791,7 +791,7 @@ public class SmsMessage extends SmsMessageBase{
String ret;
try {
- ret = new String(pdu, cur, byteCount, "KSC5601");
+ ret = new String(pdu, cur, byteCount, "EUC-KR");
} catch (UnsupportedEncodingException ex) {
// Should return same as ENCODING_UNKNOWN on error.
ret = null;
@@ -1075,11 +1075,21 @@ public class SmsMessage extends SmsMessageBase{
break;
case 1: // 8 bit data
- case 3: // reserved
Log.w(LOG_TAG, "1 - Unsupported SMS data coding scheme "
+ (dataCodingScheme & 0xff));
encodingType = ENCODING_8BIT;
break;
+
+ case 3: // reserved (or KSC5601 for Korean SIM)
+ Log.w(LOG_TAG, "3 - Unsupported SMS data coding scheme "
+ + (dataCodingScheme & 0xff));
+ if (SimRegionCache.getRegion() == SimRegionCache.MCC_KOREAN) {
+ Log.w(LOG_TAG, "Korean SIM, using KSC5601 for decoding.");
+ encodingType = ENCODING_KSC5601;
+ } else {
+ encodingType = ENCODING_8BIT;
+ }
+ break;
}
}
} else if ((dataCodingScheme & 0xf0) == 0xf0) {
댓글을 달아 주세요