]> git.ipfire.org Git - thirdparty/strongswan.git/commitdiff
android: Show warning message for read-only profiles in detail view
authorMarkus Pfeiffer <markus.pfeiffer@relution.io>
Tue, 21 Nov 2023 14:37:22 +0000 (15:37 +0100)
committerTobias Brunner <tobias@strongswan.org>
Wed, 21 Feb 2024 11:24:53 +0000 (12:24 +0100)
Show a message explaining that a managed profile can't be edited in
its detail view.

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
src/frontends/android/app/src/main/res/values-de/strings.xml
src/frontends/android/app/src/main/res/values-pl/strings.xml
src/frontends/android/app/src/main/res/values-ru/strings.xml
src/frontends/android/app/src/main/res/values-uk/strings.xml
src/frontends/android/app/src/main/res/values-zh-rCN/strings.xml
src/frontends/android/app/src/main/res/values-zh-rTW/strings.xml
src/frontends/android/app/src/main/res/values/strings.xml

index b01e67f88169c43f8007b9931b88f6a64530407b..4a6aac45f5b93c3b10bbf01a7906be3a5df39691 100644 (file)
@@ -98,6 +98,7 @@ public class VpnProfileDetailActivity extends AppCompatActivity
        private SelectedAppsHandling mSelectedAppsHandling = SelectedAppsHandling.SELECTED_APPS_DISABLE;
        private SortedSet<String> mSelectedApps = new TreeSet<>();
        private VpnProfile mProfile;
+       private View mManagedProfile;
        private MultiAutoCompleteTextView mName;
        private TextInputLayoutHelper mNameWrap;
        private EditText mGateway;
@@ -195,6 +196,8 @@ public class VpnProfileDetailActivity extends AppCompatActivity
 
                setContentView(R.layout.profile_detail_view);
 
+               mManagedProfile = findViewById(R.id.managed_profile);
+
                mName = findViewById(R.id.name);
                mNameWrap = findViewById(R.id.name_wrap);
                mGateway = findViewById(R.id.gateway);
