@alivedise 
 if do the same thing in setOpenFrame,  there will be problem in windowOpened since displayedApp is null when firstly launch.
 just wondering why we should do that? 
Do we have any app which open inline activity "B" and  open "C" after activity "B" is done ? (I guess this is to prevent that.)