diff --git a/app/src/main/java/com/gh/gamecenter/SplashScreenActivity.java b/app/src/main/java/com/gh/gamecenter/SplashScreenActivity.java index 1fb675a744..be83f390cb 100644 --- a/app/src/main/java/com/gh/gamecenter/SplashScreenActivity.java +++ b/app/src/main/java/com/gh/gamecenter/SplashScreenActivity.java @@ -27,6 +27,7 @@ import com.gh.common.util.FileUtils; import com.gh.common.util.PackageUtils; import com.gh.common.util.TimestampUtils; import com.gh.common.util.TokenUtils; +import com.gh.common.util.Utils; import com.gh.download.DownloadManager; import com.gh.download.DownloadService; import com.gh.gamecenter.db.info.FilterInfo; @@ -77,6 +78,12 @@ public class SplashScreenActivity extends BaseActivity { protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); + // 处理助手已经在后台运行导致的再次启动助手 + if ((getIntent().getFlags() & Intent.FLAG_ACTIVITY_BROUGHT_TO_FRONT) != 0) { + finish(); + return; + } + start = System.currentTimeMillis(); TimestampUtils.initMap(); @@ -113,6 +120,12 @@ public class SplashScreenActivity extends BaseActivity { } } + @Override + protected void onNewIntent(Intent intent) { + super.onNewIntent(intent); + Utils.log("flags---------------onNewIntent"); + } + private class ViewPagerAdapter extends PagerAdapter { private int[] pics = { R.drawable.splash_01 };