summaryrefslogtreecommitdiff
path: root/libs/hwui/FrameInfoVisualizer.cpp
diff options
context:
space:
mode:
author alukin <alukin@google.com> 2023-08-16 20:03:40 +0000
committer Aleksandr Lukin <alukin@google.com> 2023-08-30 11:24:48 +0000
commitbdec6441a8a4dc63608397c4548f446c1ca2afd2 (patch)
tree01d7678536226ecd0e3270b055151827c4a33558 /libs/hwui/FrameInfoVisualizer.cpp
parent017d558661d47cf97f570c89932e15ec835190a8 (diff)
Fix StorageStatsService#getTotalBytes
Fixing getTotalBytes by calling a new API in Vold. 1. Returned the original implementation of rounding logic. Now it only rounds the bytes by increasing the size, and never by decreasing. 2. Returned the original logic for all the device sizes <= 512GB to prevent any potential regressions. 3. For devices with larger capacities now calling vold (one-time call, then the value is stored in memory) to get the block device size. It's a very precise number of bytes, so only doing a small rounding (up to 3GB) to try to bring the totalBytes to a nice-looking value, otherwise just return as is. Should be tested together with a Settings UI fix: I3dcc9698403612f961cf0de41925dcbcb43e260b Verified on multiple devices with storage <= 512GB: b/290892417#comment26. Also verified for 1TB devices: personally and in b/295265657#comment10 Bug: 290892417 Bug: 295358118 Test: verified manually + manually verified calling of new API Test: atest FileUtilsTest Test: atest StorageHostTest Change-Id: I01d72ede6c3ac62198d04829866655ba5a92dc45 (cherry picked from commit be2ec6d958d7be2c798513d2b4cba6c3169e8ec5)
Diffstat (limited to 'libs/hwui/FrameInfoVisualizer.cpp')
0 files changed, 0 insertions, 0 deletions