项目整理

This commit is contained in:
huangzhuanghua
2016-12-12 16:34:19 +08:00
parent b18146f699
commit 3cbc850d12
64 changed files with 1169 additions and 1804 deletions

View File

@ -198,26 +198,26 @@ public class DownloadDialog implements OnCollectionCallBackListener {
ConcurrentHashMap<String, Integer> hashMap = new ConcurrentHashMap<>();
boolean isCollection;
for (int i = 0, size = gameApk.size(); i < size; i++) {
for (ApkEntity apkEntity : gameApk) {
isCollection = false;
for (GameCollectionEntity gameCollectionEntity : gameEntity.getCollection()) {
for (String packageName : gameCollectionEntity.getPackage()) {
if (packageName.equals(gameApk.get(i).getPackageName())){
if (packageName.equals(apkEntity.getPackageName())){
isCollection = true;
if (hashMap.get(gameCollectionEntity.getName()) != null) {
gameCollectionApk.get(hashMap.get(gameCollectionEntity.getName()))
.getApkCollection().getSaveApkEntity().add(gameApk.get(i));
.getApkCollection().getSaveApkEntity().add(apkEntity);
} else {
ApkEntity apkEntity = new ApkEntity();
ApkEntity newApkEntity = new ApkEntity();
GameCollectionEntity collectionEntity = new GameCollectionEntity();
List<ApkEntity> saveApkList = new ArrayList<>();
saveApkList.add(gameApk.get(i));
saveApkList.add(apkEntity);
collectionEntity.setSaveApkEntity(saveApkList);
collectionEntity.setName(gameCollectionEntity.getName());
collectionEntity.setIcon(gameCollectionEntity.getIcon());
collectionEntity.setColor(gameCollectionEntity.getColor());
apkEntity.setApkCollection(collectionEntity);
gameCollectionApk.add(apkEntity);
newApkEntity.setApkCollection(collectionEntity);
gameCollectionApk.add(newApkEntity);
hashMap.put(gameCollectionEntity.getName(), gameCollectionApk.size() - 1);
}
@ -225,7 +225,7 @@ public class DownloadDialog implements OnCollectionCallBackListener {
}
}
if (!isCollection) {
gameCollectionApk.add(gameApk.get(i));
gameCollectionApk.add(apkEntity);
}
}