Do not use default locale to create file path

We should always use US locate to create file path otherwise
it may generate invalid file path for locale like
Arabic.

Bug: 160555146
Test: Able to boot successfully
Change-Id: Ief9b3b9747d0590cc4f6ccf86ac0e611d53b96bb
This commit is contained in:
Ricky Wai
2020-07-13 11:50:59 +00:00
parent a1f3fd5b46
commit 9d83d35132

View File

@@ -4532,9 +4532,10 @@ class StorageManagerService extends IStorageManager.Stub
ServiceManager.getServiceOrThrow("vold"));
for (String pkg : packageList) {
final String packageObbDir =
String.format("/storage/emulated/%d/Android/obb/%s/", userId, pkg);
String.format(Locale.US, "/storage/emulated/%d/Android/obb/%s/",
userId, pkg);
final String packageDataDir =
String.format("/storage/emulated/%d/Android/data/%s/",
String.format(Locale.US, "/storage/emulated/%d/Android/data/%s/",
userId, pkg);
// Create package obb and data dir if it doesn't exist.