Merge "Merge "Calculate apk size multiple times" am: 223579af1e am: 89cc942af5 am: 9615331f71"
This commit is contained in:
committed by
Android (Google) Code Review
commit
1b3372b4e5
@@ -614,11 +614,14 @@ public final class BackgroundDexOptService {
|
||||
size += getDirectorySize(path);
|
||||
if (!ArrayUtils.isEmpty(info.applicationInfo.splitSourceDirs)) {
|
||||
for (String splitSourceDir : info.applicationInfo.splitSourceDirs) {
|
||||
path = Paths.get(splitSourceDir).toFile();
|
||||
if (path.isFile()) {
|
||||
path = path.getParentFile();
|
||||
File pathSplitSourceDir = Paths.get(splitSourceDir).toFile();
|
||||
if (pathSplitSourceDir.isFile()) {
|
||||
pathSplitSourceDir = pathSplitSourceDir.getParentFile();
|
||||
}
|
||||
size += getDirectorySize(path);
|
||||
if (path.getAbsolutePath().equals(pathSplitSourceDir.getAbsolutePath())) {
|
||||
continue;
|
||||
}
|
||||
size += getDirectorySize(pathSplitSourceDir);
|
||||
}
|
||||
}
|
||||
return size;
|
||||
|
||||
Reference in New Issue
Block a user