Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
Android SuppressWarnings list
//src: http://kurrytran.blogspot.ru/2014/05/android-studio-list-of-suppress-warning.html
//https://android.googlesource.com/platform/tools/adt/idea/+/jb-mr2-dev/adt-branding/src/META-INF/AndroidIdePlugin.xml
//https://android.googlesource.com/platform/tools/adt/idea/+/jb-mr2-dev/android/src/META-INF/plugin.xml
//Most Common Annotations
@SuppressWarnings("all")
@SuppressWarnings("unchecked")
@SuppressWarnings({"JavaDoc"})
@SuppressWarnings({"UnusedDeclaration"})
@SuppressWarnings({"UnusedParameters"})
@SuppressWarnings({"FieldCanBeLocal"})
@SuppressWarnings("StringEquality")
@SuppressWarnings("boxing")
@SuppressWarnings({"unchecked", "RawUseOfParameterizedType"})
@SuppressWarnings("deprecation")
@SuppressWarnings("FinalizeDoesntCallSuperFinalize")
@SuppressWarnings("ThrowableInstanceNeverThrown")
@SuppressWarnings("cast")
@SuppressWarnings("nls")
@SuppressWarnings({"unchecked","SuspiciousSystemArraycopy"})
@SuppressWarnings({ "serial", "rawtypes" })
@SuppressWarnings({"EmptyCatchBlock", "PointlessBooleanExpression"})
@SuppressWarnings({"JavadocReference"})
@SuppressWarnings("RedundantStringConstructorCall")
@SuppressWarnings("PublicInnerClass")
@SuppressWarnings("ConstantConditions")
@SuppressWarnings("ReturnOfNull")
@SuppressWarnings("SuspiciousNameCombination")
@SuppressWarnings("ThrowableResultOfMethodCallIgnored")
@SuppressWarnings("PackageVisibleField")
@SuppressWarnings({"AssignmentToMethodParameter", "ConstantConditions"})
@SuppressWarnings("ObjectToString")
@SuppressWarnings("AccessOfSystemProperties")
@SuppressWarnings("CloneDoesntCallSuperClone")
@SuppressWarnings("CloneableClassInSecureContext")
@SuppressWarnings({"PublicField"})
@SuppressWarnings({"HardCodedStringLiteral"})
@SuppressWarnings("SpellCheckingInspection")
@SuppressWarnings("JUnitTestCaseWithNonTrivialConstructors")
@SuppressWarnings("IOResourceOpenedButNotSafelyClosed")
@SuppressWarnings({"MethodMayBeStatic"})
@SuppressWarnings("ResultOfMethodCallIgnored")
@SuppressWarnings("ForLoopReplaceableByForEach")
@SuppressWarnings({ "AutoUnboxing" })
@SuppressWarnings({"CallToSimpleGetterFromWithinClass"})
@SuppressWarnings({"SimplifiableIfStatement"})
//Local Inspections
@SuppressWarnings("UndesirableClassUsage")
@SuppressWarnings("FileEqualsUsage")
@SuppressWarnings("GtkPreferredJComboBoxRenderer")
@SuppressWarnings("UnsafeVfsRecursion")
@SuppressWarnings("ConstantConditions")
@SuppressWarnings("UnusedAssignment")
@SuppressWarnings("NumericOverflow")
@SuppressWarnings("RedundantCast")
@SuppressWarnings("RedundantTypeArguments")
@SuppressWarnings("RedundantArrayCreation")
@SuppressWarnings("SuspiciousMethodCalls")
@SuppressWarnings("LocalCanBeFinal")
@SuppressWarnings("JavaDoc")
@SuppressWarnings("JavadocReference")
@SuppressWarnings("Deprecation")
@SuppressWarnings("DeprecatedClassUsageInspection")
@SuppressWarnings("EqualsAndHashcode")
@SuppressWarnings("Since15")
@SuppressWarnings("Dependency")
@SuppressWarnings("FieldCanBeLocal")
@SuppressWarnings("ParameterCanBeLocal")
@SuppressWarnings("NullableProblems")
@SuppressWarnings("TestOnlyProblems")
@SuppressWarnings("WrongPackageStatement")
@SuppressWarnings("SillyAssignment")
@SuppressWarnings("RedundantThrowsDeclaration")
@SuppressWarnings("AccessStaticViaInstance")
@SuppressWarnings("DefaultFileTemplate")
@SuppressWarnings("UnusedDeclaration")
@SuppressWarnings("SuspiciousNameCombination")
@SuppressWarnings("DuplicateThrows")
@SuppressWarnings("FieldAccessNotGuarded")
@SuppressWarnings("InstanceGuardedByStatic")
@SuppressWarnings("NonFinalFieldInImmutable")
@SuppressWarnings("NonFinalGuard")
@SuppressWarnings("StaticGuardedByInstance")
@SuppressWarnings("UnknownGuard")
@SuppressWarnings("Convert2Diamond")
@SuppressWarnings("Convert2Lambda")
@SuppressWarnings("Anonymous2MethodRef")
@SuppressWarnings("Convert2MethodRef")
@SuppressWarnings("CodeBlock2Expr")
@SuppressWarnings("JavacQuirks")
@SuppressWarnings("MagicConstant")
//Global Inspections
@SuppressWarnings("WeakerAccess")
@SuppressWarnings("CanBeFinal")
@SuppressWarnings("UnusedParameters")
@SuppressWarnings("SameParameterValue")
@SuppressWarnings("UnusedReturnValue")
@SuppressWarnings("SameReturnValue")
@SuppressWarnings("EmptyMethod")
@SuppressWarnings("RedundantThrows")
@SuppressWarnings("UnnecessaryModuleDependencyInspection")
@SuppressWarnings("RedundantSuppression")

Pickage commented Oct 24, 2016

ACTION_REQUEST_IGNORE_BATTERY_OPTIMIZATIONS works only "all"?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment