Correctly handle a case when there are no preloaded apps

am: 28ba2898ce

Change-Id: Iac5083931ff13a81bd631915d198872690252310
This commit is contained in:
Fyodor Kupolov
2016-08-04 21:09:20 +00:00
committed by android-build-merger

View File

@@ -67,10 +67,11 @@ class PreloadAppsInstaller {
void installApps(int userId) {
File[] files = preloadsAppsDirectory.listFiles();
AppInstallCounter counter = new AppInstallCounter(mContext, userId);
if (ArrayUtils.isEmpty(files)) {
counter.setExpectedAppsCount(0);
return;
}
AppInstallCounter counter = new AppInstallCounter(mContext, userId);
int expectedCount = 0;
for (File file : files) {
String apkName = file.getName();