Skip to content

Commit cd66855

Browse files
Amith YamasaniAndroid (Google) Code Review
authored andcommitted
Merge "Fix a crash in InputMethodManagerService due to permission failure." into jb-mr1-dev
2 parents f704e9f + f043de9 commit cd66855

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

services/java/com/android/server/InputMethodManagerService.java

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1561,7 +1561,12 @@ public boolean notifySuggestionPicked(SuggestionSpan span, String originalString
15611561
intent.putExtra(SuggestionSpan.SUGGESTION_SPAN_PICKED_BEFORE, originalString);
15621562
intent.putExtra(SuggestionSpan.SUGGESTION_SPAN_PICKED_AFTER, suggestions[index]);
15631563
intent.putExtra(SuggestionSpan.SUGGESTION_SPAN_PICKED_HASHCODE, span.hashCode());
1564-
mContext.sendBroadcastAsUser(intent, UserHandle.CURRENT);
1564+
final long ident = Binder.clearCallingIdentity();
1565+
try {
1566+
mContext.sendBroadcastAsUser(intent, UserHandle.CURRENT);
1567+
} finally {
1568+
Binder.restoreCallingIdentity(ident);
1569+
}
15651570
return true;
15661571
}
15671572
}

0 commit comments

Comments
 (0)