@@ -857,6 +860,8 @@ public class VpnProfileDetailActivity extends AppCompatActivity
 
        private void setReadOnly(final boolean readOnly)
        {
+               mManagedProfile.setVisibility(readOnly ? View.VISIBLE : View.GONE);
+
                mName.setEnabled(!readOnly);
                mGateway.setEnabled(!readOnly);
                mUsername.setEnabled(!readOnly);
index bdded433705264c8d8e4a85c1a07f624d7593d9a..5197c63f7116adc96dc696c44dcdc1d68cd76ee2 100644 (file)
     or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
     for more details.
 -->
-<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
-            xmlns:app="http://schemas.android.com/apk/res-auto"
-            android:layout_width="match_parent"
-            android:layout_height="match_parent" >
-
-    <LinearLayout
+<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:app="http://schemas.android.com/apk/res-auto"
+    xmlns:tools="http://schemas.android.com/tools"
+    android:layout_width="match_parent"
+    android:layout_height="match_parent">
+
+    <TextView
+        android:id="@+id/managed_profile"
         android:layout_width="match_parent"
         android:layout_height="wrap_content"
-        android:orientation="vertical"
-        android:padding="10dp"
-        android:animateLayoutChanges="true" >
-
-        <org.strongswan.android.ui.widget.TextInputLayoutHelper
-            android:id="@+id/gateway_wrap"
-            android:layout_width="match_parent"
-            android:layout_height="wrap_content"
-            android:layout_marginTop="6dp"
-            android:hint="@string/profile_gateway_label"
-            app:helper_text="@string/profile_gateway_hint" >
-
-            <com.google.android.material.textfield.TextInputEditText
-                android:id="@+id/gateway"
-                android:layout_width="match_parent"
-                android:layout_height="wrap_content"
-                android:singleLine="true"
-                android:inputType="textNoSuggestions" />
-
-        </org.strongswan.android.ui.widget.TextInputLayoutHelper>
-
-        <TextView
-            android:layout_width="match_parent"
-            android:layout_height="wrap_content"
-            android:layout_marginLeft="4dp"
-            android:textSize="12sp"
-            android:text="@string/profile_vpn_type_label" />
-
-        <Spinner
-            android:id="@+id/vpn_type"
-            android:layout_width="match_parent"
-            android:layout_height="wrap_content"
-            android:spinnerMode="dropdown"
-            android:entries="@array/vpn_types" />
-
-        <include
-            android:id="@+id/tnc_notice"
-            layout="@layout/two_line_button"
-            android:visibility="gone" />
+        android:background="@drawable/state_background"
+        android:drawableStart="@android:drawable/ic_dialog_alert"
+        android:drawablePadding="8dp"
+        android:padding="8dp"
+        android:text="@string/alert_text_vpn_profile_read_only"
+        android:textColor="?android:attr/textColorPrimary"
+        android:textAppearance="?android:attr/textAppearanceSmall"
+        android:textStyle="bold"
+        android:visibility="gone"
+        app:layout_constraintTop_toTopOf="parent"
+        tools:visibility="visible" />
+
+    <ScrollView
+        android:layout_width="0dp"
+        android:layout_height="0dp"
+        app:layout_constraintBottom_toBottomOf="parent"
+        app:layout_constraintEnd_toEndOf="parent"
+        app:layout_constraintStart_toStartOf="parent"
+        app:layout_constraintTop_toBottomOf="@+id/managed_profile">
 
         <LinearLayout
-            android:id="@+id/username_password_group"
             android:layout_width="match_parent"
             android:layout_height="wrap_content"
-            android:orientation="vertical" >
+            android:animateLayoutChanges="true"
+            android:orientation="vertical"
+            android:padding="10dp">
 
             <org.strongswan.android.ui.widget.TextInputLayoutHelper
-                android:id="@+id/username_wrap"
+                android:id="@+id/gateway_wrap"
                 android:layout_width="match_parent"
                 android:layout_height="wrap_content"
-                android:layout_marginTop="4dp"
-                android:hint="@string/profile_username_label" >
+                android:layout_marginTop="6dp"
+                android:hint="@string/profile_gateway_label"
+                app:helper_text="@string/profile_gateway_hint">
 
                 <com.google.android.material.textfield.TextInputEditText
-                    android:id="@+id/username"
+                    android:id="@+id/gateway"
                     android:layout_width="match_parent"
                     android:layout_height="wrap_content"
-                    android:singleLine="true"
-                    android:inputType="textNoSuggestions" />
+                    android:inputType="textNoSuggestions"
+                    android:singleLine="true" />
 
             </org.strongswan.android.ui.widget.TextInputLayoutHelper>
 
-            <org.strongswan.android.ui.widget.TextInputLayoutHelper
-                android:id="@+id/password_wrap"
+            <TextView
                 android:layout_width="match_parent"
                 android:layout_height="wrap_content"
-                android:layout_marginTop="4dp"
-                android:hint="@string/profile_password_label"
-                app:helper_text="@string/profile_password_hint" >
-
-                <com.google.android.material.textfield.TextInputEditText
-                    android:id="@+id/password"
-                    android:layout_width="match_parent"
-                    android:layout_height="wrap_content"
-                    android:singleLine="true"
-                    android:inputType="textPassword|textNoSuggestions" />
-
-            </org.strongswan.android.ui.widget.TextInputLayoutHelper>
-
-        </LinearLayout>
-
-        <LinearLayout
-            android:id="@+id/user_certificate_group"
-            android:layout_width="match_parent"
-            android:layout_height="wrap_content"
-            android:layout_marginBottom="4dp"
-            android:orientation="vertical" >
+                android:layout_marginLeft="4dp"
+                android:text="@string/profile_vpn_type_label"
+                android:textSize="12sp" />
 
-            <TextView
+            <Spinner
+                android:id="@+id/vpn_type"
                 android:layout_width="match_parent"
                 android:layout_height="wrap_content"
-                android:layout_marginTop="4dp"
-                android:layout_marginLeft="4dp"
-                android:textSize="12sp"
-                android:text="@string/profile_user_certificate_label" />
+                android:entries="@array/vpn_types"
+                android:spinnerMode="dropdown" />
 
             <include
-                android:id="@+id/select_user_certificate"
-                layout="@layout/two_line_button" />
+                android:id="@+id/tnc_notice"
+                layout="@layout/two_line_button"
+                android:visibility="gone" />
 
-            <Button
-                android:id="@+id/install_user_certificate"
+            <LinearLayout
+                android:id="@+id/username_password_group"
                 android:layout_width="match_parent"
                 android:layout_height="wrap_content"
-                android:layout_marginLeft="4dp"
-                android:layout_marginRight="4dp"
-                android:text="@string/profile_user_certificate_install" />
+                android:orientation="vertical">
 
-        </LinearLayout>
+                <org.strongswan.android.ui.widget.TextInputLayoutHelper
+                    android:id="@+id/username_wrap"
+                    android:layout_width="match_parent"
+                    android:layout_height="wrap_content"
+                    android:layout_marginTop="4dp"
+                    android:hint="@string/profile_username_label">
 
-        <TextView
-            android:layout_width="match_parent"
-            android:layout_height="wrap_content"
-            android:layout_marginLeft="4dp"
-            android:textSize="12sp"
-            android:text="@string/profile_ca_label" />
+                    <com.google.android.material.textfield.TextInputEditText
+                        android:id="@+id/username"
+                        android:layout_width="match_parent"
+                        android:layout_height="wrap_content"
+                        android:inputType="textNoSuggestions"
+                        android:singleLine="true" />
 
-        <CheckBox
-            android:id="@+id/ca_auto"
-            android:layout_width="match_parent"
-            android:layout_height="wrap_content"
-            android:layout_marginTop="4dp"
-            android:text="@string/profile_ca_auto_label" />
+                </org.strongswan.android.ui.widget.TextInputLayoutHelper>
+
+                <org.strongswan.android.ui.widget.TextInputLayoutHelper
+                    android:id="@+id/password_wrap"
+                    android:layout_width="match_parent"
+                    android:layout_height="wrap_content"
+                    android:layout_marginTop="4dp"
+                    android:hint="@string/profile_password_label"
+                    app:helper_text="@string/profile_password_hint">
 
-        <include
-            android:id="@+id/select_certificate"
-            layout="@layout/two_line_button" />
+                    <com.google.android.material.textfield.TextInputEditText
+                        android:id="@+id/password"
+                        android:layout_width="match_parent"
+                        android:layout_height="wrap_content"
+                        android:inputType="textPassword|textNoSuggestions"
+                        android:singleLine="true" />
 
-        <org.strongswan.android.ui.widget.TextInputLayoutHelper
-            android:id="@+id/name_wrap"
-            android:layout_width="match_parent"
-            android:layout_height="wrap_content"
-            android:layout_marginTop="8dp"
-            android:hint="@string/profile_name_label"
-            app:helper_text="@string/profile_name_hint" >
+                </org.strongswan.android.ui.widget.TextInputLayoutHelper>
 
-            <MultiAutoCompleteTextView
-                android:id="@+id/name"
+            </LinearLayout>
+
+            <LinearLayout
+                android:id="@+id/user_certificate_group"
                 android:layout_width="match_parent"
                 android:layout_height="wrap_content"
-                android:singleLine="true"
-                android:inputType="textNoSuggestions"
-                android:completionThreshold="1" />
+                android:layout_marginBottom="4dp"
+                android:orientation="vertical">
 
-        </org.strongswan.android.ui.widget.TextInputLayoutHelper>
+                <TextView
+                    android:layout_width="match_parent"
+                    android:layout_height="wrap_content"
+                    android:layout_marginLeft="4dp"
+                    android:layout_marginTop="4dp"
+                    android:text="@string/profile_user_certificate_label"
+                    android:textSize="12sp" />
 
-        <CheckBox
-            android:id="@+id/show_advanced"
-            android:layout_width="match_parent"
-            android:layout_height="wrap_content"
-            android:text="@string/profile_show_advanced_label" />
+                <include
+                    android:id="@+id/select_user_certificate"
+                    layout="@layout/two_line_button" />
 
-        <LinearLayout
-            android:id="@+id/advanced_settings"
-            android:layout_width="match_parent"
-            android:layout_height="wrap_content"
-            android:orientation="vertical" >
+                <Button
+                    android:id="@+id/install_user_certificate"
+                    android:layout_width="match_parent"
+                    android:layout_height="wrap_content"
+                    android:layout_marginLeft="4dp"
+                    android:layout_marginRight="4dp"
+                    android:text="@string/profile_user_certificate_install" />
+
+            </LinearLayout>
 
             <TextView
                 android:layout_width="match_parent"
                 android:layout_height="wrap_content"
-                android:layout_marginTop="10dp"
                 android:layout_marginLeft="4dp"
-                android:textSize="20sp"
-                android:text="@string/profile_advanced_label" />
+                android:text="@string/profile_ca_label"
+                android:textSize="12sp" />
 
-            <org.strongswan.android.ui.widget.TextInputLayoutHelper
-                android:id="@+id/remote_id_wrap"
+            <CheckBox
+                android:id="@+id/ca_auto"
                 android:layout_width="match_parent"
                 android:layout_height="wrap_content"
-                android:layout_marginTop="10dp"
-                android:hint="@string/profile_remote_id_label"
-                app:helper_text="@string/profile_remote_id_hint" >
-
-                <MultiAutoCompleteTextView
-                    android:id="@+id/remote_id"
-                    android:layout_width="match_parent"
-                    android:layout_height="wrap_content"
-                    android:singleLine="true"
-                    android:inputType="textNoSuggestions"
-                    android:completionThreshold="1" />
+                android:layout_marginTop="4dp"
+                android:text="@string/profile_ca_auto_label" />
 
-            </org.strongswan.android.ui.widget.TextInputLayoutHelper>
+            <include
+                android:id="@+id/select_certificate"
+                layout="@layout/two_line_button" />
 
             <org.strongswan.android.ui.widget.TextInputLayoutHelper
-                android:id="@+id/local_id_wrap"
+                android:id="@+id/name_wrap"
                 android:layout_width="match_parent"
                 android:layout_height="wrap_content"
-                android:hint="@string/profile_local_id_label"
-                app:helper_text="@string/profile_local_id_hint_user" >
+                android:layout_marginTop="8dp"
+                android:hint="@string/profile_name_label"
+                app:helper_text="@string/profile_name_hint">
 
                 <MultiAutoCompleteTextView
-                    android:id="@+id/local_id"
+                    android:id="@+id/name"
                     android:layout_width="match_parent"
                     android:layout_height="wrap_content"
-                    android:singleLine="true"
+                    android:completionThreshold="1"
                     android:inputType="textNoSuggestions"
-                    android:completionThreshold="0" />
+                    android:singleLine="true" />
 
             </org.strongswan.android.ui.widget.TextInputLayoutHelper>
 
-            <org.strongswan.android.ui.widget.TextInputLayoutHelper
-                android:id="@+id/dns_servers_wrap"
+            <CheckBox
+                android:id="@+id/show_advanced"
                 android:layout_width="match_parent"
                 android:layout_height="wrap_content"
-                android:hint="@string/profile_dns_servers_label"
-                app:helper_text="@string/profile_dns_servers_hint" >
-
-                <com.google.android.material.textfield.TextInputEditText
-                    android:id="@+id/dns_servers"
-                    android:layout_width="match_parent"
-                    android:layout_height="wrap_content"
-                    android:singleLine="true"
-                    android:inputType="textNoSuggestions" />
+                android:text="@string/profile_show_advanced_label" />
 
-            </org.strongswan.android.ui.widget.TextInputLayoutHelper>
-
-            <org.strongswan.android.ui.widget.TextInputLayoutHelper
-                android:id="@+id/mtu_wrap"
+            <LinearLayout
+                android:id="@+id/advanced_settings"
                 android:layout_width="match_parent"
                 android:layout_height="wrap_content"
-                android:hint="@string/profile_mtu_label"
-                app:helper_text="@string/profile_mtu_hint" >
+                android:orientation="vertical">
 
-                <com.google.android.material.textfield.TextInputEditText
-                    android:id="@+id/mtu"
+                <TextView
                     android:layout_width="match_parent"
                     android:layout_height="wrap_content"
-                    android:singleLine="true"
-                    android:inputType="number|textNoSuggestions" />
-
-            </org.strongswan.android.ui.widget.TextInputLayoutHelper>
-
-            <org.strongswan.android.ui.widget.TextInputLayoutHelper
-                android:id="@+id/port_wrap"
-                android:layout_width="match_parent"
-                android:layout_height="wrap_content"
-                android:hint="@string/profile_port_label"
-                app:helper_text="@string/profile_port_hint" >
+                    android:layout_marginLeft="4dp"
+                    android:layout_marginTop="10dp"
+                    android:text="@string/profile_advanced_label"
+                    android:textSize="20sp" />
 
-                <com.google.android.material.textfield.TextInputEditText
-                    android:id="@+id/port"
+                <org.strongswan.android.ui.widget.TextInputLayoutHelper
+                    android:id="@+id/remote_id_wrap"
+                    android:layout_width="match_parent"
+                    android:layout_height="wrap_content"
+                    android:layout_marginTop="10dp"
+                    android:hint="@string/profile_remote_id_label"
+                    app:helper_text="@string/profile_remote_id_hint">
+
+                    <MultiAutoCompleteTextView
+                        android:id="@+id/remote_id"
+                        android:layout_width="match_parent"
+                        android:layout_height="wrap_content"
+                        android:completionThreshold="1"
+                        android:inputType="textNoSuggestions"
+                        android:singleLine="true" />
+
+                </org.strongswan.android.ui.widget.TextInputLayoutHelper>
+
+                <org.strongswan.android.ui.widget.TextInputLayoutHelper
+                    android:id="@+id/local_id_wrap"
                     android:layout_width="match_parent"
                     android:layout_height="wrap_content"
-                    android:singleLine="true"
-                    android:inputType="number|textNoSuggestions" />
+                    android:hint="@string/profile_local_id_label"
+                    app:helper_text="@string/profile_local_id_hint_user">
 
-            </org.strongswan.android.ui.widget.TextInputLayoutHelper>
+                    <MultiAutoCompleteTextView
+                        android:id="@+id/local_id"
+                        android:layout_width="match_parent"
+                        android:layout_height="wrap_content"
+                        android:completionThreshold="0"
+                        android:inputType="textNoSuggestions"
+                        android:singleLine="true" />
 
-            <org.strongswan.android.ui.widget.TextInputLayoutHelper
-                android:id="@+id/nat_keepalive_wrap"
-                android:layout_width="match_parent"
-                android:layout_height="wrap_content"
-                android:hint="@string/profile_nat_keepalive_label"
-                app:helper_text="@string/profile_nat_keepalive_hint" >
+                </org.strongswan.android.ui.widget.TextInputLayoutHelper>
 
-                <com.google.android.material.textfield.TextInputEditText
-                    android:id="@+id/nat_keepalive"
+                <org.strongswan.android.ui.widget.TextInputLayoutHelper
+                    android:id="@+id/dns_servers_wrap"
                     android:layout_width="match_parent"
                     android:layout_height="wrap_content"
-                    android:singleLine="true"
-                    android:inputType="number|textNoSuggestions" />
+                    android:hint="@string/profile_dns_servers_label"
+                    app:helper_text="@string/profile_dns_servers_hint">
 
-            </org.strongswan.android.ui.widget.TextInputLayoutHelper>
+                    <com.google.android.material.textfield.TextInputEditText
+                        android:id="@+id/dns_servers"
+                        android:layout_width="match_parent"
+                        android:layout_height="wrap_content"
+                        android:inputType="textNoSuggestions"
+                        android:singleLine="true" />
 
-            <androidx.appcompat.widget.SwitchCompat
-                android:id="@+id/cert_req"
-                android:layout_width="match_parent"
-                android:layout_height="wrap_content"
-                android:layout_marginLeft="4dp"
-                android:layout_marginStart="4dp"
-                android:text="@string/profile_cert_req_label" />
+                </org.strongswan.android.ui.widget.TextInputLayoutHelper>
 
-            <TextView
-                android:layout_width="match_parent"
-                android:layout_height="wrap_content"
-                android:layout_marginBottom="10dp"
-                android:layout_marginLeft="4dp"
-                android:layout_marginStart="4dp"
-                android:textSize="12sp"
-                android:text="@string/profile_cert_req_hint" />
+                <org.strongswan.android.ui.widget.TextInputLayoutHelper
+                    android:id="@+id/mtu_wrap"
+                    android:layout_width="match_parent"
+                    android:layout_height="wrap_content"
+                    android:hint="@string/profile_mtu_label"
+                    app:helper_text="@string/profile_mtu_hint">
 
-            <androidx.appcompat.widget.SwitchCompat
-                android:id="@+id/use_ocsp"
-                android:layout_width="match_parent"
-                android:layout_height="wrap_content"
-                android:layout_marginLeft="4dp"
-                android:layout_marginStart="4dp"
-                android:text="@string/profile_use_ocsp_label" />
+                    <com.google.android.material.textfield.TextInputEditText
+                        android:id="@+id/mtu"
+                        android:layout_width="match_parent"
+                        android:layout_height="wrap_content"
+                        android:inputType="number|textNoSuggestions"
+                        android:singleLine="true" />
 
-            <TextView
-                android:layout_width="match_parent"
-                android:layout_height="wrap_content"
-                android:layout_marginBottom="10dp"
-                android:layout_marginLeft="4dp"
-                android:layout_marginStart="4dp"
-                android:textSize="12sp"
-                android:text="@string/profile_use_ocsp_hint" />
+                </org.strongswan.android.ui.widget.TextInputLayoutHelper>
 
-            <androidx.appcompat.widget.SwitchCompat
-                android:id="@+id/use_crl"
-                android:layout_width="match_parent"
-                android:layout_height="wrap_content"
-                android:layout_marginLeft="4dp"
-                android:layout_marginStart="4dp"
-                android:text="@string/profile_use_crl_label" />
+                <org.strongswan.android.ui.widget.TextInputLayoutHelper
+                    android:id="@+id/port_wrap"
+                    android:layout_width="match_parent"
+                    android:layout_height="wrap_content"
+                    android:hint="@string/profile_port_label"
+                    app:helper_text="@string/profile_port_hint">
 
-            <TextView
-                android:layout_width="match_parent"
-                android:layout_height="wrap_content"
-                android:layout_marginBottom="10dp"
-                android:layout_marginLeft="4dp"
-                android:layout_marginStart="4dp"
-                android:textSize="12sp"
-                android:text="@string/profile_use_crl_hint" />
+                    <com.google.android.material.textfield.TextInputEditText
+                        android:id="@+id/port"
+                        android:layout_width="match_parent"
+                        android:layout_height="wrap_content"
+                        android:inputType="number|textNoSuggestions"
+                        android:singleLine="true" />
 
-            <androidx.appcompat.widget.SwitchCompat
-                android:id="@+id/strict_revocation"
-                android:layout_width="match_parent"
-                android:layout_height="wrap_content"
-                android:layout_marginLeft="4dp"
-                android:layout_marginStart="4dp"
-                android:text="@string/profile_strict_revocation_label" />
+                </org.strongswan.android.ui.widget.TextInputLayoutHelper>
 
-            <TextView
-                android:layout_width="match_parent"
-                android:layout_height="wrap_content"
-                android:layout_marginBottom="10dp"
-                android:layout_marginLeft="4dp"
-                android:layout_marginStart="4dp"
-                android:textSize="12sp"
-                android:text="@string/profile_strict_revocation_hint" />
-
-            <androidx.appcompat.widget.SwitchCompat
-                android:id="@+id/rsa_pss"
-                android:layout_width="match_parent"
-                android:layout_height="wrap_content"
-                android:layout_marginLeft="4dp"
-                android:layout_marginStart="4dp"
-                android:text="@string/profile_rsa_pss_label" />
+                <org.strongswan.android.ui.widget.TextInputLayoutHelper
+                    android:id="@+id/nat_keepalive_wrap"
+                    android:layout_width="match_parent"
+                    android:layout_height="wrap_content"
+                    android:hint="@string/profile_nat_keepalive_label"
+                    app:helper_text="@string/profile_nat_keepalive_hint">
 
-            <TextView
-                android:layout_width="match_parent"
-                android:layout_height="wrap_content"
-                android:layout_marginBottom="10dp"
-                android:layout_marginLeft="4dp"
-                android:layout_marginStart="4dp"
-                android:textSize="12sp"
-                android:text="@string/profile_rsa_pss_hint" />
+                    <com.google.android.material.textfield.TextInputEditText
+                        android:id="@+id/nat_keepalive"
+                        android:layout_width="match_parent"
+                        android:layout_height="wrap_content"
+                        android:inputType="number|textNoSuggestions"
+                        android:singleLine="true" />
 
-            <androidx.appcompat.widget.SwitchCompat
-                android:id="@+id/ipv6_transport"
-                android:layout_width="match_parent"
-                android:layout_height="wrap_content"
-                android:layout_marginLeft="4dp"
-                android:layout_marginStart="4dp"
-                android:text="@string/profile_ipv6_transport_label" />
+                </org.strongswan.android.ui.widget.TextInputLayoutHelper>
 
-            <TextView
-                android:layout_width="match_parent"
-                android:layout_height="wrap_content"
-                android:layout_marginBottom="10dp"
-                android:layout_marginLeft="4dp"
-                android:layout_marginStart="4dp"
-                android:textSize="12sp"
-                android:text="@string/profile_ipv6_transport_hint" />
+                <androidx.appcompat.widget.SwitchCompat
+                    android:id="@+id/cert_req"
+                    android:layout_width="match_parent"
+                    android:layout_height="wrap_content"
+                    android:layout_marginStart="4dp"
+                    android:layout_marginLeft="4dp"
+                    android:text="@string/profile_cert_req_label" />
 
-            <TextView
-                android:layout_width="match_parent"
-                android:layout_height="wrap_content"
-                android:layout_marginTop="10dp"
-                android:layout_marginBottom="10dp"
-                android:layout_marginLeft="4dp"
-                android:layout_marginStart="4dp"
-                android:textSize="20sp"
-                android:text="@string/profile_split_tunneling_label" />
+                <TextView
+                    android:layout_width="match_parent"
+                    android:layout_height="wrap_content"
+                    android:layout_marginStart="4dp"
+                    android:layout_marginLeft="4dp"
+                    android:layout_marginBottom="10dp"
+                    android:text="@string/profile_cert_req_hint"
+                    android:textSize="12sp" />
+
+                <androidx.appcompat.widget.SwitchCompat
+                    android:id="@+id/use_ocsp"
+                    android:layout_width="match_parent"
+                    android:layout_height="wrap_content"
+                    android:layout_marginStart="4dp"
+                    android:layout_marginLeft="4dp"
+                    android:text="@string/profile_use_ocsp_label" />
 
-            <TextView
-                android:layout_width="match_parent"
-                android:layout_height="wrap_content"
-                android:layout_marginTop="10dp"
-                android:layout_marginBottom="10dp"
-                android:layout_marginLeft="4dp"
-                android:textSize="12sp"
-                android:text="@string/profile_split_tunneling_intro" />
+                <TextView
+                    android:layout_width="match_parent"
+                    android:layout_height="wrap_content"
+                    android:layout_marginStart="4dp"
+                    android:layout_marginLeft="4dp"
+                    android:layout_marginBottom="10dp"
+                    android:text="@string/profile_use_ocsp_hint"
+                    android:textSize="12sp" />
+
+                <androidx.appcompat.widget.SwitchCompat
+                    android:id="@+id/use_crl"
+                    android:layout_width="match_parent"
+                    android:layout_height="wrap_content"
+                    android:layout_marginStart="4dp"
+                    android:layout_marginLeft="4dp"
+                    android:text="@string/profile_use_crl_label" />
 
-            <org.strongswan.android.ui.widget.TextInputLayoutHelper
-                android:id="@+id/included_subnets_wrap"
-                android:layout_width="match_parent"
-                android:layout_height="wrap_content"
-                android:hint="@string/profile_included_subnets_label"
-                app:helper_text="@string/profile_included_subnets_hint" >
+                <TextView
+                    android:layout_width="match_parent"
+                    android:layout_height="wrap_content"
+                    android:layout_marginStart="4dp"
+                    android:layout_marginLeft="4dp"
+                    android:layout_marginBottom="10dp"
+                    android:text="@string/profile_use_crl_hint"
+                    android:textSize="12sp" />
+
+                <androidx.appcompat.widget.SwitchCompat
+                    android:id="@+id/strict_revocation"
+                    android:layout_width="match_parent"
+                    android:layout_height="wrap_content"
+                    android:layout_marginStart="4dp"
+                    android:layout_marginLeft="4dp"
+                    android:text="@string/profile_strict_revocation_label" />
 
-                <com.google.android.material.textfield.TextInputEditText
-                    android:id="@+id/included_subnets"
+                <TextView
                     android:layout_width="match_parent"
                     android:layout_height="wrap_content"
-                    android:singleLine="true"
-                    android:inputType="textNoSuggestions" />
+                    android:layout_marginStart="4dp"
+                    android:layout_marginLeft="4dp"
+                    android:layout_marginBottom="10dp"
+                    android:text="@string/profile_strict_revocation_hint"
+                    android:textSize="12sp" />
+
+                <androidx.appcompat.widget.SwitchCompat
+                    android:id="@+id/rsa_pss"
+                    android:layout_width="match_parent"
+                    android:layout_height="wrap_content"
+                    android:layout_marginStart="4dp"
+                    android:layout_marginLeft="4dp"
+                    android:text="@string/profile_rsa_pss_label" />
 
-            </org.strongswan.android.ui.widget.TextInputLayoutHelper>
+                <TextView
+                    android:layout_width="match_parent"
+                    android:layout_height="wrap_content"
+                    android:layout_marginStart="4dp"
+                    android:layout_marginLeft="4dp"
+                    android:layout_marginBottom="10dp"
+                    android:text="@string/profile_rsa_pss_hint"
+                    android:textSize="12sp" />
+
+                <androidx.appcompat.widget.SwitchCompat
+                    android:id="@+id/ipv6_transport"
+                    android:layout_width="match_parent"
+                    android:layout_height="wrap_content"
+                    android:layout_marginStart="4dp"
+                    android:layout_marginLeft="4dp"
+                    android:text="@string/profile_ipv6_transport_label" />
 
-            <org.strongswan.android.ui.widget.TextInputLayoutHelper
-                android:id="@+id/excluded_subnets_wrap"
-                android:layout_width="match_parent"
-                android:layout_height="wrap_content"
-                android:hint="@string/profile_excluded_subnets_label"
-                app:helper_text="@string/profile_excluded_subnets_hint" >
+                <TextView
+                    android:layout_width="match_parent"
+                    android:layout_height="wrap_content"
+                    android:layout_marginStart="4dp"
+                    android:layout_marginLeft="4dp"
+                    android:layout_marginBottom="10dp"
+                    android:text="@string/profile_ipv6_transport_hint"
+                    android:textSize="12sp" />
 
-                <com.google.android.material.textfield.TextInputEditText
-                    android:id="@+id/excluded_subnets"
+                <TextView
+                    android:layout_width="match_parent"
+                    android:layout_height="wrap_content"
+                    android:layout_marginStart="4dp"
+                    android:layout_marginLeft="4dp"
+                    android:layout_marginTop="10dp"
+                    android:layout_marginBottom="10dp"
+                    android:text="@string/profile_split_tunneling_label"
+                    android:textSize="20sp" />
+
+                <TextView
+                    android:layout_width="match_parent"
+                    android:layout_height="wrap_content"
+                    android:layout_marginLeft="4dp"
+                    android:layout_marginTop="10dp"
+                    android:layout_marginBottom="10dp"
+                    android:text="@string/profile_split_tunneling_intro"
+                    android:textSize="12sp" />
+
+                <org.strongswan.android.ui.widget.TextInputLayoutHelper
+                    android:id="@+id/included_subnets_wrap"
                     android:layout_width="match_parent"
                     android:layout_height="wrap_content"
-                    android:singleLine="true"
-                    android:inputType="textNoSuggestions" />
+                    android:hint="@string/profile_included_subnets_label"
+                    app:helper_text="@string/profile_included_subnets_hint">
 
-            </org.strongswan.android.ui.widget.TextInputLayoutHelper>
+                    <com.google.android.material.textfield.TextInputEditText
+                        android:id="@+id/included_subnets"
+                        android:layout_width="match_parent"
+                        android:layout_height="wrap_content"
+                        android:inputType="textNoSuggestions"
+                        android:singleLine="true" />
 
-            <CheckBox
-                android:id="@+id/split_tunneling_v4"
-                android:layout_width="match_parent"
-                android:layout_height="wrap_content"
-                android:text="@string/profile_split_tunnelingv4_title" />
+                </org.strongswan.android.ui.widget.TextInputLayoutHelper>
 
-            <CheckBox
-                android:id="@+id/split_tunneling_v6"
-                android:layout_width="match_parent"
-                android:layout_height="wrap_content"
-                android:text="@string/profile_split_tunnelingv6_title" />
+                <org.strongswan.android.ui.widget.TextInputLayoutHelper
+                    android:id="@+id/excluded_subnets_wrap"
+                    android:layout_width="match_parent"
+                    android:layout_height="wrap_content"
+                    android:hint="@string/profile_excluded_subnets_label"
+                    app:helper_text="@string/profile_excluded_subnets_hint">
 
-            <TextView
-                android:id="@+id/apps"
-                android:layout_width="match_parent"
-                android:layout_height="wrap_content"
-                android:layout_marginTop="20dp"
-                android:layout_marginBottom="10dp"
-                android:layout_marginLeft="4dp"
-                android:layout_marginStart="4dp"
-                android:textSize="20sp"
-                android:text="@string/profile_select_apps_label" />
+                    <com.google.android.material.textfield.TextInputEditText
+                        android:id="@+id/excluded_subnets"
+                        android:layout_width="match_parent"
+                        android:layout_height="wrap_content"
+                        android:inputType="textNoSuggestions"
+                        android:singleLine="true" />
 
-            <Spinner
-                android:id="@+id/apps_handling"
-                android:layout_width="match_parent"
-                android:layout_height="wrap_content"
-                android:spinnerMode="dropdown"
-                android:entries="@array/apps_handling" />
+                </org.strongswan.android.ui.widget.TextInputLayoutHelper>
 
-            <include
-                android:id="@+id/select_applications"
-                layout="@layout/two_line_button" />
+                <CheckBox
+                    android:id="@+id/split_tunneling_v4"
+                    android:layout_width="match_parent"
+                    android:layout_height="wrap_content"
+                    android:text="@string/profile_split_tunnelingv4_title" />
 
-            <TextView
-                android:layout_width="match_parent"
-                android:layout_height="wrap_content"
-                android:layout_marginTop="10dp"
-                android:layout_marginBottom="10dp"
-                android:layout_marginLeft="4dp"
-                android:layout_marginStart="4dp"
-                android:textSize="20sp"
-                android:text="@string/profile_proposals_label" />
+                <CheckBox
+                    android:id="@+id/split_tunneling_v6"
+                    android:layout_width="match_parent"
+                    android:layout_height="wrap_content"
+                    android:text="@string/profile_split_tunnelingv6_title" />
 
-            <TextView
-                android:id="@+id/proposal_intro"
-                android:layout_width="match_parent"
-                android:layout_height="wrap_content"
-                android:layout_marginTop="10dp"
-                android:layout_marginBottom="10dp"
-                android:layout_marginLeft="4dp"
-                android:textSize="12sp"
-                android:text="@string/profile_proposals_intro" />
+                <TextView
+                    android:id="@+id/apps"
+                    android:layout_width="match_parent"
+                    android:layout_height="wrap_content"
+                    android:layout_marginStart="4dp"
+                    android:layout_marginLeft="4dp"
+                    android:layout_marginTop="20dp"
+                    android:layout_marginBottom="10dp"
+                    android:text="@string/profile_select_apps_label"
+                    android:textSize="20sp" />
+
+                <Spinner
+                    android:id="@+id/apps_handling"
+                    android:layout_width="match_parent"
+                    android:layout_height="wrap_content"
+                    android:entries="@array/apps_handling"
+                    android:spinnerMode="dropdown" />
 
-            <org.strongswan.android.ui.widget.TextInputLayoutHelper
-                android:id="@+id/ike_proposal_wrap"
-                android:layout_width="match_parent"
-                android:layout_height="wrap_content"
-                android:hint="@string/profile_proposals_ike_label"
-                app:helper_text="@string/profile_proposals_ike_hint" >
+                <include
+                    android:id="@+id/select_applications"
+                    layout="@layout/two_line_button" />
 
-                <com.google.android.material.textfield.TextInputEditText
-                    android:id="@+id/ike_proposal"
+                <TextView
+                    android:layout_width="match_parent"
+                    android:layout_height="wrap_content"
+                    android:layout_marginStart="4dp"
+                    android:layout_marginLeft="4dp"
+                    android:layout_marginTop="10dp"
+                    android:layout_marginBottom="10dp"
+                    android:text="@string/profile_proposals_label"
+                    android:textSize="20sp" />
+
+                <TextView
+                    android:id="@+id/proposal_intro"
+                    android:layout_width="match_parent"
+                    android:layout_height="wrap_content"
+                    android:layout_marginLeft="4dp"
+                    android:layout_marginTop="10dp"
+                    android:layout_marginBottom="10dp"
+                    android:text="@string/profile_proposals_intro"
+                    android:textSize="12sp" />
+
+                <org.strongswan.android.ui.widget.TextInputLayoutHelper
+                    android:id="@+id/ike_proposal_wrap"
                     android:layout_width="match_parent"
                     android:layout_height="wrap_content"
-                    android:singleLine="true"
-                    android:inputType="textNoSuggestions" />
+                    android:hint="@string/profile_proposals_ike_label"
+                    app:helper_text="@string/profile_proposals_ike_hint">
 
-            </org.strongswan.android.ui.widget.TextInputLayoutHelper>
+                    <com.google.android.material.textfield.TextInputEditText
+                        android:id="@+id/ike_proposal"
+                        android:layout_width="match_parent"
+                        android:layout_height="wrap_content"
+                        android:inputType="textNoSuggestions"
+                        android:singleLine="true" />
 
-            <org.strongswan.android.ui.widget.TextInputLayoutHelper
-                android:id="@+id/esp_proposal_wrap"
-                android:layout_width="match_parent"
-                android:layout_height="wrap_content"
-                android:hint="@string/profile_proposals_esp_label"
-                app:helper_text="@string/profile_proposals_esp_hint" >
+                </org.strongswan.android.ui.widget.TextInputLayoutHelper>
 
-                <com.google.android.material.textfield.TextInputEditText
-                    android:id="@+id/esp_proposal"
+                <org.strongswan.android.ui.widget.TextInputLayoutHelper
+                    android:id="@+id/esp_proposal_wrap"
                     android:layout_width="match_parent"
                     android:layout_height="wrap_content"
-                    android:singleLine="true"
-                    android:inputType="textNoSuggestions" />
+                    android:hint="@string/profile_proposals_esp_label"
+                    app:helper_text="@string/profile_proposals_esp_hint">
 
-            </org.strongswan.android.ui.widget.TextInputLayoutHelper>
+                    <com.google.android.material.textfield.TextInputEditText
+                        android:id="@+id/esp_proposal"
+                        android:layout_width="match_parent"
+                        android:layout_height="wrap_content"
+                        android:inputType="textNoSuggestions"
+                        android:singleLine="true" />
 
-            <TextView
-                android:id="@+id/profile_id_label"
-                android:layout_width="match_parent"
-                android:layout_height="wrap_content"
-                android:layout_marginTop="10dp"
-                android:layout_marginBottom="10dp"
-                android:layout_marginLeft="4dp"
-                android:layout_marginStart="4dp"
-                android:textSize="16sp"
-                android:text="@string/profile_profile_id" />
+                </org.strongswan.android.ui.widget.TextInputLayoutHelper>
 
-            <TextView
-                android:id="@+id/profile_id"
-                android:layout_width="match_parent"
-                android:layout_height="wrap_content"
-                android:layout_marginTop="10dp"
-                android:layout_marginBottom="10dp"
-                android:layout_marginLeft="4dp"
-                android:textSize="12sp"
-                android:textIsSelectable="true" />
+                <TextView
+                    android:id="@+id/profile_id_label"
+                    android:layout_width="match_parent"
+                    android:layout_height="wrap_content"
+                    android:layout_marginStart="4dp"
+                    android:layout_marginLeft="4dp"
+                    android:layout_marginTop="10dp"
+                    android:layout_marginBottom="10dp"
+                    android:text="@string/profile_profile_id"
+                    android:textSize="16sp" />
+
+                <TextView
+                    android:id="@+id/profile_id"
+                    android:layout_width="match_parent"
+                    android:layout_height="wrap_content"
+                    android:layout_marginLeft="4dp"
+                    android:layout_marginTop="10dp"
+                    android:layout_marginBottom="10dp"
+                    android:textIsSelectable="true"
+                    android:textSize="12sp" />
 
-        </LinearLayout>
+            </LinearLayout>
 
-    </LinearLayout>
+        </LinearLayout>
 
-</ScrollView>
+    </ScrollView>
+</androidx.constraintlayout.widget.ConstraintLayout>
index 19d5a1a5419e0aa9f38b1b54dfd3abedb7b0001a..4e16f5d8dd19124e289f7a3dd26f7034eb1c2841 100644 (file)
     <string name="alert_text_no_subnets">Bitte geben Sie mit Leerzeichen getrennte, gültige Subnetzte und/oder IP-Adressen ein</string>
     <string name="alert_text_no_ips">Bitte geben Sie mit Leerzeichen getrennte, gültige IP-Adressen ein</string>
     <string name="alert_text_no_proposal">Bitte geben Sie eine mit Bindestrichen getrennte, gültige Liste von Algorithmen ein</string>
+    <string name="alert_text_vpn_profile_read_only">Dieses Profil wird von Ihrem Administrator verwaltet und kann nicht bearbeitet werden. Nur das Passwort kann geändert werden</string>
     <string name="tnc_notice_title">EAP-TNC kann Ihre Privatsphäre beeinträchtigen</string>
     <string name="tnc_notice_subtitle">Gerätedaten werden an den Server-Betreiber gesendet</string>
     <string name="tnc_notice_details"><![CDATA[<p>Trusted Network Connect (TNC) erlaubt Server-Betreibern den Gesundheitszustand von Endgeräten zu prüfen.</p><p>Dazu kann der Betreiber Daten verlangen, wie etwa eine eindeutige Identifikationsnummer, eine Liste der installierten Pakete, Systemeinstellungen oder kryptografische Prüfsummen von Dateien.</p><b>Solche Daten werden nur übermittelt nachdem die Identität des Servers geprüft wurde.</b>]]></string>
index 737eddf868aebe555bbbccdd2b4f088fffc39a4d..68089da9383fcae8693f488651ad847527ef30cc 100644 (file)
     <string name="alert_text_no_subnets">Please enter valid subnets and/or IP addresses, separated by spaces</string>
     <string name="alert_text_no_ips">Please enter valid IP addresses, separated by spaces</string>
     <string name="alert_text_no_proposal">Please enter a valid list of algorithms, separated by hyphens</string>
+    <string name="alert_text_vpn_profile_read_only">This VPN profile is managed by your administrator and can\'t be modified. You can only change the password</string>
     <string name="tnc_notice_title">EAP-TNC may affect your privacy</string>
     <string name="tnc_notice_subtitle">Device data is sent to the server operator</string>
     <string name="tnc_notice_details"><![CDATA[<p>Trusted Network Connect (TNC) allows server operators to assess the health of a client device.</p><p>For that purpose the server operator may request data such as a unique identifier, a list of installed packages, system settings, or cryptographic checksums of files.</p><b>Any data will be sent only after verifying the server\'s identity.</b>]]></string>
index 2bbe2b4dc15a2249a75b907fb55fda94cc9cbae3..ab35f29e751e5fc8fbfb8f96e6bedf4e22a07e1f 100644 (file)
     <string name="alert_text_no_subnets">Please enter valid subnets and/or IP addresses, separated by spaces</string>
     <string name="alert_text_no_ips">Please enter valid IP addresses, separated by spaces</string>
     <string name="alert_text_no_proposal">Please enter a valid list of algorithms, separated by hyphens</string>
+    <string name="alert_text_vpn_profile_read_only">This VPN profile is managed by your administrator and can\'t be modified. You can only change the password</string>
     <string name="tnc_notice_title">EAP-TNC may affect your privacy</string>
     <string name="tnc_notice_subtitle">Device data is sent to the server operator</string>
     <string name="tnc_notice_details"><![CDATA[<p>Trusted Network Connect (TNC) allows server operators to assess the health of a client device.</p><p>For that purpose the server operator may request data such as a unique identifier, a list of installed packages, system settings, or cryptographic checksums of files.</p><b>Any data will be sent only after verifying the server\'s identity.</b>]]></string>
index 3868fc47564e9d7b0f377addd63c0445d01be19d..677d7c95d2eaf45f5b9e173813d0476bbe738c2b 100644 (file)
     <string name="alert_text_no_subnets">Please enter valid subnets and/or IP addresses, separated by spaces</string>
     <string name="alert_text_no_ips">Please enter valid IP addresses, separated by spaces</string>
     <string name="alert_text_no_proposal">Please enter a valid list of algorithms, separated by hyphens</string>
+    <string name="alert_text_vpn_profile_read_only">This VPN profile is managed by your administrator and can\'t be modified. You can only change the password</string>
     <string name="tnc_notice_title">EAP-TNC may affect your privacy</string>
     <string name="tnc_notice_subtitle">Device data is sent to the server operator</string>
     <string name="tnc_notice_details"><![CDATA[<p>Trusted Network Connect (TNC) allows server operators to assess the health of a client device.</p><p>For that purpose the server operator may request data such as a unique identifier, a list of installed packages, system settings, or cryptographic checksums of files.</p><b>Any data will be sent only after verifying the server\'s identity.</b>]]></string>
index 69b9f4d2682929b518462e3bf7cda68709bb4fb7..43d3134d956834d57214d476013d714023ba270a 100644 (file)
     <string name="alert_text_no_subnets">请输入有效的子网和/或IP地址,用空格分隔</string>
     <string name="alert_text_no_ips">请输入有效的IP地址,以空格分隔</string>
     <string name="alert_text_no_proposal">请输入用连字符分隔的有效算法列表</string>
+    <string name="alert_text_vpn_profile_read_only">This VPN profile is managed by your administrator and can\'t be modified. You can only change the password</string>
     <string name="tnc_notice_title">EAP-TNC可能会影响您的隐私</string>
     <string name="tnc_notice_subtitle">设备数据已被发送至服务器管理员</string>
     <string name="tnc_notice_details"><![CDATA[<p>可信网络连接t (TNC) 允许服务器管理员评定一个用户设备的状况。</p><p>出于此目的,服务器管理员可能要求以下数据如独立ID、已安装软件列表、系统设置、或加密过的文件校验值。</p><b>任何数据都仅将在验证过服务器的身份ID之后被发出。</b>]]></string>
index 33473b63e6ddce4f136d86b560e619f864df2e6f..731682f660fb693c9e41a86074dc97989c30f929 100644 (file)
     <string name="alert_text_no_subnets">Please enter valid subnets and/or IP addresses, separated by spaces</string>
     <string name="alert_text_no_ips">Please enter valid IP addresses, separated by spaces</string>
     <string name="alert_text_no_proposal">Please enter a valid list of algorithms, separated by hyphens</string>
+    <string name="alert_text_vpn_profile_read_only">This VPN profile is managed by your administrator and can\'t be modified. You can only change the password</string>
     <string name="tnc_notice_title">EAP-TNC可能會影響您的隱私安全</string>
     <string name="tnc_notice_subtitle">裝置資料已經發送給伺服器管理者</string>
     <string name="tnc_notice_details"><![CDATA[<p>Trusted Network Connect (TNC) 可以讓伺服器管理者評估用戶裝置的狀況。</p><p>在這個目的下,伺服器管理者可能會要求以下資料,例如ID、已安裝的App項目、系統設定、或加密檔案驗證值。</p><b>任何資料都只有在驗證伺服器的身分ID之後才會被送出。</b>]]></string>
index d6d2ce8546e6fac0027921cfe127d9c7a4ebd9c1..71dc6e851b36771af7a9fccc844aceca51fea529 100644 (file)
     <string name="alert_text_no_subnets">Please enter valid subnets and/or IP addresses, separated by spaces</string>
     <string name="alert_text_no_ips">Please enter valid IP addresses, separated by spaces</string>
     <string name="alert_text_no_proposal">Please enter a valid list of algorithms, separated by hyphens</string>
+    <string name="alert_text_vpn_profile_read_only">This VPN profile is managed by your administrator and can\'t be modified. You can only change the password</string>
     <string name="tnc_notice_title">EAP-TNC may affect your privacy</string>
     <string name="tnc_notice_subtitle">Device data is sent to the server operator</string>
     <string name="tnc_notice_details"><![CDATA[<p>Trusted Network Connect (TNC) allows server operators to assess the health of a client device.</p><p>For that purpose the server operator may request data such as a unique identifier, a list of installed packages, system settings, or cryptographic checksums of files.</p><b>Any data will be sent only after verifying the server\'s identity.</b>]]></string>