Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 92adda2b authored by Seigo Nonaka's avatar Seigo Nonaka
Browse files

Use final in favor of initialization safety.

Making a member field final would be beneficial not
only for the readability but also for the initialization
safety.
Leaving SpellCheckerSession#mSpellCheckerSessionListener
non-final does not make sense not only because we never
change that member field once SpellCheckerSession object
is created and but also because SpellCheckerSession
instance is designed to be accessed from multiple threads
at the same time, no matter if it has something to do
with Bug 18945456 or not.

Change-Id: I1a7ebb54a5d0beddee8799fc5b0800c6e1059099
parent 11df5b66
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -98,11 +98,11 @@ public class SpellCheckerSession {
    private final InternalListener mInternalListener;
    private final ITextServicesManager mTextServicesManager;
    private final SpellCheckerInfo mSpellCheckerInfo;
    private final SpellCheckerSessionListener mSpellCheckerSessionListener;
    private final SpellCheckerSessionListenerImpl mSpellCheckerSessionListenerImpl;
    private final SpellCheckerSubtype mSubtype;

    private boolean mIsUsed;
    private SpellCheckerSessionListener mSpellCheckerSessionListener;

    /** Handler that will execute the main tasks */
    private final Handler mHandler = new Handler() {