summaryrefslogtreecommitdiffstats
path: root/core/java/android
diff options
context:
space:
mode:
Diffstat (limited to 'core/java/android')
-rw-r--r--core/java/android/content/ContentResolver.java2
-rw-r--r--core/java/android/database/AbstractCursor.java8
-rw-r--r--core/java/android/view/inputmethod/InputMethodManager.java7
3 files changed, 13 insertions, 4 deletions
diff --git a/core/java/android/content/ContentResolver.java b/core/java/android/content/ContentResolver.java
index 4ab8272..9e406d4 100644
--- a/core/java/android/content/ContentResolver.java
+++ b/core/java/android/content/ContentResolver.java
@@ -1219,7 +1219,7 @@ public abstract class ContentResolver {
public final void registerContentObserver(Uri uri, boolean notifyForDescendents,
ContentObserver observer)
{
- registerContentObserver(uri, notifyForDescendents, observer, UserHandle.getCallingUserId());
+ registerContentObserver(uri, notifyForDescendents, observer, UserHandle.myUserId());
}
/** @hide - designated user version */
diff --git a/core/java/android/database/AbstractCursor.java b/core/java/android/database/AbstractCursor.java
index e7ff92d..300b4d1 100644
--- a/core/java/android/database/AbstractCursor.java
+++ b/core/java/android/database/AbstractCursor.java
@@ -19,6 +19,7 @@ package android.database;
import android.content.ContentResolver;
import android.net.Uri;
import android.os.Bundle;
+import android.os.UserHandle;
import android.util.Log;
import java.lang.ref.WeakReference;
@@ -350,6 +351,11 @@ public abstract class AbstractCursor implements CrossProcessCursor {
* specific row URI, or a base URI for a whole class of content.
*/
public void setNotificationUri(ContentResolver cr, Uri notifyUri) {
+ setNotificationUri(cr, notifyUri, UserHandle.myUserId());
+ }
+
+ /** @hide - set the notification uri but with an observer for a particular user's view */
+ public void setNotificationUri(ContentResolver cr, Uri notifyUri, int userHandle) {
synchronized (mSelfObserverLock) {
mNotifyUri = notifyUri;
mContentResolver = cr;
@@ -357,7 +363,7 @@ public abstract class AbstractCursor implements CrossProcessCursor {
mContentResolver.unregisterContentObserver(mSelfObserver);
}
mSelfObserver = new SelfContentObserver(this);
- mContentResolver.registerContentObserver(mNotifyUri, true, mSelfObserver);
+ mContentResolver.registerContentObserver(mNotifyUri, true, mSelfObserver, userHandle);
mSelfObserverRegistered = true;
}
}
diff --git a/core/java/android/view/inputmethod/InputMethodManager.java b/core/java/android/view/inputmethod/InputMethodManager.java
index 3ea6df3..4a3f846 100644
--- a/core/java/android/view/inputmethod/InputMethodManager.java
+++ b/core/java/android/view/inputmethod/InputMethodManager.java
@@ -1078,8 +1078,11 @@ public final class InputMethodManager {
Handler vh = view.getHandler();
if (vh == null) {
// If the view doesn't have a handler, something has changed out
- // from under us, so just bail.
- if (DEBUG) Log.v(TAG, "ABORT input: no handler for view!");
+ // from under us, so just close the current input.
+ // If we don't close the current input, the current input method can remain on the
+ // screen without a connection.
+ if (DEBUG) Log.v(TAG, "ABORT input: no handler for view! Close current input.");
+ closeCurrentInput();
return false;
}
if (vh.getLooper() != Looper.myLooper()) {