appspwan:add new medialibrary hap

Signed-off-by: Qilong Zhang <zhangqilong3@huawei.com>
Change-Id: I92e7ee4ced0d7e38468c7c4d279dd49906ad3f6f
This commit is contained in:
Qilong Zhang
2022-05-04 18:25:33 +08:00
committed by Michael
parent 68dba9ffb6
commit 3358d6e124
3 changed files with 28 additions and 3 deletions
+12
View File
@@ -191,6 +191,18 @@
],
"symbol-links" : []
}],
"com.ohos.medialibrary.medialibrarydata" : [{
"sandbox-switch": "ON",
"sandbox-root" : "/mnt/sandbox/<PackageName>",
"mount-paths" : [{
"src-path" : "/storage/media/<currentUserId>",
"sandbox-path" : "/storage/media",
"sandbox-flags" : [ "bind", "rec" ],
"check-action-status": "false"
}
],
"symbol-links" : []
}],
"com.ohos.launcher" : [{
"sandbox-switch": "ON",
"sandbox-root" : "/mnt/sandbox/<PackageName>",
+13 -1
View File
@@ -196,6 +196,18 @@
],
"symbol-links" : []
}],
"com.ohos.medialibrary.medialibrarydata" : [{
"sandbox-switch": "ON",
"sandbox-root" : "/mnt/sandbox/<PackageName>",
"mount-paths" : [{
"src-path" : "/storage/media/<currentUserId>",
"sandbox-path" : "/storage/media",
"sandbox-flags" : [ "bind", "rec" ],
"check-action-status": "false"
}
],
"symbol-links" : []
}],
"com.ohos.launcher" : [{
"sandbox-switch": "ON",
"sandbox-root" : "/mnt/sandbox/<PackageName>",
@@ -246,4 +258,4 @@
"symbol-links" : []
}]
}]
}
}
+3 -2
View File
@@ -206,10 +206,11 @@ static void HandleSpecial(AppSpawnClientExt *appProperty)
// special handle bundle name medialibrary and scanner
const char *specialBundleNames[] = {
"com.ohos.medialibrary.MediaLibraryDataA",
"com.ohos.medialibrary.MediaScannerAbilityA"
"com.ohos.medialibrary.MediaScannerAbilityA",
"com.ohos.medialibrary.medialibrarydata"
};
for (size_t i = 0; i < sizeof(specialBundleNames) / sizeof(specialBundleNames[0]); i++) {
if (strcmp(appProperty->property.processName, specialBundleNames[i]) == 0) {
if (strcmp(appProperty->property.bundleName, specialBundleNames[i]) == 0) {
if (appProperty->property.gidCount < APP_MAX_GIDS) {
appProperty->property.gidTable[appProperty->property.gidCount] = GID_USER_DATA_RW;
appProperty->property.gidCount++;