Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f02c8b41 authored by Treehugger Robot's avatar Treehugger Robot Committed by Gerrit Code Review
Browse files

Merge "Rename snapshotProfile to createProfileSnapshot for better consistency"

parents 4ae4b9c6 c3596c32
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -1863,13 +1863,13 @@ binder::Status InstalldNativeService::mergeProfiles(int32_t uid, const std::stri
    return ok();
}

binder::Status InstalldNativeService::snapshotProfile(int32_t appId, const std::string& packageName,
        const std::string& codePath, bool* _aidl_return) {
binder::Status InstalldNativeService::createProfileSnapshot(int32_t appId,
        const std::string& packageName, const std::string& codePath, bool* _aidl_return) {
    ENFORCE_UID(AID_SYSTEM);
    CHECK_ARGUMENT_PACKAGE_NAME(packageName);
    std::lock_guard<std::recursive_mutex> lock(mLock);

    *_aidl_return = snapshot_profile(appId, packageName, codePath);
    *_aidl_return = create_profile_snapshot(appId, packageName, codePath);
    return ok();
}

+1 −1
Original line number Diff line number Diff line
@@ -96,7 +96,7 @@ public:
    binder::Status clearAppProfiles(const std::string& packageName);
    binder::Status destroyAppProfiles(const std::string& packageName);

    binder::Status snapshotProfile(int32_t appId, const std::string& packageName,
    binder::Status createProfileSnapshot(int32_t appId, const std::string& packageName,
            const std::string& codePath, bool* _aidl_return);
    binder::Status destroyProfileSnapshot(const std::string& packageName,
            const std::string& codePath);
+2 −1
Original line number Diff line number Diff line
@@ -62,7 +62,8 @@ interface IInstalld {
    void clearAppProfiles(@utf8InCpp String packageName);
    void destroyAppProfiles(@utf8InCpp String packageName);

    boolean snapshotProfile(int appId, @utf8InCpp String packageName, @utf8InCpp String codePath);
    boolean createProfileSnapshot(int appId, @utf8InCpp String packageName,
            @utf8InCpp String codePath);
    void destroyProfileSnapshot(@utf8InCpp String packageName, @utf8InCpp String codePath);

    void idmap(@utf8InCpp String targetApkPath, @utf8InCpp String overlayApkPath, int uid);
+1 −1
Original line number Diff line number Diff line
@@ -2310,7 +2310,7 @@ bool create_cache_path_default(char path[PKG_PATH_MAX], const char *src,
    }
}

bool snapshot_profile(int32_t app_id, const std::string& package_name,
bool create_profile_snapshot(int32_t app_id, const std::string& package_name,
        const std::string& code_path) {
    int app_shared_gid = multiuser_get_shared_gid(/*user_id*/ 0, app_id);

+2 −1
Original line number Diff line number Diff line
@@ -59,7 +59,8 @@ bool analyze_primary_profiles(uid_t uid, const std::string& pkgname);
// ownership is assigned to AID_SYSTEM.
// The snapshot location is reference_profile_location.snapshot. If a snapshot is already
// there, it will be truncated and overwritten.
bool snapshot_profile(int32_t app_id, const std::string& package, const std::string& code_path);
bool create_profile_snapshot(int32_t app_id, const std::string& package,
        const std::string& code_path);

bool dump_profiles(int32_t uid, const std::string& pkgname, const char* code_paths);

Loading