Skip to content
Commit 0cf7b310 authored by Yohei Yukawa's avatar Yohei Yukawa
Browse files

Fix confusing Log.e message in SpellCheckerSession

With this CL, calling SpellCheckerSession#close() multiple times will
no longer show the following error message in logcat, which was quite
confusing.

  E SpellCheckerSession: ignoring processOrEnqueueTask due to
    unexpected mState=TASK_CLOSE scp.mWhat=TASK_CLOSE

Note that with a recent CL [1], we now more often see the above
message.  A typical scenario is:

  1. App creates SpellCheckerSession x.
  2. App calls x.close().
  3. x is garbage-collected. ART calls x.finalize(), which internally
     calls x.close() again.

 [1]: I4e00c3a2cec93d1dacff20546e481fe757279661
      9b643671

Bug: 72974646
Fix: 72974646
Test: Made sure that no error message in question with a test app
      that calls SpellCheckerSession#close() multiple times then
      trigger SpellCheckerSession#finalize().
Change-Id: Ie9690860e6d0406dc6746cd03c28f693e65c1dde
parent 37854178
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment