fix conflict
This commit is contained in:
@ -32,7 +32,6 @@ import com.gh.common.util.GameUtils;
|
||||
import com.gh.common.util.LoginUtils;
|
||||
import com.gh.common.util.PackageUtils;
|
||||
import com.gh.common.util.PlatformUtils;
|
||||
import com.gh.common.util.TokenUtils;
|
||||
import com.gh.common.util.TrafficUtils;
|
||||
import com.gh.download.DownloadManager;
|
||||
import com.gh.gamecenter.db.info.ConcernInfo;
|
||||
@ -634,8 +633,8 @@ public class MainActivity extends BaseActivity {
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
|
||||
// 初始化gameMap
|
||||
// DownloadManager.getInstance(this).initGameMap();
|
||||
// 上传数据
|
||||
DataCollectionManager.getInstance(getApplicationContext()).upload();
|
||||
|
||||
sp = PreferenceManager.getDefaultSharedPreferences(this);
|
||||
isNewFirstLaunch = sp.getBoolean("isNewFirstLaunchV" + PackageUtils.getVersionName(this), true);
|
||||
@ -674,11 +673,11 @@ public class MainActivity extends BaseActivity {
|
||||
// 检查是否有权限读取应用列表
|
||||
checkPermission();
|
||||
|
||||
if (isNewFirstLaunch || TokenUtils.getDeviceId(this) == null) {
|
||||
// if (isNewFirstLaunch || TokenUtils.getDeviceId(this) == null) {
|
||||
// HaloApp.MAIN_EXECUTOR.execute(new Runnable() {
|
||||
// @Override
|
||||
// public void run() {
|
||||
// 注册设备
|
||||
// 注册设备
|
||||
// TokenUtils.register(MainActivity.this.getApplicationContext());
|
||||
// TokenUtils.getToken(MainActivity.this.getApplicationContext(), false) // TODO 是否移除
|
||||
// .subscribeOn(Schedulers.io())
|
||||
@ -694,31 +693,15 @@ public class MainActivity extends BaseActivity {
|
||||
// initConcern(); // 初始化关注 移到登录成功后调用
|
||||
// }
|
||||
// });
|
||||
} else {
|
||||
// } else {
|
||||
// updateUserGhzs();
|
||||
}
|
||||
// }
|
||||
|
||||
// 执行跳转事件
|
||||
handler.postDelayed(skipRun, 500);
|
||||
|
||||
// if (sp.getBoolean("changeDefaultIcon", false) && sp.getInt("default_user_icon", 0) != 0) {
|
||||
// postDefaultIcon(sp.getInt("default_user_icon", 0));
|
||||
// }
|
||||
|
||||
getSuggestionType();
|
||||
|
||||
// if (LoginUtils.getUserInfo(this) != null && getIntent() != null && getIntent().getBundleExtra(KEY_DATA) != null
|
||||
// && getIntent().getBundleExtra(KEY_DATA).getBoolean("exceptionReStart", false)) {
|
||||
// DialogUtils.showWarningDialog(this, "发生闪退", "光环助手刚刚发生了闪退,反馈一下(只需简单描述你刚才的操作)以帮忙我们更好地修复问题?"
|
||||
// , "暂不", " 反馈一下"
|
||||
// , new DialogUtils.ConfirmListener() {
|
||||
// @Override
|
||||
// public void onConfirm() {
|
||||
// SuggestionActivity.startSuggestionActivity(MainActivity.this, 3, null, null);
|
||||
// }
|
||||
// }, null);
|
||||
// }
|
||||
|
||||
final String message = Config.getExceptionMsg(this);
|
||||
if (LoginUtils.getUserInfo(this) != null && !TextUtils.isEmpty(message)) {
|
||||
Config.setExceptionMsg(this, null);
|
||||
@ -739,9 +722,6 @@ public class MainActivity extends BaseActivity {
|
||||
super.onDestroy();
|
||||
DownloadManager.getInstance(this).removeObserver(dataWatcher);
|
||||
|
||||
// if (sp.getBoolean("changeDefaultIcon", false) && sp.getInt("default_user_icon", 0) != 0) {
|
||||
// postDefaultIcon(sp.getInt("default_user_icon", 0));
|
||||
// }
|
||||
|
||||
handler.removeCallbacksAndMessages(null);
|
||||
}
|
||||
@ -762,7 +742,7 @@ public class MainActivity extends BaseActivity {
|
||||
String string = response.string();
|
||||
JSONObject object = new JSONObject(string);
|
||||
String deviceId = object.getString("device_id");
|
||||
Utils.log("========::" + deviceId);
|
||||
Utils.log("========checkDevice::" + deviceId);
|
||||
if (!TextUtils.isEmpty(deviceId)) {
|
||||
oldUserSkip(deviceId);
|
||||
}
|
||||
@ -905,8 +885,8 @@ public class MainActivity extends BaseActivity {
|
||||
@Subscribe(threadMode = ThreadMode.MAIN)
|
||||
public void onEventMainThread(EBPackage busFour) {
|
||||
final String packageName = busFour.getPackageName();
|
||||
if("安装".equals(busFour.getType())) { // 删除下载完成 弹窗
|
||||
NotificationManager nManager = (NotificationManager)getSystemService(Context.NOTIFICATION_SERVICE);
|
||||
if ("安装".equals(busFour.getType())) { // 删除下载完成 弹窗
|
||||
NotificationManager nManager = (NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE);
|
||||
nManager.cancel(packageName.hashCode());
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user