Merge "Fix confusing Log.e message in SpellCheckerSession" into pi-dev

This commit is contained in:
TreeHugger Robot
2018-03-21 03:25:49 +00:00
committed by Android (Google) Code Review

View File

@@ -445,9 +445,15 @@ public class SpellCheckerSession {
private void processOrEnqueueTask(SpellCheckerParams scp) {
ISpellCheckerSession session;
synchronized (this) {
if (scp.mWhat == TASK_CLOSE && (mState == STATE_CLOSED_AFTER_CONNECTION
|| mState == STATE_CLOSED_BEFORE_CONNECTION)) {
// It is OK to call SpellCheckerSession#close() multiple times.
// Don't output confusing/misleading warning messages.
return;
}
if (mState != STATE_WAIT_CONNECTION && mState != STATE_CONNECTED) {
Log.e(TAG, "ignoring processOrEnqueueTask due to unexpected mState="
+ taskToString(scp.mWhat)
+ stateToString(mState)
+ " scp.mWhat=" + taskToString(scp.mWhat));
return;
}