diff options
author | 2025-04-03 09:59:57 -0700 | |
---|---|---|
committer | 2025-04-07 19:59:07 -0700 | |
commit | f5206149050a3f5039942071b5666aa0b8726cc8 (patch) | |
tree | c0813366960f15e7cae78a63827caa62492b14e2 /api/api.go | |
parent | e4397b9b1360bea34d3284559d3e52ece901ecd6 (diff) |
StorageManagerService: Call invalidateVolumeListCache upon complete user unlock
When a user is completely unlocked, the invalidateVolumeListCache
function of StorageManager should be called to ensure that the
app can obtain the latest volume information.
Currently, StorageManager uses a caching structure to store volume
information obtained via the getVolumeList function of StorageManagerService.
When an app, which is started by receiving the BOOT_COMPLETED broadcast,
calls StorageManager's invalidateVolumeListCache function, an issue may arise.
If the data/media partition has already been mounted but the user has not yet
unlocked it, the volume information returned by StorageManagerService's
getVolumeList will have a state of "unmounted". This volume information will
be cached in StorageManager's sVolumeListCache. Since the mVolumes information
in StorageManagerService has not changed, the cache will not trigger a refresh.
Consequently, the app will always retrieve volume information with an "unmounted"
state from the cache when calling StorageManager's getVolumeList function.
Bug: 407690018
Flag: EXEMPT bug fix
Test:m
1. Start the app by receiving the BOOT_COMPLETED broadcast.
2. The app calls StorageManager's getVolumeList function.
3. Call the getState function to check the mount status of the StorageVolume.
(cherry picked from https://android-review.googlesource.com/q/commit:f2a5bd48dcdd999284cf8fb99d2f866566bdb013)
(cherry picked from https://googleplex-android-review.googlesource.com/q/commit:686d0259f41a835fa60c9dbc5e797e5379119c7a)
Merged-In: Ib1b86c604f9e9f0dd413673ed6e767103d887b32
Change-Id: Ib1b86c604f9e9f0dd413673ed6e767103d887b32
Diffstat (limited to 'api/api.go')
0 files changed, 0 insertions, 0 deletions