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

Commit fba2a694 authored by Hyoungho Choi's avatar Hyoungho Choi Committed by Shubhi Saxena
Browse files

Fix wrong recent volumes

StorageManager.FLAG_INCLUDE_RECENT flag is used to get volumes mounted
within a week. Unfortunately, however, it doesn't work as we expected.
It makes to return volumes used a long time ago.

Bug: 342962382
Test: Manual
(cherry picked from https://partner-android-review.googlesource.com/q/commit:31a78ecd8cbfa234b8f46c475717e7e6030aa8a4)
Merged-In: I4394ad3b04d89a55ecb5ab3e569571784f4c619e
Change-Id: I4394ad3b04d89a55ecb5ab3e569571784f4c619e
parent 6fb073e4
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -3980,7 +3980,7 @@ class StorageManagerService extends IStorageManager.Stub
                    if (resUuids.contains(rec.fsUuid)) continue;

                    // Treat as recent if mounted within the last week
                    if (rec.lastSeenMillis > 0 && rec.lastSeenMillis < lastWeek) {
                    if (rec.lastSeenMillis > 0 && rec.lastSeenMillis >= lastWeek) {
                        final StorageVolume userVol = rec.buildStorageVolume(mContext);
                        res.add(userVol);
                        resUuids.add(userVol.getUuid());