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

Commit 661d866a authored by Winson Chung's avatar Winson Chung
Browse files

Add intent flags back to TaskInfo's base intent

- In ag/10502484 we cloned the task info's base intent
  filtering out the extras and data, but this also
  filters out the flags, which are used by the
  AppTaskTests to check whether it was actually marked
  as excluded. We can add it back to the task info
  since it doesn't cost anything.

Bug: 151123429
Test: atest CtsAppTestCases:AppTaskTests#testSetExcludeFromRecents

Change-Id: Ib616f63a3ed76d82a0e68149855568e7a6155b24
parent 4456f7d2
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -3457,7 +3457,9 @@ class Task extends WindowContainer<WindowContainer> {
        final Intent baseIntent = getBaseIntent();
        // Make a copy of base intent because this is like a snapshot info.
        // Besides, {@link RecentTasks#getRecentTasksImpl} may modify it.
        final int baseIntentFlags = baseIntent == null ? 0 : baseIntent.getFlags();
        info.baseIntent = baseIntent == null ? new Intent() : baseIntent.cloneFilter();
        info.baseIntent.setFlags(baseIntentFlags);
        info.baseActivity = mReuseActivitiesReport.base != null
                ? mReuseActivitiesReport.base.intent.getComponent()
                : null;