OSDN Git Service

Fix issue #6636731: Mariner animation ring gets stuck
authorDianne Hackborn <hackbod@google.com>
Fri, 15 Jun 2012 19:05:27 +0000 (12:05 -0700)
committerDianne Hackborn <hackbod@google.com>
Fri, 15 Jun 2012 19:12:56 +0000 (12:12 -0700)
Weren't cleaning out any ActivityOptions that are still attached
to a finishing activity.

Bug: 6636731
Change-Id: If0520bbcbf1d4ce19d46ff769918893cefda9c87

services/java/com/android/server/am/ActivityRecord.java
services/java/com/android/server/am/ActivityStack.java

index 26c5c3d..17957d2 100644 (file)
@@ -164,6 +164,9 @@ final class ActivityRecord {
         if (pendingResults != null) {
             pw.print(prefix); pw.print("pendingResults="); pw.println(pendingResults);
         }
+        if (pendingOptions != null) {
+            pw.print(prefix); pw.print("pendingOptions="); pw.println(pendingOptions);
+        }
         if (uriPermissions != null) {
             if (uriPermissions.readUriPermissions != null) {
                 pw.print(prefix); pw.print("readUriPermissions=");
@@ -202,7 +205,7 @@ final class ActivityRecord {
         if (lastVisibleTime != 0 || waitingVisible || nowVisible) {
             pw.print(prefix); pw.print("waitingVisible="); pw.print(waitingVisible);
                     pw.print(" nowVisible="); pw.print(nowVisible);
-                    pw.print("lastVisibleTime=");
+                    pw.print(" lastVisibleTime=");
                     TimeUtils.formatDuration(lastVisibleTime, pw); pw.println("");
         }
         if (configDestroy || configChangeFlags != 0) {
@@ -453,6 +456,7 @@ final class ActivityRecord {
             if (task != null && !finishing) {
                 task.numActivities--;
             }
+            clearOptionsLocked();
         }
     }
 
@@ -466,6 +470,9 @@ final class ActivityRecord {
             if (task != null && inHistory) {
                 task.numActivities--;
             }
+            if (stopped) {
+                clearOptionsLocked();
+            }
         }
     }
 
index 1eef2cf..e2d6d98 100755 (executable)
@@ -1055,7 +1055,9 @@ final class ActivityStack {
             mHandler.removeMessages(STOP_TIMEOUT_MSG, r);
             r.stopped = true;
             r.state = ActivityState.STOPPED;
-            if (!r.finishing) {
+            if (r.finishing) {
+                r.clearOptionsLocked();
+            } else {
                 if (r.configDestroy) {
                     destroyActivityLocked(r, true, false, "stop-config");
                     resumeTopActivityLocked(null);