Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c64f73e7 authored by Craig Mautner's avatar Craig Mautner
Browse files

Fix startActivityAndWait bugs

- Send timeout message with a delay. The delay got lost when moving
from ActivityStack to ActivityStackSupervisor. Fixes bug 8687083.

- Remove waiting activities from list after they have been awoken.
Previously the list just got bigger and bigger.

Change-Id: Icb9e394db1eefa444e58c5416472017cac32298c
parent eb95786f
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -438,7 +438,7 @@ public class ActivityStackSupervisor {
    void reportActivityLaunchedLocked(boolean timeout, ActivityRecord r,
            long thisTime, long totalTime) {
        for (int i = mWaitingActivityLaunched.size() - 1; i >= 0; i--) {
            WaitResult w = mWaitingActivityLaunched.get(i);
            WaitResult w = mWaitingActivityLaunched.remove(i);
            w.timeout = timeout;
            if (r != null) {
                w.who = new ComponentName(r.info.packageName, r.info.name);
@@ -2182,7 +2182,8 @@ public class ActivityStackSupervisor {
    }

    void scheduleIdleTimeoutLocked(ActivityRecord next) {
        mHandler.obtainMessage(IDLE_TIMEOUT_MSG, next).sendToTarget();
        Message msg = mHandler.obtainMessage(IDLE_TIMEOUT_MSG, next);
        mHandler.sendMessageDelayed(msg, IDLE_TIMEOUT);
    }

    final void scheduleIdleLocked() {