There is a line in my code, that marked as yellow:
getSupportActionBar().setDisplayShowHomeEnabled(true);
After installing appcompat-v7
If you're extending a Theme.AppCompat
which has an action bar or have called setSupportActionBar(...)
yourself, calling getSupportActionBar()
is safe.
To get around the warning do a null check or
assert getSupportActionBar() != null;
which will throw an exception if the expression is not true. Both have their uses.