From c6dd77d04a94b7fa0659a099e5b85b70f5f2ea9f Mon Sep 17 00:00:00 2001 From: Naveen Kalla Date: Wed, 7 Apr 2010 17:54:33 -0700 Subject: [PATCH 1/6] telephony: Fix CID when CID is unknown Unknown CID is indicated as 0xFFFFFFFF by ril. When telephony receives that value, set CID to UNKNOWN. --- .../java/android/telephony/NeighboringCellInfo.java | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/telephony/java/android/telephony/NeighboringCellInfo.java b/telephony/java/android/telephony/NeighboringCellInfo.java index ad7dfc9e28587..2f7666d118bce 100644 --- a/telephony/java/android/telephony/NeighboringCellInfo.java +++ b/telephony/java/android/telephony/NeighboringCellInfo.java @@ -133,8 +133,11 @@ public class NeighboringCellInfo implements Parcelable case NETWORK_TYPE_GPRS: case NETWORK_TYPE_EDGE: mNetworkType = radioType; - mLac = Integer.valueOf(location.substring(0, 4), 16); - mCid = Integer.valueOf(location.substring(4), 16); + // check if 0xFFFFFFFF for UNKNOWN_CID + if (!location.equalsIgnoreCase("FFFFFFFF")) { + mCid = Integer.valueOf(location.substring(4), 16); + mLac = Integer.valueOf(location.substring(0, 4), 16); + } break; case NETWORK_TYPE_UMTS: case NETWORK_TYPE_HSDPA: @@ -293,4 +296,4 @@ public class NeighboringCellInfo implements Parcelable return new NeighboringCellInfo[size]; } }; -} \ No newline at end of file +} From 9ee5c2215a9fdbc4395bd3151c1c13f41cdd15aa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maciej=20Bia=C5=82ka?= Date: Wed, 24 Mar 2010 10:25:40 +0100 Subject: [PATCH 2/6] Set alpha value for newly created dim surface. Newly created dim surface has alpha set to 1 (opaque), but it is assumed in dim animation code that it is 0 (transparent). When new dim surface is created and expected dim value is calculated to 0 then alpha is never set making screen black (dut to default aplha=1) when dim surface is shown. --- services/java/com/android/server/WindowManagerService.java | 1 + 1 file changed, 1 insertion(+) diff --git a/services/java/com/android/server/WindowManagerService.java b/services/java/com/android/server/WindowManagerService.java index d209cfaa1982e..2f5b89c33caf2 100644 --- a/services/java/com/android/server/WindowManagerService.java +++ b/services/java/com/android/server/WindowManagerService.java @@ -10986,6 +10986,7 @@ public class WindowManagerService extends IWindowManager.Stub try { mDimSurface = new Surface(session, 0, -1, 16, 16, PixelFormat.OPAQUE, Surface.FX_SURFACE_DIM); + mDimSurface.setAlpha(0.0f); } catch (Exception e) { Log.e(TAG, "Exception creating Dim surface", e); } From f19670ac8637e80a09aed3183072f9ec989028c9 Mon Sep 17 00:00:00 2001 From: Melanie Clements Date: Sat, 1 May 2010 22:48:20 -0400 Subject: [PATCH 3/6] Fix for bug 2467152 files with spaces fail to open. from http://code.google.com/p/android/issues/detail?id=4638 If you try to use a WebView to open an image (of any type) that is stored in your project's assets/ directory the image will be written to the screen as text (instead of drawn as an image) if the filename contains a space. The problem stems from MimeTypeMap, which determines the file type from the url. Spaces, represented as '%20' are not included in the list of acceptable characters for an image file name, causing the image to be treated as plain text. I am remedying this by adding '%' to the list. Change-Id: I29e3da57f3cdaa63ed60b1e6977ba62a0dd108e5 --- core/java/android/webkit/MimeTypeMap.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/java/android/webkit/MimeTypeMap.java b/core/java/android/webkit/MimeTypeMap.java index fffba1bdfc050..60dfce7ab8421 100644 --- a/core/java/android/webkit/MimeTypeMap.java +++ b/core/java/android/webkit/MimeTypeMap.java @@ -67,7 +67,7 @@ public class MimeTypeMap { // if the filename contains special characters, we don't // consider it valid for our matching purposes: if (filename.length() > 0 && - Pattern.matches("[a-zA-Z_0-9\\.\\-\\(\\)]+", filename)) { + Pattern.matches("[a-zA-Z_0-9\\.\\-\\(\\)\\%]+", filename)) { int dotPos = filename.lastIndexOf('.'); if (0 <= dotPos) { return filename.substring(dotPos + 1); From 0ba2d4782c62df6538399f80a91abe3867c449df Mon Sep 17 00:00:00 2001 From: Nicholas Killewald Date: Mon, 3 May 2010 02:17:08 -0400 Subject: [PATCH 4/6] Fixed deserialization problem in DatePicker. During onRestoreInstanceState for DatePicker, the internal state of the widget is restored properly (thus setting the internal year, month, and day), but the spinners aren't visually updated to that state immediately. That is to say, the internal state of the widget doesn't match the spinners in that case, which can cause confusion. Change-Id: I96d1a299d0ee159d41450470acb30a3bf6006d44 --- core/java/android/widget/DatePicker.java | 1 + 1 file changed, 1 insertion(+) diff --git a/core/java/android/widget/DatePicker.java b/core/java/android/widget/DatePicker.java index 736475e6fecff..ebaf4743123c3 100644 --- a/core/java/android/widget/DatePicker.java +++ b/core/java/android/widget/DatePicker.java @@ -316,6 +316,7 @@ public class DatePicker extends FrameLayout { mYear = ss.getYear(); mMonth = ss.getMonth(); mDay = ss.getDay(); + updateSpinners(); } /** From 5763c1f501e5941b0bdd6e8330a811c6e1448590 Mon Sep 17 00:00:00 2001 From: Daisuke Miyakawa Date: Mon, 15 Mar 2010 11:48:39 +0900 Subject: [PATCH 5/6] Call register_localized_collators() with the current locale. Make JNI function for setLocale() call register_localized_collators() with the current locale, not previous one, every time it is possible. This is a partial cherry-pick of b945639d0c3fa1850c07a2b80f476c8d242a8bde BUG: 2514026 Change-Id: I584f1f68814dc084e699714e9d14a034123b49da --- core/jni/android_database_SQLiteDatabase.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/core/jni/android_database_SQLiteDatabase.cpp b/core/jni/android_database_SQLiteDatabase.cpp index 020aff4a5c3b3..f20dadb561a66 100644 --- a/core/jni/android_database_SQLiteDatabase.cpp +++ b/core/jni/android_database_SQLiteDatabase.cpp @@ -262,7 +262,7 @@ static void native_setLocale(JNIEnv* env, jobject object, jstring localeString, goto done; } - dbLocale = (rowCount >= 1) ? meta[1 * colCount + 0] : NULL; + dbLocale = (rowCount >= 1) ? meta[colCount] : NULL; if (dbLocale != NULL && !strcmp(dbLocale, locale8)) { // database locale is the same as the desired locale; set up the collators and go @@ -273,7 +273,8 @@ static void native_setLocale(JNIEnv* env, jobject object, jstring localeString, if ((flags & OPEN_READONLY)) { // read-only database, so we're going to have to put up with whatever we got - err = register_localized_collators(handle, dbLocale ? dbLocale : locale8, UTF16_STORAGE); + // For registering new index. Not for modifing the read-only database. + err = register_localized_collators(handle, locale8, UTF16_STORAGE); if (err != SQLITE_OK) throw_sqlite3_exception(env, handle); goto done; } @@ -286,7 +287,7 @@ static void native_setLocale(JNIEnv* env, jobject object, jstring localeString, goto done; } - err = register_localized_collators(handle, dbLocale ? dbLocale : locale8, UTF16_STORAGE); + err = register_localized_collators(handle, locale8, UTF16_STORAGE); if (err != SQLITE_OK) { LOGE("register_localized_collators() failed setting locale\n"); throw_sqlite3_exception(env, handle); From b032bc037399110f41cfdb838a792b3c65756323 Mon Sep 17 00:00:00 2001 From: mogimo Date: Sat, 3 Oct 2009 03:13:56 +0900 Subject: [PATCH 6/6] Add new keycodes for the convenience of Japanese IMEs Change-Id: Ibd308cef11261147856258595f6ca0137e03e05c --- api/current.xml | 22 ++++++++++++++++++++++ core/java/android/view/KeyEvent.java | 6 +++++- core/res/res/values/attrs.xml | 2 ++ include/ui/KeycodeLabels.h | 6 +++++- 4 files changed, 34 insertions(+), 2 deletions(-) mode change 100644 => 100755 core/java/android/view/KeyEvent.java mode change 100644 => 100755 core/res/res/values/attrs.xml mode change 100644 => 100755 include/ui/KeycodeLabels.h diff --git a/api/current.xml b/api/current.xml index 3b65d958e1185..d8702de9bb9bf 100644 --- a/api/current.xml +++ b/api/current.xml @@ -153254,6 +153254,17 @@ visibility="public" > + + + + + + diff --git a/include/ui/KeycodeLabels.h b/include/ui/KeycodeLabels.h old mode 100644 new mode 100755 index 749155ebab89a..e81d0f9064dc8 --- a/include/ui/KeycodeLabels.h +++ b/include/ui/KeycodeLabels.h @@ -116,6 +116,8 @@ static const KeycodeLabel KEYCODES[] = { { "MUTE", 91 }, { "PAGE_UP", 92 }, { "PAGE_DOWN", 93 }, + { "PICTSYMBOLS", 94 }, + { "SWITCH_CHARSET", 95 }, // NOTE: If you add a new keycode here you must also add it to: // (enum KeyCode, in this file) @@ -222,7 +224,9 @@ typedef enum KeyCode { kKeyCodeForward = 90, kKeyCodeMute = 91, kKeyCodePageUp = 92, - kKeyCodePageDown = 93 + kKeyCodePageDown = 93, + kKeyCodePictSymbols = 94, + kKeyCodeSwitchCharset = 95 } KeyCode; static const KeycodeLabel FLAGS[] = {