]> git.ipfire.org Git - thirdparty/strongswan.git/commitdiff
android: Hide app selection in profile editor on Android < 5
authorTobias Brunner <tobias@strongswan.org>
Thu, 24 Aug 2017 13:18:32 +0000 (15:18 +0200)
committerTobias Brunner <tobias@strongswan.org>
Mon, 4 Sep 2017 08:41:25 +0000 (10:41 +0200)
src/frontends/android/app/src/main/java/org/strongswan/android/ui/VpnProfileDetailActivity.java
src/frontends/android/app/src/main/res/layout/profile_detail_view.xml

index 8bf5fd2b211804d23d054178f2bbd24029775da7..8792fd7e47af0067d078633b834130dafe62fabb 100644 (file)
@@ -22,6 +22,7 @@ import android.content.Context;
 import android.content.DialogInterface;
 import android.content.Intent;
 import android.os.AsyncTask;
+import android.os.Build;
 import android.os.Bundle;
 import android.security.KeyChain;
 import android.security.KeyChainAliasCallback;
@@ -187,6 +188,13 @@ public class VpnProfileDetailActivity extends AppCompatActivity
                mName.setAdapter(completeAdapter);
                mRemoteId.setAdapter(completeAdapter);
 
+               if (Build.VERSION.SDK_INT < Build.VERSION_CODES.LOLLIPOP)
+               {
+                       findViewById(R.id.apps).setVisibility(View.GONE);
+                       mSelectSelectedAppsHandling.setVisibility(View.GONE);
+                       mSelectApps.setVisibility(View.GONE);
+               }
+
                mGateway.addTextChangedListener(new TextWatcher() {
                        @Override
                        public void beforeTextChanged(CharSequence s, int start, int count, int after) {}
index 199a7dfeeb33f5f9206080a33a4c80ceef2ccaa9..f765dbcf19dddc16004522e8a07f52987bfe6589 100644 (file)
                 android:text="@string/profile_split_tunnelingv6_title" />
 
             <TextView
+                android:id="@+id/apps"
                 android:layout_width="match_parent"
                 android:layout_height="wrap_content"
                 android:layout_marginTop="20dp"