Created
August 26, 2016 07:05
-
-
Save beilly/7fb2c10e7694b04e3c902cdea8dbc057 to your computer and use it in GitHub Desktop.
解决4.4机器上面按home键返回桌面后恢复需要重新走launcher页面的bug
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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