如何检查您的活动是否在堆栈中排在第一位?( )
activity.isTaskRoot()
(ActivityManager)getSystemService(Context.ACTIVITY_SERVICE).isTaskRoot()