Skip to content

Commit a23b343

Browse files
author
Christopher Tate
committed
Fix full backup/restore detection of encrypted devices
The confirmation UI did not request the needed permission, so was failing to communicate with the mount service; as a "safe" failure mode, it was assuming the device was encrypted. Fixed; now it presents the correct prompt text for the device's encryption state. Bug 5958195 Change-Id: Ic03db16673b89d3377e0362a09cf51bfb572d78b
1 parent 9492947 commit a23b343

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

packages/BackupRestoreConfirmation/AndroidManifest.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
package="com.android.backupconfirm" >
2020

2121
<uses-permission android:name="android.permission.BACKUP" />
22+
<uses-permission android:name="android.permission.CRYPT_KEEPER" />
2223

2324
<application android:allowClearUserData="false"
2425
android:allowBackup="false"

packages/BackupRestoreConfirmation/src/com/android/backupconfirm/BackupRestoreConfirmation.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -265,6 +265,7 @@ boolean deviceIsEncrypted() {
265265
} catch (Exception e) {
266266
// If we can't talk to the mount service we have a serious problem; fail
267267
// "secure" i.e. assuming that the device is encrypted.
268+
Slog.e(TAG, "Unable to communicate with mount service: " + e.getMessage());
268269
return true;
269270
}
270271
}

0 commit comments

Comments
 (0)