This switch to frame is necessary when emulating the home button, so I would move it to the method.