File changed.
Preview size limit exceeded, changes collapsed.
+202
−0
Loading
Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more
In preparation of caching the getVolumeList() API, create a new WatchableVolumeInfo object that wraps VolumeInfo. Unfortunately it is not possible to safely make VolumeInfo itself Watchable, because it exposes public members that are also tagged @UnsupportedAppUsage, which means we cannot safely change their visibility. This allows VolumeInfo objects being modified without notifying the watchers. Since this can lead to very obscure bugs when caching volumes, instead wrap VolumeInfo in a new WatchableVolumeInfo class, which does safely implement Watchable. Change StorageManagerService to use it; the only place where we still allow a WatchableVolumeInfo to be converted into a VolumeInfo object is when return a list of volumes to other processes, in getVolumeList() itself. Bug: 323574186 Test: N/A, refactoring code Flag: EXEMPT refactoring Change-Id: Idda040f28df2e3656014d710280706ccfbc6158c
File changed.
Preview size limit exceeded, changes collapsed.