Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
解决4.4机器上面按home键返回桌面后恢复需要重新走launcher页面的bug
if (!isTaskRoot()) {
Intent intent = getIntent();
String action = intent.getAction();
if (intent.hasCategory(Intent.CATEGORY_LAUNCHER) && action != null && action.equals(Intent.ACTION_MAIN)) {
finish();
return;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.