Buggy code:
public class AlbumActivity extends AppCompatActivity { private FloatingActionButton fab ; private String imagePath ; private ImageView albumArt ; private SharedPreferences settingsPref ; private ArrayList < SongListItem > songList = new ArrayList < > ( ) ; private ArrayList < String > songName ; private ArrayList < String > songArtist ; private ArrayList < String > songPath ; private ArrayList < String > songAlbum ; private ArrayList < String > songId ; private ArrayList < String > songAlbumId ; @ Override protected void onCreate ( Bundle savedInstanceState ) { settingsPref = PreferenceManager . getDefaultSharedPreferences ( getBaseContext ( ) ) ; if ( settingsPref . getBoolean ( "pref_album_status_trans" , true ) ) { if ( ( VERSION . SDK_INT ) >= 21 ) getWindow ( ) . setStatusBarColor ( TRANSPARENT ) ; } else { if ( ( VERSION . SDK_INT ) >= 21 ) { Window w = getWindow ( ) ; w . setFlags ( FLAG_TRANSLUCENT_STATUS , FLAG_TRANSLUCENT_STATUS ) ; } } <START_BUG> if ( settingsPref . getBoolean ( "pref_nav_trans" , false ) ) { <END_BUG> if ( ( VERSION . SDK_INT ) >= 21 ) { getWindow ( ) . getDecorView ( ) . setSystemUiVisibility ( SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION ) ; getWindow ( ) . setNavigationBarColor ( TRANSPARENT ) ; } } super . onCreate ( savedInstanceState ) ; setContentView ( activity_album ) ; overridePendingTransition ( 0 , 0 ) ; CollapsingToolbarLayout collapsingToolbarLayout = ( ( CollapsingToolbarLayout ) ( findViewById ( collapsingtoolbarlayout_album ) ) ) ; if ( collapsingToolbarLayout != null ) collapsingToolbarLayout . setTitle ( getIntent ( ) . getStringExtra ( "albumName" ) ) ; Toolbar toolbar = ( ( Toolbar ) ( findViewById ( toolbar_album ) ) ) ; setSupportActionBar ( toolbar ) ; getSupportActionBar ( ) . setDisplayHomeAsUpEnabled ( true ) ; albumArt = ( ( ImageView ) ( findViewById ( activity_album_art ) ) ) ; final AppBarLayout appBarLayout = ( ( AppBarLayout ) ( findViewById ( appbarlayout_artist ) ) ) ; fab = ( ( FloatingActionButton ) ( findViewById ( fab_album ) ) ) ; fab . setOnClickListener ( new View . OnClickListener ( ) { @ Override public void onClick ( View v ) { Intent bro = new Intent ( ) ; bro . setAction ( ACTION_PLAY_ALBUM ) ; bro . putExtra ( "albumId" , getIntent ( ) . getLongExtra ( "albumId" , 0 ) ) ; sendBroadcast ( bro ) ; } } ) ; controlEnterAnimation ( ) ; Cursor cursor = getContentResolver ( ) . query ( EXTERNAL_CONTENT_URI , new String [ ] { Albums . _ID , Albums . ALBUM_ART } , ( ( Albums . _ID ) + "=?" ) , new String [ ] { String . valueOf ( getIntent ( ) . getLongExtra ( "albumId" , 0 ) ) } , null ) ; if ( cursor . moveToFirst ( ) ) { imagePath = cursor . getString ( cursor . getColumnIndex ( ALBUM_ART ) ) ; try { Picasso . with ( this ) . load ( new File ( imagePath ) ) . error ( default_artwork_dark ) . into ( albumArt ) ; } catch ( NullPointerException e ) { Picasso . with ( this ) . load ( default_artwork_dark ) . into ( albumArt ) ; } } Handler mainHandler = new Handler ( getMainLooper ( ) ) ; Runnable myRunnable = new Runnable ( ) { @ Override public void run ( ) { setSongList ( ) ; } } ; mainHandler . post ( myRunnable ) ; } private void controlEnterAnimation ( ) { } private void setSongList ( ) { } @ Override public boolean onOptionsItemSelected ( MenuItem item ) { } @ Override public void onBackPressed ( ) { } }

Fix:
if ( settingsPref . getBoolean ( "pref_album_nav_trans" , false ) ) {