Merge "Fix the scanning on non-APEX devices." am: 6589fd106d am: fb8dbf9157 am: ac889bc8fc
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1889637 Change-Id: Iadbc325c2d6741dcf37e451e7ee855f8045e4237
This commit is contained in:
@@ -22051,8 +22051,10 @@ public class PackageManagerService extends IPackageManager.Stub
|
||||
ApexManager.ActiveApexInfo apexInfo) {
|
||||
for (int i = 0, size = SYSTEM_PARTITIONS.size(); i < size; i++) {
|
||||
ScanPartition sp = SYSTEM_PARTITIONS.get(i);
|
||||
if (apexInfo.preInstalledApexPath.getAbsolutePath().startsWith(
|
||||
sp.getFolder().getAbsolutePath() + File.separator)) {
|
||||
if (apexInfo.preInstalledApexPath.getAbsolutePath().equals(
|
||||
sp.getFolder().getAbsolutePath())
|
||||
|| apexInfo.preInstalledApexPath.getAbsolutePath().startsWith(
|
||||
sp.getFolder().getAbsolutePath() + File.separator)) {
|
||||
return new ScanPartition(apexInfo.apexDirectory, sp, SCAN_AS_APK_IN_APEX);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user