Fix private volume UI items incorrectly displayed for public volume

The loading of private volume UI items is async, these private volume UI items should not be displayed if user has switched to public volume.

Limit private volume UI items only visible for private volume.

Bug: 396043608
(cherry picked from https://android-review.googlesource.com/q/commit:1bfb959c1f14226231145a24624731650278af3a)
Merged-In: I5ea5cfb5d73f74cae33d780ed1f7f04fba870e32
Change-Id: I5ea5cfb5d73f74cae33d780ed1f7f04fba870e32
Flag: EXEMPT bug fix
This commit is contained in:
hoffc
2025-02-13 07:37:33 -08:00
committed by Shubhi Saxena
parent c66d7bdcf3
commit cd8573f3e1

View File

@@ -475,7 +475,10 @@ public class StorageItemPreferenceController extends AbstractPreferenceControlle
updatePrivateStorageCategoryPreferencesOrder();
mIsPreferenceOrderedBySize = true;
}
setPrivateStorageCategoryPreferencesVisibility(true);
if (isValidPrivateVolume()) {
setPrivateStorageCategoryPreferencesVisibility(true);
}
}
private StorageCacheHelper.StorageCache getSizeInfo(