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

Commit d589c185 authored by Christopher Tate's avatar Christopher Tate
Browse files

Don't force fstrim on OTA

This avoids showing a (momentary) "Optimising storage" UI along the way,
which proved to be jarring.

Bug 30064543

Change-Id: Iaff0f32eea4170829d71a4f2bd270cc63d1da543
parent 377a8dd1
Loading
Loading
Loading
Loading
+11 −16
Original line number Diff line number Diff line
@@ -7267,11 +7267,7 @@ public class PackageManagerService extends IPackageManager.Stub {
        try {
            IMountService ms = PackageHelper.getMountService();
            if (ms != null) {
                final boolean isUpgrade = isUpgrade();
                boolean doTrim = isUpgrade;
                if (doTrim) {
                    Slog.w(TAG, "Running disk maintenance immediately due to system update");
                } else {
                boolean doTrim = false;
                final long interval = android.provider.Settings.Global.getLong(
                        mContext.getContentResolver(),
                        android.provider.Settings.Global.FSTRIM_MANDATORY_INTERVAL,
@@ -7284,7 +7280,6 @@ public class PackageManagerService extends IPackageManager.Stub {
                                + "; running immediately");
                    }
                }
                }
                if (doTrim) {
                    if (!isFirstBoot()) {
                        try {