am 71577504: Show correct remaining time
* commit '715775046c79f04d8975da53efcfbd1b70abe699':
Show correct remaining time
diff --git a/cryptfs.c b/cryptfs.c
index bb9b2e2..bd6cf58 100644
--- a/cryptfs.c
+++ b/cryptfs.c
@@ -1995,8 +1995,12 @@
- data->used_blocks_already_done;
int remaining_time = (int)(elapsed_time * remaining_blocks
/ data->used_blocks_already_done);
+
+ // Change time only if not yet set, lower, or a lot higher for
+ // best user experience
if (data->remaining_time == -1
- || remaining_time < data->remaining_time) {
+ || remaining_time < data->remaining_time
+ || remaining_time > data->remaining_time + 60) {
char buf[8];
snprintf(buf, sizeof(buf), "%d", remaining_time);
property_set("vold.encrypt_time_remaining", buf);