修复InstallUtils卸载事件异常BUG 修复提问时问题标签顺序混乱问题
This commit is contained in:
@ -65,8 +65,14 @@ public class InstallUtils {
|
||||
|
||||
DownloadEntity downloadEntity = DownloadManager.getInstance(context).getDownloadEntityByPackageName(packageName);
|
||||
String installVersion = PackageUtils.getVersionByPackage(context, packageName);
|
||||
if (!TextUtils.isEmpty(installVersion) && installVersion.equals(downloadEntity.getVersionName()))
|
||||
EventBus.getDefault().post(new EBPackage("安装", packageName));
|
||||
if (!TextUtils.isEmpty(installVersion) && downloadEntity != null &&
|
||||
installVersion.equals(downloadEntity.getVersionName())) {
|
||||
if (!downloadEntity.isPluggable() || PackageUtils.isSignature(context, packageName)) {
|
||||
EventBus.getDefault().post(new EBPackage("安装", packageName));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
for (String key : keys) {
|
||||
@ -79,7 +85,7 @@ public class InstallUtils {
|
||||
long time = uninstallMap.get(packageName);
|
||||
if (System.currentTimeMillis() - time >= MAX_TIME) {
|
||||
keys.add(packageName);
|
||||
} else if (list.contains(packageName)) {
|
||||
} else if (!list.contains(packageName)) {
|
||||
keys.add(packageName);
|
||||
EventBus.getDefault().post(new EBPackage("卸载", packageName));
|
||||
}
|
||||
|
||||
@ -233,8 +233,8 @@ public class QuestionsEditFragment extends NormalFragment {
|
||||
.subscribe(new Response<List<String>>() {
|
||||
@Override
|
||||
public void onResponse(List<String> response) {
|
||||
for (String s : response) {
|
||||
addTag(s, false);
|
||||
for (int i = response.size() - 1; i >= 0; i--) {
|
||||
addTag(response.get(i), false);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user