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

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

Merge "Don't destroy ART profiles after package move."

parents d7a33473 abc45c87
Loading
Loading
Loading
Loading
+7 −5
Original line number Original line Diff line number Diff line
@@ -689,12 +689,14 @@ binder::Status InstalldNativeService::destroyAppData(const std::unique_ptr<std::
        if (delete_dir_contents_and_dir(path) != 0) {
        if (delete_dir_contents_and_dir(path) != 0) {
            res = error("Failed to delete " + path);
            res = error("Failed to delete " + path);
        }
        }
        if ((flags & FLAG_CLEAR_APP_DATA_KEEP_ART_PROFILES) == 0) {
            destroy_app_current_profiles(packageName, userId);
            destroy_app_current_profiles(packageName, userId);
            // TODO(calin): If the package is still installed by other users it's probably
            // TODO(calin): If the package is still installed by other users it's probably
            // beneficial to keep the reference profile around.
            // beneficial to keep the reference profile around.
            // Verify if it's ok to do that.
            // Verify if it's ok to do that.
            destroy_app_reference_profile(packageName);
            destroy_app_reference_profile(packageName);
        }
        }
    }
    if (flags & FLAG_STORAGE_EXTERNAL) {
    if (flags & FLAG_STORAGE_EXTERNAL) {
        std::lock_guard<std::recursive_mutex> lock(mMountsLock);
        std::lock_guard<std::recursive_mutex> lock(mMountsLock);
        for (const auto& n : mStorageMounts) {
        for (const auto& n : mStorageMounts) {