Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 61d1838a authored by Amith Yamasani's avatar Amith Yamasani Committed by android-build-merger
Browse files

Merge "Fix "division by zero" crash after USB mass storage disconnects" am: a44b4fee

am: 4ed2bb1b

* commit '4ed2bb1b':
  Fix "division by zero" crash after USB mass storage disconnects
parents d8cf66ef 4ed2bb1b
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -75,7 +75,9 @@ public class StorageVolumePreference extends Preference {
            final String used = Formatter.formatFileSize(context, usedBytes);
            final String total = Formatter.formatFileSize(context, totalBytes);
            setSummary(context.getString(R.string.storage_volume_summary, used, total));
            if (totalBytes > 0) {
                mUsedPercent = (int) ((usedBytes * 100) / totalBytes);
            }

            if (freeBytes < mStorageManager.getStorageLowBytes(path)) {
                mColor = StorageSettings.COLOR_WARNING;