在onUserLeaveHint方法中,可以处理按home键时候的操作!
看sdk说明:Called as part of the activity lifecycle when an activity is about to go into the background as the result of user choice. For example, when the user presses the Home key, onUserLeaveHint
will be called, but when an incoming phone call causes the in-call Activity to be automatically brought to the foreground, onUserLeaveHint
will not be called on the activity being interrupted.