Merge "Propagating core settings to the system process." into honeycomb-mr1
diff --git a/core/java/android/webkit/WebView.java b/core/java/android/webkit/WebView.java
index 975f815..642cd02 100644
--- a/core/java/android/webkit/WebView.java
+++ b/core/java/android/webkit/WebView.java
@@ -5036,6 +5036,9 @@
      * @hide pending API Council approval.
      */
     public SearchBox getSearchBox() {
+        if ((mWebViewCore == null) || (mWebViewCore.getBrowserFrame() == null)) {
+            return null;
+        }
         return mWebViewCore.getBrowserFrame().getSearchBox();
     }
 
diff --git a/core/tests/systemproperties/src/android/os/SystemPropertiesTest.java b/core/tests/systemproperties/src/android/os/SystemPropertiesTest.java
index 243ac38..544a967 100644
--- a/core/tests/systemproperties/src/android/os/SystemPropertiesTest.java
+++ b/core/tests/systemproperties/src/android/os/SystemPropertiesTest.java
@@ -23,8 +23,19 @@
 
 public class SystemPropertiesTest extends TestCase {
     private static final String KEY = "sys.testkey";
+    private static final String PERSIST_KEY = "persist.sys.testkey";
+
     @SmallTest
-    public void testLongSequencialProperties() throws Exception {
+    public void testStressPersistPropertyConsistency() throws Exception {
+        for (int i = 0; i < 100; ++i) {
+            SystemProperties.set(PERSIST_KEY, Long.toString(i));
+            long ret = SystemProperties.getLong(PERSIST_KEY, -1);
+            assertEquals(i, ret);
+        }
+    }
+
+    @SmallTest
+    public void testStressMemoryPropertyConsistency() throws Exception {
         for (int i = 0; i < 100; ++i) {
             SystemProperties.set(KEY, Long.toString(i));
             long ret = SystemProperties.getLong(KEY, -1);
diff --git a/services/input/InputDispatcher.cpp b/services/input/InputDispatcher.cpp
index 0606307..e614e81 100644
--- a/services/input/InputDispatcher.cpp
+++ b/services/input/InputDispatcher.cpp
@@ -354,8 +354,7 @@
                 }
 #endif
 
-                mThrottleState.lastEventTime = entry->eventTime < currentTime
-                        ? entry->eventTime : currentTime;
+                mThrottleState.lastEventTime = currentTime;
                 mThrottleState.lastDeviceId = deviceId;
                 mThrottleState.lastSource = source;
             }
diff --git a/services/java/com/android/server/BackupManagerService.java b/services/java/com/android/server/BackupManagerService.java
index c48f360..ea38fbb 100644
--- a/services/java/com/android/server/BackupManagerService.java
+++ b/services/java/com/android/server/BackupManagerService.java
@@ -379,6 +379,10 @@
                         }
                     }
 
+                    // Done: reset the session timeout clock
+                    removeMessages(MSG_RESTORE_TIMEOUT);
+                    sendEmptyMessageDelayed(MSG_RESTORE_TIMEOUT, TIMEOUT_RESTORE_INTERVAL);
+
                     mWakelock.release();
                 }
                 break;
diff --git a/services/java/com/android/server/InputMethodManagerService.java b/services/java/com/android/server/InputMethodManagerService.java
index 44b8590..f2cf942 100644
--- a/services/java/com/android/server/InputMethodManagerService.java
+++ b/services/java/com/android/server/InputMethodManagerService.java
@@ -1761,7 +1761,7 @@
                     enabledSubtypeSet.add(String.valueOf(subtype.hashCode()));
                 }
                 ArrayList<InputMethodSubtype> subtypes = getSubtypes(imi);
-                CharSequence label = imi.loadLabel(pm);
+                final CharSequence label = imi.loadLabel(pm);
                 if (showSubtypes && enabledSubtypeSet.size() > 0) {
                     final int subtypeCount = imi.getSubtypeCount();
                     for (int j = 0; j < subtypeCount; ++j) {
@@ -1771,8 +1771,9 @@
                             int nameResId = subtype.getNameResId();
                             String mode = subtype.getMode();
                             if (nameResId != 0) {
-                                title = pm.getText(imi.getPackageName(), nameResId,
-                                        imi.getServiceInfo().applicationInfo);
+                                title = TextUtils.concat(pm.getText(imi.getPackageName(),
+                                        nameResId, imi.getServiceInfo().applicationInfo),
+                                        " (", label, ")");
                             } else {
                                 CharSequence language = subtype.getLocale();
                                 // TODO: Use more friendly Title and UI
diff --git a/services/java/com/android/server/wm/InputManager.java b/services/java/com/android/server/wm/InputManager.java
index fc32d5a..ca1da95 100644
--- a/services/java/com/android/server/wm/InputManager.java
+++ b/services/java/com/android/server/wm/InputManager.java
@@ -549,7 +549,7 @@
             } catch (NumberFormatException e) {
             }
             if (result < 1) {
-                result = 60;
+                result = 55;
             }
             return result;
         }