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

Commit 9b2f7328 authored by Maryam Dehaini's avatar Maryam Dehaini
Browse files

Add null checks after getting decor

Bug: 442334064
Flag: EXEMPT minor bugfix
Test: manual testing
Change-Id: Ic505cf8e01ebbfee8b01ac3feaf5cdcbbc12a328
parent e4fd8950
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -1080,6 +1080,7 @@ public class DesktopModeWindowDecorViewModel implements WindowDecorViewModel,
    public boolean updateAppToWebEducationRequestTimestamp(int taskId,
            long latestOpenInBrowserEducationTimestamp) {
        final WindowDecorationWrapper decor = mWindowDecorByTaskId.get(taskId);
        if (decor == null) return false;
        return decor.updateAppToWebEducationRequestTimestamp(latestOpenInBrowserEducationTimestamp);
    }

@@ -1092,6 +1093,7 @@ public class DesktopModeWindowDecorViewModel implements WindowDecorViewModel,
    public Object isBrowserSessionAvailable(RunningTaskInfo taskInfo,
            @NonNull Continuation<? super Boolean> completion) {
        final WindowDecorationWrapper decor = mWindowDecorByTaskId.get(taskInfo.taskId);
        if (decor == null) return false;
        return decor.isBrowserSessionAvailable();
    }

@@ -1103,6 +1105,7 @@ public class DesktopModeWindowDecorViewModel implements WindowDecorViewModel,
    @Override
    public boolean isCapturedLinkAvailable(int taskId) {
        final WindowDecorationWrapper decor = mWindowDecorByTaskId.get(taskId);
        if (decor == null) return false;
        return decor.isCapturedLinkAvailable();
    }