diff options
author | Parménides GV <parmegv@sdf.org> | 2016-02-06 13:57:50 +0100 |
---|---|---|
committer | Parménides GV <parmegv@sdf.org> | 2016-02-06 13:57:50 +0100 |
commit | 8e67e4d2167f2508d7f069af4d69f0f2931844a7 (patch) | |
tree | 79aa4772f46785d0c1a61285777c530a46499ee4 /app/src/main/java/de/blinkt/openvpn/activities | |
parent | 5b95785060adace6b48a69d560051261233d954d (diff) |
Pause icon, init log file in Dashboard
Diffstat (limited to 'app/src/main/java/de/blinkt/openvpn/activities')
-rw-r--r-- | app/src/main/java/de/blinkt/openvpn/activities/BaseActivity.java | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/app/src/main/java/de/blinkt/openvpn/activities/BaseActivity.java b/app/src/main/java/de/blinkt/openvpn/activities/BaseActivity.java new file mode 100644 index 00000000..8cdc1e90 --- /dev/null +++ b/app/src/main/java/de/blinkt/openvpn/activities/BaseActivity.java @@ -0,0 +1,27 @@ +/* + * Copyright (c) 2012-2015 Arne Schwabe + * Distributed under the GNU GPL v2 with additional terms. For full terms see the file doc/LICENSE.txt + */ + +package de.blinkt.openvpn.activities; + +import android.app.Activity; +import android.app.UiModeManager; +import android.content.res.Configuration; +import android.os.Bundle; +import android.view.Window; + +public class BaseActivity extends Activity { + private boolean isAndroidTV() { + final UiModeManager uiModeManager = (UiModeManager) getSystemService(Activity.UI_MODE_SERVICE); + return uiModeManager.getCurrentModeType() == Configuration.UI_MODE_TYPE_TELEVISION; + } + + @Override + protected void onCreate(Bundle savedInstanceState) { + if (isAndroidTV()) { + requestWindowFeature(Window.FEATURE_OPTIONS_PANEL); + } + super.onCreate(savedInstanceState); + } +} |