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

Commit 6d109343 authored by Automerger Merge Worker's avatar Automerger Merge Worker
Browse files

Merge "Copy over PkgState in PackageSetting updateFrom" into rvc-dev am: cb3d162c

Change-Id: I924993d18ff7efcf3c698be645b5f7de7f05c921
parents 70dacb5d cb3d162c
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -321,6 +321,8 @@ public class PackageSetting extends PackageSettingBase {

        Set<String> mimeGroupNames = other.mimeGroups != null ? other.mimeGroups.keySet() : null;
        updateMimeGroups(mimeGroupNames);

        getPkgState().updateFrom(other.getPkgState());
    }

    @NonNull
+17 −0
Original line number Diff line number Diff line
@@ -27,6 +27,7 @@ import android.content.pm.SharedLibraryInfo;
import com.android.internal.util.DataClass;
import com.android.server.pm.PackageSetting;

import java.util.ArrayList;
import java.util.List;

/**
@@ -88,6 +89,22 @@ public class PackageStateUnserialized {
        return latestUse;
    }

    public void updateFrom(PackageStateUnserialized other) {
        this.hiddenUntilInstalled = other.hiddenUntilInstalled;

        if (!other.usesLibraryInfos.isEmpty()) {
            this.usesLibraryInfos = new ArrayList<>(other.usesLibraryInfos);
        }

        if (!other.usesLibraryFiles.isEmpty()) {
            this.usesLibraryFiles = new ArrayList<>(other.usesLibraryFiles);
        }

        this.updatedSystemApp = other.updatedSystemApp;
        this.lastPackageUsageTimeInMills = other.lastPackageUsageTimeInMills;
        this.overrideSeInfo = other.overrideSeInfo;
    }



    // Code below generated by codegen v1.0.14.