Make sure to stop noHistory="true" activities properly

The code was correctly inducing a 'finish' when such an activity was
being stopped, but then was not continuing with the rest of the stop
bookkeeping at that point.  In some circumstances this could result
in an inconsistent state, with the activity marked as finishing but
neither in the foreground nor stopped.

Bug 6585403

Change-Id: Ib5c5be885bc6534e099e040d87a8589f7b7454ce
diff --git a/services/java/com/android/server/am/ActivityStack.java b/services/java/com/android/server/am/ActivityStack.java
index 6af7a88..8a86fe7 100755
--- a/services/java/com/android/server/am/ActivityStack.java
+++ b/services/java/com/android/server/am/ActivityStack.java
@@ -3282,7 +3282,9 @@
                 requestFinishActivityLocked(r.appToken, Activity.RESULT_CANCELED, null,
                         "no-history");
             }
-        } else if (r.app != null && r.app.thread != null) {
+        }
+
+        if (r.app != null && r.app.thread != null) {
             if (mMainStack) {
                 if (mService.mFocusedActivity == r) {
                     mService.setFocusedActivityLocked(topRunningActivityLocked(null));