diff options
Diffstat (limited to 'packages/BackupRestoreConfirmation')
-rw-r--r-- | packages/BackupRestoreConfirmation/res/values/strings.xml | 2 | ||||
-rw-r--r-- | packages/BackupRestoreConfirmation/src/com/android/backupconfirm/BackupRestoreConfirmation.java | 30 |
2 files changed, 2 insertions, 30 deletions
diff --git a/packages/BackupRestoreConfirmation/res/values/strings.xml b/packages/BackupRestoreConfirmation/res/values/strings.xml index 3fb3fd475ab3..5c90fd019cd8 100644 --- a/packages/BackupRestoreConfirmation/res/values/strings.xml +++ b/packages/BackupRestoreConfirmation/res/values/strings.xml @@ -44,8 +44,6 @@ <string name="backup_enc_password_text">Please enter a password to use for encrypting the full backup data. If this is left blank, your current backup password will be used:</string> <!-- Text for message to user that they may optionally supply an encryption password to use for a full backup operation. --> <string name="backup_enc_password_optional">If you wish to encrypt the full backup data, enter a password below:</string> - <!-- Text for message to user that they must supply an encryption password to use for a full backup operation because their phone is locked. --> - <string name="backup_enc_password_required">Since your device is encrypted, you are required to encrypt your backup. Please enter a password below:</string> <!-- Text for message to user when performing a full restore operation, explaining that they must enter the password originally used to encrypt the full backup data. --> <string name="restore_enc_password_text">If the restore data is encrypted, please enter the password below:</string> diff --git a/packages/BackupRestoreConfirmation/src/com/android/backupconfirm/BackupRestoreConfirmation.java b/packages/BackupRestoreConfirmation/src/com/android/backupconfirm/BackupRestoreConfirmation.java index d6b6bf8d1e56..3c790f0e24ee 100644 --- a/packages/BackupRestoreConfirmation/src/com/android/backupconfirm/BackupRestoreConfirmation.java +++ b/packages/BackupRestoreConfirmation/src/com/android/backupconfirm/BackupRestoreConfirmation.java @@ -27,8 +27,6 @@ import android.os.Handler; import android.os.Message; import android.os.RemoteException; import android.os.ServiceManager; -import android.os.storage.IStorageManager; -import android.os.storage.StorageManager; import android.text.Editable; import android.text.TextWatcher; import android.util.Slog; @@ -66,10 +64,8 @@ public class BackupRestoreConfirmation extends Activity { Handler mHandler; IBackupManager mBackupManager; - IStorageManager mStorageManager; FullObserver mObserver; int mToken; - boolean mIsEncrypted; boolean mDidAcknowledge; String mAction; @@ -144,7 +140,6 @@ public class BackupRestoreConfirmation extends Activity { } mBackupManager = IBackupManager.Stub.asInterface(ServiceManager.getService(Context.BACKUP_SERVICE)); - mStorageManager = IStorageManager.Stub.asInterface(ServiceManager.getService("mount")); mHandler = new ObserverHandler(getApplicationContext()); final Object oldObserver = getLastNonConfigurationInstance(); @@ -248,20 +243,13 @@ public class BackupRestoreConfirmation extends Activity { mDenyButton.setEnabled(!mDidAcknowledge); } - // We vary the password prompt depending on whether one is predefined, and whether - // the device is encrypted. - mIsEncrypted = deviceIsEncrypted(); + // We vary the password prompt depending on whether one is predefined. if (!haveBackupPassword()) { curPwDesc.setVisibility(View.GONE); mCurPassword.setVisibility(View.GONE); if (layoutId == R.layout.confirm_backup) { TextView encPwDesc = findViewById(R.id.enc_password_desc); - if (mIsEncrypted) { - encPwDesc.setText(R.string.backup_enc_password_required); - monitorEncryptionPassword(); - } else { - encPwDesc.setText(R.string.backup_enc_password_optional); - } + encPwDesc.setText(R.string.backup_enc_password_optional); } } } @@ -312,20 +300,6 @@ public class BackupRestoreConfirmation extends Activity { } } - boolean deviceIsEncrypted() { - try { - return mStorageManager.getEncryptionState() - != StorageManager.ENCRYPTION_STATE_NONE - && mStorageManager.getPasswordType() - != StorageManager.CRYPT_TYPE_DEFAULT; - } catch (Exception e) { - // If we can't talk to the storagemanager service we have a serious problem; fail - // "secure" i.e. assuming that the device is encrypted. - Slog.e(TAG, "Unable to communicate with storagemanager service: " + e.getMessage()); - return true; - } - } - boolean haveBackupPassword() { try { return mBackupManager.hasBackupPassword(); |