项目整理

This commit is contained in:
huangzhuanghua
2016-07-06 09:37:33 +08:00
parent 380d38073e
commit 6ec976ccb6
56 changed files with 1773 additions and 3301 deletions

View File

@ -20,8 +20,10 @@ import com.gh.common.constant.Config;
import com.gh.common.util.DataUtils;
import com.gh.common.util.DialogUtils;
import com.gh.common.util.DisplayUtils;
import com.gh.common.util.PackageUtils;
import com.gh.common.util.RunningUtils;
import com.gh.common.util.Utils;
import com.gh.gamecenter.MainActivity;
import com.gh.gamecenter.R;
import com.gh.gamecenter.eventbus.EBShowDialog;
import com.gh.gamecenter.manager.SystemBarTintManager;
@ -193,12 +195,19 @@ public class BaseActivity extends Activity {
private boolean isShowShare = false;
public void onEventMainThread(EBShowDialog showDialog) {
public void onEventMainThread(final EBShowDialog showDialog) {
if (!isPause && this.getClass().getName().equals(RunningUtils.getTopActivity(this))) {
if ("hijack".equals(showDialog.getType())) {
DialogUtils.showHijackDialog(this);
} else if ("delete".equals(showDialog.getType())) {
DialogUtils.showDeleteDialog(this, showDialog.getPath());
DialogUtils.showUninstallDialog(this, new DialogUtils.ConfiremListener() {
@Override
public void onConfirem() {
MainActivity.uninstallMap.put(
PackageUtils.getPackageNameByPath(BaseActivity.this, showDialog.getPath()), showDialog.getPath());
startActivity(PackageUtils.getUninstallIntent(BaseActivity.this, showDialog.getPath()));
}
});
}
}
}