Prevent cleaning up and resuming null activity when task is reparented.

- If reparenting a task with no running activities, ensure that we don't
  try to clean up the null activity record from the stack.  In addition,
  once the task is reparented, skip the attempt to front if the activity
  is null.

Bug: 36508639
Test: android.server.cts.ActivityManagerPinnedStackTests
Change-Id: I58d4d600523ac263d0be1ee8d09cfc4d94bef664
1 file changed