From 128626fc5aa3bf12d1ae5981c7f84f63625e8972 Mon Sep 17 00:00:00 2001 From: Ken Sumrall Date: Tue, 28 Jun 2011 18:45:14 -0700 Subject: [PATCH] Fix to display the proper percentage complete during encryption. Forgot to include the size of the userdata partition when computing the total size of vold managed volumes to encrypt. Change-Id: I237548439d4380b4225ffbc603fa972c3b1c5bae --- cryptfs.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/cryptfs.c b/cryptfs.c index 0d3c681..a418225 100644 --- a/cryptfs.c +++ b/cryptfs.c @@ -1230,6 +1230,9 @@ int cryptfs_enable(char *howarg, char *passwd) create_crypto_blk_dev(&crypt_ftr, decrypted_master_key, real_blkdev, crypto_blkdev, "userdata"); + /* The size of the userdata partition, and add in the vold volumes below */ + tot_encryption_size = crypt_ftr.fs_size; + /* setup crypto mapping for all encryptable volumes handled by vold */ for (i=0; i