From cd75706117432e33d11639e675bcff50479a6bb9 Mon Sep 17 00:00:00 2001 From: Amith Yamasani Date: Fri, 19 Oct 2012 18:23:52 -0700 Subject: System server should always send broadcasts to a specific or all users Bug: 7368245 Log a warning if the system process calls unqualified sendBroadcast() and other calls. As a result of the logging above, found a few more method calls such as bindService() that would benefit from being more explicit to avoid future confusion and reduce the log warnings. Change-Id: I17f15c8be9adf7becd456d6abbab606f19befdbf --- services/java/com/android/server/InputMethodManagerService.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'services/java/com/android/server/InputMethodManagerService.java') diff --git a/services/java/com/android/server/InputMethodManagerService.java b/services/java/com/android/server/InputMethodManagerService.java index ffbfef6..679a22a 100644 --- a/services/java/com/android/server/InputMethodManagerService.java +++ b/services/java/com/android/server/InputMethodManagerService.java @@ -1561,7 +1561,7 @@ public class InputMethodManagerService extends IInputMethodManager.Stub intent.putExtra(SuggestionSpan.SUGGESTION_SPAN_PICKED_BEFORE, originalString); intent.putExtra(SuggestionSpan.SUGGESTION_SPAN_PICKED_AFTER, suggestions[index]); intent.putExtra(SuggestionSpan.SUGGESTION_SPAN_PICKED_HASHCODE, span.hashCode()); - mContext.sendBroadcast(intent); + mContext.sendBroadcastAsUser(intent, UserHandle.CURRENT); return true; } } @@ -1649,7 +1649,7 @@ public class InputMethodManagerService extends IInputMethodManager.Stub Intent intent = new Intent(Intent.ACTION_INPUT_METHOD_CHANGED); intent.addFlags(Intent.FLAG_RECEIVER_REPLACE_PENDING); intent.putExtra("input_method_id", id); - mContext.sendBroadcast(intent); + mContext.sendBroadcastAsUser(intent, UserHandle.CURRENT); } unbindCurrentClientLocked(); } finally { -- cgit v1.1