summaryrefslogtreecommitdiff
path: root/libs/androidfw/StringPool.cpp
diff options
context:
space:
mode:
author Winson Chiu <chiuwinson@google.com> 2022-10-21 23:55:12 +0000
committer Winson Chiu <chiuwinson@google.com> 2022-12-06 01:03:50 +0000
commiteff2ae200cc2317f8f0fba7e723a2627754137fd (patch)
tree1216099f123abc25a6245195f2a7147c99519470 /libs/androidfw/StringPool.cpp
parente36b1ca47758d39b89ab38c6fb8e18164f525b2d (diff)
Expose Environment device/credential encrypted app storage directories
ApplicationInfo is expensive to build, especially when using the new PackageState APIs which don't require ApplicationInfo at all. To allow access to the dataDir field without ApplicationInfo, this exposes methods on Environment to build them dynamically based on volume UUID, user, and app package name. This avoids having to build/cache the strings in system server and consolidates the file system related APIs into Environment as a single source of truth. This also fixes the @TestApi StorageManager#convert so that its String parameter is marked @Nullable, which works because UUID_PRIVATE_INTERNAL is defined as nullable. This allows the method to be used in Kotlin, as the Kotlin compiler will enforce nullability annotations, preventing the UUID_PRIVATE_INTERNAL value from being tested without the right annotation on the parameter. Bug: 245943991 Test: atest android.os.EnvironmentTest Test: atest android.os.cts.EnvironmentTest Change-Id: I5983ee22a27f566352fd0de03f0ee421a0bc390f
Diffstat (limited to 'libs/androidfw/StringPool.cpp')
0 files changed, 0 insertions, 0 deletions