Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 7031ab0d authored by Hung-ying Tyan's avatar Hung-ying Tyan
Browse files

Add credential storage settings.

* Changes
  + Initial implementation of credential storage settings.
  + Use alert icon on delete and reconnect dialogs in VpnSettings.
    (piggy-backed)
  Patch Set 12:
  + Add password length and no-space verification.
  + Simplify dialog view xml files.
parent 132b2144
Loading
Loading
Loading
Loading
+58 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2009 The Android Open Source Project

     Licensed under the Apache License, Version 2.0 (the "License");
     you may not use this file except in compliance with the License.
     You may obtain a copy of the License at

          http://www.apache.org/licenses/LICENSE-2.0

     Unless required by applicable law or agreed to in writing, software
     distributed under the License is distributed on an "AS IS" BASIS,
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-->

<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
        android:layout_width="fill_parent"
        android:layout_height="wrap_content">

    <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
            android:orientation="vertical"
            android:layout_width="fill_parent"
            android:layout_height="fill_parent"
            android:padding="15dip">

        <TextView android:id="@+id/cstor_name_credential_hint"
                android:layout_width="fill_parent"
                android:layout_height="wrap_content"
                android:textSize="@dimen/vpn_connect_normal_text_size"
                android:text="@string/cstor_name_credential_hint"
                android:layout_marginBottom="10sp" />

        <TextView android:id="@+id/cstor_error"
                android:layout_width="fill_parent"
                android:layout_height="wrap_content"
                android:textColor="@color/red"
                android:textStyle="bold" />

        <TextView android:id="@+id/cstor_credential_name_title"
                android:layout_width="fill_parent"
                android:layout_height="wrap_content"
                android:text="@string/cstor_credential_name" />
        <EditText android:id="@+id/cstor_credential_name"
                android:layout_width="fill_parent"
                android:layout_height="wrap_content"
                android:singleLine="True"/>

        <TextView android:id="@+id/cstor_credential_info_title"
                android:layout_width="fill_parent"
                android:layout_height="wrap_content"
                android:text="@string/cstor_credential_info" />
        <TextView android:id="@+id/cstor_credential_info"
                android:layout_width="fill_parent"
                android:layout_height="wrap_content" />

    </LinearLayout>
</ScrollView>
+76 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2009 The Android Open Source Project

     Licensed under the Apache License, Version 2.0 (the "License");
     you may not use this file except in compliance with the License.
     You may obtain a copy of the License at

          http://www.apache.org/licenses/LICENSE-2.0

     Unless required by applicable law or agreed to in writing, software
     distributed under the License is distributed on an "AS IS" BASIS,
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-->

<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
        android:layout_width="fill_parent"
        android:layout_height="wrap_content">

    <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
            android:orientation="vertical"
            android:layout_width="fill_parent"
            android:layout_height="fill_parent"
            android:padding="15dip">

        <TextView android:id="@+id/cstor_first_time_hint"
                android:layout_width="fill_parent"
                android:layout_height="wrap_content"
                android:textSize="@dimen/vpn_connect_normal_text_size"
                android:text="@string/cstor_first_time_hint"
                android:layout_marginBottom="10sp" />

        <TextView android:id="@+id/cstor_error"
                android:layout_width="fill_parent"
                android:layout_height="wrap_content"
                android:textColor="@color/red"
                android:textStyle="bold"
                android:text="@string/cstor_password_empty_error" />

        <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
                android:id="@+id/cstor_old_password_block"
                android:orientation="vertical"
                android:layout_width="fill_parent"
                android:layout_height="fill_parent"
                >
            <TextView android:layout_width="fill_parent"
                    android:layout_height="wrap_content"
                    android:text="@string/cstor_old_password" />
            <EditText android:id="@+id/cstor_old_password"
                    android:layout_width="fill_parent"
                    android:layout_height="wrap_content"
                    android:password="True"
                    android:singleLine="True"/>
        </LinearLayout>

        <TextView android:layout_width="fill_parent"
                android:layout_height="wrap_content"
                android:text="@string/cstor_new_password" />
        <EditText android:id="@+id/cstor_new_password"
                android:layout_width="fill_parent"
                android:layout_height="wrap_content"
                android:password="True"
                android:singleLine="True"/>

        <TextView android:layout_width="fill_parent"
                android:layout_height="wrap_content"
                android:text="@string/cstor_confirm_password" />
        <EditText android:id="@+id/cstor_confirm_password"
                android:layout_width="fill_parent"
                android:layout_height="wrap_content"
                android:password="True"
                android:singleLine="True"/>

    </LinearLayout>
