summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--main/src/main/java/de/blinkt/openvpn/activities/ConfigConverter.java6
-rw-r--r--main/src/main/java/de/blinkt/openvpn/activities/MainActivity.java7
-rw-r--r--main/src/main/java/de/blinkt/openvpn/core/VpnStatus.java1
-rw-r--r--main/src/main/res/layout-v21/save_fab.xml2
-rw-r--r--main/src/main/res/layout-v21/share_fab.xml1
-rw-r--r--main/src/main/res/layout/config_converter.xml13
6 files changed, 21 insertions, 9 deletions
diff --git a/main/src/main/java/de/blinkt/openvpn/activities/ConfigConverter.java b/main/src/main/java/de/blinkt/openvpn/activities/ConfigConverter.java
index a6b97bb5..1eaca6c5 100644
--- a/main/src/main/java/de/blinkt/openvpn/activities/ConfigConverter.java
+++ b/main/src/main/java/de/blinkt/openvpn/activities/ConfigConverter.java
@@ -527,8 +527,10 @@ public class ConfigConverter extends Activity implements FileSelectCallback, Vie
super.onCreate(savedInstanceState);
ImageButton fab_button = (ImageButton) findViewById(R.id.fab_save);
- if (fab_button != null)
+ if (fab_button != null) {
fab_button.setOnClickListener(this);
+ findViewById(R.id.fab_footerspace).setVisibility(View.VISIBLE);
+ }
if (savedInstanceState != null && savedInstanceState.containsKey(VPNPROFILE)) {
mResult = (VpnProfile) savedInstanceState.getSerializable(VPNPROFILE);
@@ -630,7 +632,7 @@ public class ConfigConverter extends Activity implements FileSelectCallback, Vie
TextView tv = new TextView(this);
tv.setText(logmessage);
LinearLayout logLayout = (LinearLayout) findViewById(R.id.config_convert_root);
- logLayout.addView(tv);
+ logLayout.addView(tv, logLayout.getChildCount() - 1);
}
private void doImport(InputStream is, String newName) {
diff --git a/main/src/main/java/de/blinkt/openvpn/activities/MainActivity.java b/main/src/main/java/de/blinkt/openvpn/activities/MainActivity.java
index 4aa7e120..38600e4b 100644
--- a/main/src/main/java/de/blinkt/openvpn/activities/MainActivity.java
+++ b/main/src/main/java/de/blinkt/openvpn/activities/MainActivity.java
@@ -69,9 +69,12 @@ public class MainActivity extends Activity {
tabs.setViewPager(mPager);
}
+ private static final String FEATURE_TELEVISION = "android.hardware.type.television";
+ private static final String FEATURE_LEANBACK = "android.software.leanback";
+
private boolean isDirectToTV() {
- return(getPackageManager().hasSystemFeature(PackageManager.FEATURE_TELEVISION)
- || getPackageManager().hasSystemFeature(PackageManager.FEATURE_LEANBACK));
+ return(getPackageManager().hasSystemFeature(FEATURE_TELEVISION)
+ || getPackageManager().hasSystemFeature(FEATURE_LEANBACK));
}
@TargetApi(Build.VERSION_CODES.LOLLIPOP)
diff --git a/main/src/main/java/de/blinkt/openvpn/core/VpnStatus.java b/main/src/main/java/de/blinkt/openvpn/core/VpnStatus.java
index ef168675..b8a673b1 100644
--- a/main/src/main/java/de/blinkt/openvpn/core/VpnStatus.java
+++ b/main/src/main/java/de/blinkt/openvpn/core/VpnStatus.java
@@ -261,6 +261,7 @@ public class VpnStatus {
String version = "error getting version";
try {
+ @SuppressLint("PackageManagerGetSignatures")
Signature raw = c.getPackageManager().getPackageInfo(c.getPackageName(), PackageManager.GET_SIGNATURES).signatures[0];
CertificateFactory cf = CertificateFactory.getInstance("X.509");
X509Certificate cert = (X509Certificate) cf.generateCertificate(new ByteArrayInputStream(raw.toByteArray()));
diff --git a/main/src/main/res/layout-v21/save_fab.xml b/main/src/main/res/layout-v21/save_fab.xml
index 55fdecc6..fbd583da 100644
--- a/main/src/main/res/layout-v21/save_fab.xml
+++ b/main/src/main/res/layout-v21/save_fab.xml
@@ -5,8 +5,8 @@
-->
<ImageButton xmlns:android="http://schemas.android.com/apk/res/android"
- tools:ignore="InconsistentLayout"
xmlns:tools="http://schemas.android.com/tools"
+ tools:ignore="InconsistentLayout"
android:id="@+id/fab_save"
android:layout_width="@dimen/round_button_diameter"
android:layout_height="@dimen/round_button_diameter"
diff --git a/main/src/main/res/layout-v21/share_fab.xml b/main/src/main/res/layout-v21/share_fab.xml
index 25576636..d98532d6 100644
--- a/main/src/main/res/layout-v21/share_fab.xml
+++ b/main/src/main/res/layout-v21/share_fab.xml
@@ -6,6 +6,7 @@
<ImageButton xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
+ tools:ignore="InconsistentLayout"
android:id="@+id/share_config"
android:layout_width="@dimen/round_button_diameter"
android:layout_height="@dimen/round_button_diameter"
diff --git a/main/src/main/res/layout/config_converter.xml b/main/src/main/res/layout/config_converter.xml
index e93f2731..763ab051 100644
--- a/main/src/main/res/layout/config_converter.xml
+++ b/main/src/main/res/layout/config_converter.xml
@@ -3,7 +3,7 @@
~ Copyright (c) 2012-2014 Arne Schwabe
~ Distributed under the GNU GPL v2 with additional terms. For full terms see the file doc/LICENSE.txt
-->
-<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
+<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent">
@@ -43,8 +43,13 @@
android:textAppearance="?android:attr/textAppearanceMedium"
android:text="@string/import_log"
android:id="@+id/textView"/>
-
+ <Space
+ android:id="@+id/fab_footerspace"
+ android:visibility="gone"
+ android:layout_width="40dp"
+ android:layout_height="@dimen/round_button_diameter" />
</LinearLayout>
+
</ScrollView>
- <!-- <include layout="@layout/save_fab" /> -->
-</FrameLayout>
+ <include layout="@layout/save_fab" />
+</RelativeLayout>