aboutsummaryrefslogtreecommitdiffstats
path: root/app
diff options
context:
space:
mode:
authorRyan Hansberry <rhansby@gmail.com>2015-10-13 13:51:32 -0700
committerRyan Hansberry <rhansby@gmail.com>2015-10-14 15:47:14 -0700
commitfe52ba2b6b7c46c4d58c485844d85e31882af41f (patch)
treef6a6e8bc6400aaa8246bfcf28fe268a267cf5cae /app
parent035cba2cf8951a69f89298695d2930ce1b222fb4 (diff)
downloadconnectbot-fe52ba2b6b7c46c4d58c485844d85e31882af41f.tar.gz
connectbot-fe52ba2b6b7c46c4d58c485844d85e31882af41f.tar.bz2
connectbot-fe52ba2b6b7c46c4d58c485844d85e31882af41f.zip
Fix lint error.
Diffstat (limited to 'app')
-rw-r--r--app/src/main/java/org/connectbot/ConsoleActivity.java12
1 files changed, 10 insertions, 2 deletions
diff --git a/app/src/main/java/org/connectbot/ConsoleActivity.java b/app/src/main/java/org/connectbot/ConsoleActivity.java
index 10ae45a..711c89c 100644
--- a/app/src/main/java/org/connectbot/ConsoleActivity.java
+++ b/app/src/main/java/org/connectbot/ConsoleActivity.java
@@ -31,6 +31,7 @@ import org.connectbot.util.PreferenceConstants;
import org.connectbot.util.TerminalTextViewOverlay;
import org.connectbot.util.TerminalViewPager;
+import android.annotation.TargetApi;
import android.app.AlertDialog;
import android.app.Dialog;
import android.content.ComponentName;
@@ -443,6 +444,11 @@ public class ConsoleActivity extends AppCompatActivity implements BridgeDisconne
hideActionBarIfRequested();
}
+ @TargetApi(11)
+ private void requestActionBar() {
+ supportRequestWindowFeature(Window.FEATURE_ACTION_BAR_OVERLAY);
+ }
+
@Override
public void onCreate(Bundle icicle) {
super.onCreate(icicle);
@@ -458,8 +464,10 @@ public class ConsoleActivity extends AppCompatActivity implements BridgeDisconne
prefs = PreferenceManager.getDefaultSharedPreferences(this);
titleBarHide = prefs.getBoolean(PreferenceConstants.TITLEBARHIDE, false);
- if (titleBarHide) {
- supportRequestWindowFeature(Window.FEATURE_ACTION_BAR_OVERLAY);
+ if (titleBarHide && Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB) {
+ // This is a separate method because Gradle does not uniformly respect the conditional
+ // Build check. See: https://code.google.com/p/android/issues/detail?id=137195
+ requestActionBar();
}
this.setContentView(R.layout.act_console);