diff options
author | Seigo Nonaka <nona@google.com> | 2015-06-02 16:27:12 +0900 |
---|---|---|
committer | Seigo Nonaka <nona@google.com> | 2015-06-03 04:53:44 +0000 |
commit | 92adda2b616287146549d921dfe4c1199c0a4247 (patch) | |
tree | 20de940ba84c511838bd06a55a43f14beb1fbdd9 /core/java/android/view | |
parent | 11df5b66ef621c4d67f5b4980e879784de43fd70 (diff) | |
download | frameworks_base-92adda2b616287146549d921dfe4c1199c0a4247.zip frameworks_base-92adda2b616287146549d921dfe4c1199c0a4247.tar.gz frameworks_base-92adda2b616287146549d921dfe4c1199c0a4247.tar.bz2 |
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
Diffstat (limited to 'core/java/android/view')
-rw-r--r-- | core/java/android/view/textservice/SpellCheckerSession.java | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/core/java/android/view/textservice/SpellCheckerSession.java b/core/java/android/view/textservice/SpellCheckerSession.java index 84f395a..195a335 100644 --- a/core/java/android/view/textservice/SpellCheckerSession.java +++ b/core/java/android/view/textservice/SpellCheckerSession.java @@ -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() { |