Skype is not opening in full screen

Problem: {
    1. Skype is using flag adjacent launch in this issue while starting the activity.
    2. Skype unable to open in full screen after split screen dismissed.
    3. Skype is being to multi window. without any prior task present.
    4. But its states are not properly set. Causing this issue.
}

Solution: {
    1. Also if source task and candidate task are equal do nothing.
    2. This means task that is starting new activity is itself.
}

Bug: 262643393
Test: pass existing tests
Merged-In: I19748f8128d1a3f4eac4dae0d9b7cfd99e5e835c
Change-Id: I19748f8128d1a3f4eac4dae0d9b7cfd99e5e835c
Signed-off-by: pioush.kumar-IN009423 <pioush.kumar@oppo.com>
This commit is contained in:
pioush.kumar-IN009423
2022-12-15 11:08:31 +05:30
committed by Tony Huang
parent db0f714e88
commit 93d6b593b0

View File

@@ -1074,10 +1074,14 @@ final class TaskDisplayArea extends DisplayArea<WindowContainer> {
// Use launch-adjacent-flag-root if launching with launch-adjacent flag.
if ((launchFlags & FLAG_ACTIVITY_LAUNCH_ADJACENT) != 0
&& mLaunchAdjacentFlagRootTask != null) {
// If the adjacent launch is coming from the same root, launch to adjacent root instead.
if (sourceTask != null && mLaunchAdjacentFlagRootTask.getAdjacentTaskFragment() != null
if (sourceTask != null && sourceTask == candidateTask) {
// Do nothing when task that is getting opened is same as the source.
} else if (sourceTask != null
&& mLaunchAdjacentFlagRootTask.getAdjacentTaskFragment() != null
&& (sourceTask == mLaunchAdjacentFlagRootTask
|| sourceTask.isDescendantOf(mLaunchAdjacentFlagRootTask))) {
// If the adjacent launch is coming from the same root, launch to
// adjacent root instead.
return mLaunchAdjacentFlagRootTask.getAdjacentTaskFragment().asTask();
} else {
return mLaunchAdjacentFlagRootTask;