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

Commit 4acfd858 authored by Andrii Kulian's avatar Andrii Kulian
Browse files

Fix issues with launching activities on virtual displays

- Virtual displays might have hdr capabilities not initialized,
  which lead to exception when checking.
- Dynamic stacks were mistakenly considered an invalid launch stack.

Test: android.server.cts.ActivityManagerDisplayTests
Change-Id: I20356d6e25cf9e5fa4a3d7bd3699a8e82a73f21a
parent 38fe7107
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -520,7 +520,7 @@ public final class DisplayInfo implements Parcelable {
    }

    public boolean isHdr() {
        int[] types = hdrCapabilities.getSupportedHdrTypes();
        int[] types = hdrCapabilities != null ? hdrCapabilities.getSupportedHdrTypes() : null;
        return types != null && types.length > 0;
    }

+3 −0
Original line number Diff line number Diff line
@@ -2072,6 +2072,9 @@ class ActivityStarter {
            case RECENTS_STACK_ID:
                return r.isRecentsActivity();
            default:
                if (StackId.isDynamicStack(stackId)) {
                    return true;
                }
                Slog.e(TAG, "isValidLaunchStackId: Unexpected stackId=" + stackId);
                return false;
        }