</ScrollView>
+40 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2009 The Android Open Source Project

     Licensed under the Apache License, Version 2.0 (the "License");
     you may not use this file except in compliance with the License.
     You may obtain a copy of the License at

          http://www.apache.org/licenses/LICENSE-2.0

     Unless required by applicable law or agreed to in writing, software
     distributed under the License is distributed on an "AS IS" BASIS,
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-->

<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
        android:layout_width="fill_parent"
        android:layout_height="wrap_content">

    <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
            android:orientation="vertical"
            android:layout_width="fill_parent"
            android:layout_height="fill_parent"
            android:padding="15dip">

        <TextView android:id="@+id/cstor_error"
                android:layout_width="fill_parent"
                android:layout_height="wrap_content"
                android:textColor="@color/red"
                android:textStyle="bold" />

        <EditText android:id="@+id/cstor_password"
                android:layout_width="fill_parent"
                android:layout_height="wrap_content"
                android:password="True"
                android:singleLine="True"/>

    </LinearLayout>
</ScrollView>
+1 −0
Original line number Diff line number Diff line
@@ -16,5 +16,6 @@

<resources>
    <color name="black">#000</color>
    <color name="red">#F00</color>
</resources>
         
+29 −6
Original line number Diff line number Diff line
@@ -1944,11 +1944,13 @@ found in the list of installed applications.</string>
    <string name="cstor_access_title">Use secure credentials</string>
    <!-- Summary of preference to enable/dislable access to credential storage -->
    <string name="cstor_access_summary">Allow applications to access secure certificates and other credentials</string>
    <!-- Title of dialog to enable/dislable access to credential storage -->
    <string name="cstor_access_dialog_title">Enter password</string>

    <!-- Title of preference to set storage password -->
    <string name="cstor_set_passwd_title">Set storage password</string>
    <string name="cstor_set_passwd_title">Set password</string>
    <!-- Summary of preference to set storage password -->
    <string name="cstor_set_passwd_summary">Set or change the secure credential storage password</string>
    <string name="cstor_set_passwd_summary">Set or change the credential storage password</string>
    <!-- Title of dialog to set storage password -->
    <string name="cstor_set_passwd_dialog_title">Set password</string>

@@ -1956,7 +1958,16 @@ found in the list of installed applications.</string>
    <string name="cstor_reset_title">Clear storage</string>
    <!-- Summary of preference to reset storage -->
    <string name="cstor_reset_summary">Clear credential storage of all contents and reset its password</string>
    <string name="cstor_reset_hint">Are you sure you want to delete all certificates and other stored credentials and reset the password?</string>
    <string name="cstor_reset_hint">Are you sure you want to delete all credentials and reset the credential storage password?</string>

    <!-- Title of dialog to name a credential -->
    <string name="cstor_name_credential_dialog_title">Name the certificate</string>
    <!-- Description for the credential name input box -->
    <string name="cstor_credential_name">Certificate name:</string>
    <!-- Title of the credential info -->
    <string name="cstor_credential_info">Certificate details:</string>
    <string name="cstor_name_credential_hint">The name can contain only letters and numbers.</string>


    <!-- Description for the old-password input box -->
    <string name="cstor_old_password">Current password:</string>
@@ -1965,9 +1976,21 @@ found in the list of installed applications.</string>
    <!-- Description for the confirm-new-password input box -->
    <string name="cstor_confirm_password">Confirm new password:</string>
    <!-- Description when user set up the storage for the very first time -->
    <string name="cstor_first_time_hint">You must set a password for credential storage before you can store secure certificates and other credentials in it.</string>
    <string name="cstor_password_error">Passwords do not match.</string>
    <string name="cstor_password_empty_error">Please fill up all the fields.</string>
    <string name="cstor_first_time_hint">You must set a password for the credential storage.</string>
    <string name="cstor_password_error">Please enter the correct password.</string>
    <string name="cstor_password_error_reset_warning">Please enter the correct password. You have one more try to enter the correct password before the credential storage is erased.</string>
    <string name="cstor_password_error_reset_warning_plural">Please enter the correct password. You have %d more tries to enter the correct password before the credential storage is erased.</string>
    <string name="cstor_passwords_error">Passwords do not match.</string>
    <string name="cstor_passwords_empty_error">You must enter and confirm a password.</string>
    <string name="cstor_password_empty_error">Please enter the password.</string>
    <string name="cstor_password_verification_error">Please enter the password again. The password must have at least 8 characters and must not contain spaces.</string>
    <string name="cstor_name_empty_error">Please enter a name.</string>
    <string name="cstor_name_char_error">Please enter a name that contains only letters and numbers.</string>

    <!-- toast message -->
    <string name="cstor_is_enabled">Credential storage is enabled.</string>
    <!-- toast message -->
    <string name="cstor_is_added">%s is added.</string>

    <!-- Sound settings screen, setting check box label -->
    <string name="emergency_tone_title">Emergency tone</string>
Loading