切换Fresco框架
This commit is contained in:
@ -575,31 +575,35 @@ public class MainActivity extends BaseFragmentActivity implements OnClickListene
|
||||
new Response.Listener<JSONObject>() {
|
||||
@Override
|
||||
public void onResponse(JSONObject response) {
|
||||
Gson gson = new Gson();
|
||||
GameEntity gameEntity = gson.fromJson(response.toString(), GameEntity.class);
|
||||
ConcernInfo concernInfo = concernManager.findConcernById(gameEntity.getId());
|
||||
if (concernInfo != null && gameEntity.getApk() != null
|
||||
&& gameEntity.getApk().size() != 0) {
|
||||
HashMap<String, Boolean> packageNames = new HashMap<>();
|
||||
String packageName;
|
||||
for (int i = 0, size = gameEntity.getApk().size(); i < size; i++) {
|
||||
packageName = gameEntity.getApk().get(i).getPackageName();
|
||||
if (PackageManager.isInstalled(packageName)) {
|
||||
packageNames.put(packageName, true);
|
||||
} else {
|
||||
packageNames.put(packageName, false);
|
||||
if (response.length() != 0) {
|
||||
Gson gson = new Gson();
|
||||
GameEntity gameEntity = gson.fromJson(response.toString(), GameEntity.class);
|
||||
ConcernInfo concernInfo = concernManager.findConcernById(gameEntity.getId());
|
||||
if (concernInfo != null && gameEntity.getApk() != null
|
||||
&& gameEntity.getApk().size() != 0) {
|
||||
HashMap<String, Boolean> packageNames = new HashMap<>();
|
||||
String packageName;
|
||||
for (int i = 0, size = gameEntity.getApk().size(); i < size; i++) {
|
||||
packageName = gameEntity.getApk().get(i).getPackageName();
|
||||
if (PackageManager.isInstalled(packageName)) {
|
||||
packageNames.put(packageName, true);
|
||||
} else {
|
||||
packageNames.put(packageName, false);
|
||||
}
|
||||
}
|
||||
concernInfo.setTime(System.currentTimeMillis());
|
||||
concernInfo.setPackageNames(packageNames);
|
||||
concernManager.updateByConcern(concernInfo);
|
||||
}
|
||||
|
||||
if (isNewFirstLaunch) {
|
||||
//默认安装即为关注
|
||||
if (!concernManager.isConcern(gameEntity.getId())) {
|
||||
concernManager.addByEntity(gameEntity);
|
||||
}
|
||||
}
|
||||
concernInfo.setTime(System.currentTimeMillis());
|
||||
concernInfo.setPackageNames(packageNames);
|
||||
concernManager.updateByConcern(concernInfo);
|
||||
}
|
||||
if (isNewFirstLaunch) {
|
||||
//默认安装即为关注
|
||||
if (!concernManager.isConcern(gameEntity.getId())) {
|
||||
concernManager.addByEntity(gameEntity);
|
||||
}
|
||||
}
|
||||
|
||||
addConcernCount();
|
||||
if (cCount == size) {
|
||||
update();
|
||||
|
||||
Reference in New Issue
Block a user