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

Commit 7d9eaa43 authored by Craig Mautner's avatar Craig Mautner
Browse files

Call updateUsageStats for all stacks.

Was only calling it for the frontmost stack. But if we are going to
or from the home activity then the pausing stack moves to the back.

Fixes bug 8666221.

Change-Id: I1d6d19b49da4aa23414303336fa266362ae5f4b1
parent f88c50f8
Loading
Loading
Loading
Loading
+1 −3
Original line number Original line Diff line number Diff line
@@ -850,9 +850,7 @@ final class ActivityStack {
                        prev.shortComponentName);
                        prev.shortComponentName);
                prev.app.thread.schedulePauseActivity(prev.appToken, prev.finishing,
                prev.app.thread.schedulePauseActivity(prev.appToken, prev.finishing,
                        userLeaving, prev.configChangeFlags);
                        userLeaving, prev.configChangeFlags);
                if (mStackSupervisor.isFrontStack(this)) {
                mService.updateUsageStats(prev, false);
                mService.updateUsageStats(prev, false);
                }
            } catch (Exception e) {
            } catch (Exception e) {
                // Ignore exception, if process died other code will cleanup.
                // Ignore exception, if process died other code will cleanup.
                Slog.w(TAG, "Exception thrown during pause", e);
                Slog.w(TAG, "Exception thrown during pause", e);