summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJeff Sharkey <jsharkey@android.com>2015-06-11 20:45:09 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2015-06-11 20:45:09 +0000
commitf25fc9cb6798d04593c4fd28f8542a7884f66e5f (patch)
treeeac321b0b8765f9cf2804a20c7a83ca76d9a7f2c
parent0011604fd1f03125b22550f359997cc4922dd8bb (diff)
parent5693274d2a374deb4e3adcc70136ceddaf914b15 (diff)
downloadpackages_apps_Settings-f25fc9cb6798d04593c4fd28f8542a7884f66e5f.zip
packages_apps_Settings-f25fc9cb6798d04593c4fd28f8542a7884f66e5f.tar.gz
packages_apps_Settings-f25fc9cb6798d04593c4fd28f8542a7884f66e5f.tar.bz2
Merge "Always round migration times up to 1 second." into mnc-dev
-rw-r--r--src/com/android/settings/deviceinfo/MigrateEstimateTask.java1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/com/android/settings/deviceinfo/MigrateEstimateTask.java b/src/com/android/settings/deviceinfo/MigrateEstimateTask.java
index bc8ff92..34a44ac 100644
--- a/src/com/android/settings/deviceinfo/MigrateEstimateTask.java
+++ b/src/com/android/settings/deviceinfo/MigrateEstimateTask.java
@@ -104,6 +104,7 @@ public abstract class MigrateEstimateTask extends AsyncTask<Void, Void, Long> im
protected void onPostExecute(Long result) {
mSizeBytes = result;
mTimeMillis = (mSizeBytes * DateUtils.SECOND_IN_MILLIS) / SPEED_ESTIMATE_BPS;
+ mTimeMillis = Math.max(mTimeMillis, DateUtils.SECOND_IN_MILLIS);
final String size = Formatter.formatFileSize(mContext, mSizeBytes);
final String time = DateUtils.formatDuration(mTimeMillis).toString();