Merge "Correctly handle a case when there are no preloaded apps" into nyc-mr1-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
a4b89c054c
@@ -67,10 +67,11 @@ class PreloadAppsInstaller {
|
|||||||
|
|
||||||
void installApps(int userId) {
|
void installApps(int userId) {
|
||||||
File[] files = preloadsAppsDirectory.listFiles();
|
File[] files = preloadsAppsDirectory.listFiles();
|
||||||
|
AppInstallCounter counter = new AppInstallCounter(mContext, userId);
|
||||||
if (ArrayUtils.isEmpty(files)) {
|
if (ArrayUtils.isEmpty(files)) {
|
||||||
|
counter.setExpectedAppsCount(0);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
AppInstallCounter counter = new AppInstallCounter(mContext, userId);
|
|
||||||
int expectedCount = 0;
|
int expectedCount = 0;
|
||||||
for (File file : files) {
|
for (File file : files) {
|
||||||
String apkName = file.getName();
|
String apkName = file.getName();
|
||||||
|
|||||||
Reference in New Issue
Block a user