From 91fd0ffdfd2ee65d702c905cf0073345ee156c4a Mon Sep 17 00:00:00 2001 From: Eric Seidel Date: Fri, 20 Mar 2015 12:45:25 -0700 Subject: [PATCH] Attempt to make us not crash on KitKat. https://github.com/domokit/mojo/issues/68 R=abarth@chromium.org Review URL: https://codereview.chromium.org/1026873002 --- .../src/flutter/shell/org/domokit/sky/shell/SkyActivity.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/engine/src/flutter/shell/org/domokit/sky/shell/SkyActivity.java b/engine/src/flutter/shell/org/domokit/sky/shell/SkyActivity.java index e37114d648..28226391ed 100644 --- a/engine/src/flutter/shell/org/domokit/sky/shell/SkyActivity.java +++ b/engine/src/flutter/shell/org/domokit/sky/shell/SkyActivity.java @@ -5,6 +5,7 @@ package org.domokit.sky.shell; import android.app.Activity; +import android.os.Build; import android.os.Bundle; import android.view.View; import android.view.WindowManager; @@ -24,7 +25,9 @@ public class SkyActivity extends Activity { getWindow().addFlags( WindowManager.LayoutParams.FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS); - getWindow().setStatusBarColor(0x40000000); + if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) { + getWindow().setStatusBarColor(0x40000000); + } getWindow().getDecorView().setSystemUiVisibility( View.SYSTEM_UI_FLAG_LAYOUT_STABLE | View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN);