@OverridepublicRunnableListstartActivitySafely(Viewv,Intentintent,ItemInfoitem){if(!hasBeenResumed()){RunnableListresult=newRunnableList();// Workaround an issue where the WM launch animation is clobbered when finishing the// recents animation into launcher. Defer launching the activity until Launcher is// next resumed.addEventCallback(EVENT_RESUMED,()->{RunnableListactualResult=startActivitySafely(v,intent,item);if(actualResult!=null){actualResult.add(result::executeAllAndDestroy);}else{result.executeAllAndDestroy();}});if(mOnDeferredActivityLaunchCallback!=null){mOnDeferredActivityLaunchCallback.run();mOnDeferredActivityLaunchCallback=null;}returnresult;}RunnableListresult=super.startActivitySafely(v,intent,item);if(result!=null&&vinstanceofBubbleTextView){// This is set to the view that launched the activity that navigated the user away// from launcher. Since there is no callback for when the activity has finished// launching, enable the press state and keep this reference to reset the press// state when we return to launcher.BubbleTextViewbtv=(BubbleTextView)v;btv.setStayPressed(true);result.add(()->btv.setStayPressed(false));}returnresult;}