Improve activity handling to fix lock screen launch and video launch