Tusky
Tusky copied to clipboard
Fix various lint warnings
- Remove empty file
ExampleInstrumentedTest.java
. - Replace deprecated
MigrationTestHelper
constructor call. - Add reified inline extension methods for
Bundle
andIntent
to retrieveParcelable
andSerializable
objects by calling the coreBundleCompat
andIntentCompat
methods, to allow shorter syntax and removing the need to pass the class explicitly. - Replace deprecated
drawable.setColorFilter()
with simplerdrawable.setTint()
(uses blend modeSRC_IN
by default, has the same effect asSRC_ATOP
when the source is a color). - Rename shadowed variables (mostly caught exceptions).
- Remove unnecessary
.orEmpty()
on non-null fields. - Replace
.size() == 0
with.isEmpty()
. - Prevent
NullPointerException
whenaccount.getDisplayName()
isnull
inStatusBaseViewHolder.setDisplayName()
. - Declare
customEmojis
argument as non-null inStatusBaseViewHolder.setDisplayName()
because it callsCustomEmojiHelper.emojify()
which now requires it to be non-null. - Prevent
NullPointerException
when no matching filter is found inStatusBaseViewHolder.setupFilterPlaceholder()
. - Remove deprecated call to
setTargetFragment()
(target fragment is not used anyway). - Remove deprecated call to
isUserVisibleHint()
and test if the view has been destroyed instead. - Remove some unused imports.
- Remove unnecessary casts.
- Rename arguments to supertype names when a warning is shown.
- Prevent a potential memory leak by clearing the
toolbarVisibilityDisposable
reference inonDestroyView()
.