Fixing return type check when expanding via menu.

- When the menu is enabled in PIP, the focused stack when expanding
  a PIP activity to fullscreen is actually the pinned stack.  As a
  result, this was causing a crash since we were setting the return
  type falsely to APPLICATION_ACTIVITY_TYPE and later re-entering
  PIP.  Instead, this check should really just ensure that we only
  only set the application return type if the fullscreen stack is
  visible and we are moving the pinned stack tasks to top.  In all
  other cases, we should move the home stack along with the
  previously pinned task.

Test: Enable menu in SysUI tuner, hit expand and re-enter PIP over
      home and another activity.

Change-Id: I83b41b2f4178c88b9fc01b00eed79b3a53b48560
1 file changed