Merge "Encrypt inplace settings." into honeycomb

This commit is contained in:
Jason parks
2011-01-20 15:50:55 -08:00
committed by Android (Google) Code Review
4 changed files with 25 additions and 13 deletions

View File

@@ -582,10 +582,19 @@
<!-- In the security screen, the header title for settings related to Passwords-->
<string name="security_passwords_title">Passwords</string>
<string name="encryption_settings_title">Device encryption</string>
<string name="encrypt_title">Encrypt data on device</string>
<string name="encrypt_summary">Requires you to set a device unlock pin or password</string>
<string name="crypt_keeper_settings_title">Device encryption</string>
<string name="crypt_keeper_encrypt_title">Encrypt data on device</string>
<string name="crypt_keeper_encrypt_summary">Requires you to set a device unlock pin or password</string>
<string name="crypt_keeper_confirm_title">Confirm encrypt</string>
<string name="crypt_keeper_desc">Device encryption will convert user data to an ecrypted state, including your accounts, system data, downloaded applications and data, photos, movies, musics, etc.\n\nEncyrption cannot be undone without performing a factory data reset, which would then erase all data.\n\nYou must set up a device lock pin or password to proceed.\n\nThis operation may take up to an hour and may not be interrupted. You must have a fully charged battery and plug in the device to initiate encryption. Running out of power during encryption will cause data loss.</string>
<string name="crypt_keeper_button_text" product="tablet">Encrypt tablet</string>
<string name="crypt_keeper_button_text" product="default">Encrypt phone</string>
<string name="crypt_keeper_final_desc">Encrypt user data? This operation is not reversible and may not be interrupted without loos of data! Encryption may take up to an hour.</string>
<!-- Unlock Picker Settings --><skip />
<!-- Security Picker --><skip />

View File

@@ -18,14 +18,15 @@
<PreferenceCategory
android:key="security_category"
android:title="@string/encryption_settings_title">
android:title="@string/crypt_keeper_settings_title">
<PreferenceScreen
android:key="encryption"
android:title="@string/encrypt_title"
android:summary="@string/encrypt_summary"
android:persistent="false"/>
android:title="@string/crypt_keeper_encrypt_title"
android:summary="@string/crypt_keeper_encrypt_summary"
android:fragment="com.android.settings.CryptKeeperSettings" />
</PreferenceCategory>
</PreferenceScreen>

View File

@@ -31,8 +31,8 @@ import android.text.InputType;
import android.view.KeyEvent;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.view.View.OnClickListener;
import android.view.ViewGroup;
import android.view.inputmethod.EditorInfo;
import android.widget.TextView;
import android.widget.TextView.OnEditorActionListener;
@@ -138,7 +138,11 @@ public class ConfirmLockPassword extends PreferenceActivity {
private void handleNext() {
final String pin = mPasswordEntry.getText().toString();
if (mLockPatternUtils.checkPassword(pin)) {
getActivity().setResult(RESULT_OK);
Intent intent = new Intent();
intent.putExtra("password", pin);
getActivity().setResult(RESULT_OK, intent);
getActivity().finish();
} else {
showError(R.string.lockpattern_need_to_unlock_wrong);

View File

@@ -372,8 +372,6 @@ public class SecuritySettings extends SettingsPreferenceFragment
} else if (preference == mAssistedGps) {
Settings.Secure.putInt(getContentResolver(), Settings.Secure.ASSISTED_GPS_ENABLED,
mAssistedGps.isChecked() ? 1 : 0);
} else if (KEY_ENCRYPTION.equals(key)) {
new Encryption().showPasswordDialog();
} else {
// If we didn't handle it, let preferences handle it.
return super.onPreferenceTreeClick(preferenceScreen, preference);