Add check for Kit Kat when setting system UI visibility on focus change.

This commit is contained in:
Mark Anderson 2014-03-11 22:48:05 +00:00
parent 579f5ae3f8
commit 0ed61d89c3

View file

@ -10,6 +10,7 @@ import android.content.Intent;
import android.database.Cursor;
import android.net.Uri;
import android.os.AsyncTask;
import android.os.Build;
import android.os.Bundle;
import android.support.v4.app.DialogFragment;
import android.support.v4.app.FragmentManager;
@ -368,7 +369,7 @@ public abstract class Reading extends NbFragmentActivity implements OnPageChange
enableOverlays();
// Ensure that we come out of immersive view if the activity no longer has focus
if (!hasFocus) {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT && !hasFocus) {
getWindow().getDecorView().setSystemUiVisibility(View.SYSTEM_UI_FLAG_VISIBLE);
}
}