Merge "Copy over PkgState in PackageSetting updateFrom" into rvc-dev
This commit is contained in:
@@ -321,6 +321,8 @@ public class PackageSetting extends PackageSettingBase {
|
|||||||
|
|
||||||
Set<String> mimeGroupNames = other.mimeGroups != null ? other.mimeGroups.keySet() : null;
|
Set<String> mimeGroupNames = other.mimeGroups != null ? other.mimeGroups.keySet() : null;
|
||||||
updateMimeGroups(mimeGroupNames);
|
updateMimeGroups(mimeGroupNames);
|
||||||
|
|
||||||
|
getPkgState().updateFrom(other.getPkgState());
|
||||||
}
|
}
|
||||||
|
|
||||||
@NonNull
|
@NonNull
|
||||||
|
|||||||
@@ -27,6 +27,7 @@ import android.content.pm.SharedLibraryInfo;
|
|||||||
import com.android.internal.util.DataClass;
|
import com.android.internal.util.DataClass;
|
||||||
import com.android.server.pm.PackageSetting;
|
import com.android.server.pm.PackageSetting;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -88,6 +89,22 @@ public class PackageStateUnserialized {
|
|||||||
return latestUse;
|
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.
|
// Code below generated by codegen v1.0.14.
|
||||||
|
|||||||
Reference in New Issue
Block a user