Skip to content
This repository has been archived by the owner on Jul 22, 2024. It is now read-only.

Null check focused window when entering/exiting private mode #1763

Merged
merged 1 commit into from
Sep 4, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -407,7 +407,12 @@ public void enterPrivateMode() {
}
mPrivateMode = true;
updateCurvedMode(true);
mRegularWindowPlacement = mFocusedWindow.getWindowPlacement();
if (mFocusedWindow != null) {
mRegularWindowPlacement = mFocusedWindow.getWindowPlacement();

} else {
mRegularWindowPlacement = WindowPlacement.FRONT;
}
for (WindowWidget window: mRegularWindows) {
setWindowVisible(window, false);
}
Expand All @@ -434,7 +439,12 @@ public void exitPrivateMode() {
}
mPrivateMode = false;
updateCurvedMode(true);
mPrivateWindowPlacement = mFocusedWindow.getWindowPlacement();
if (mFocusedWindow != null) {
mPrivateWindowPlacement = mFocusedWindow.getWindowPlacement();

} else {
mPrivateWindowPlacement = WindowPlacement.FRONT;
}
for (WindowWidget window: mRegularWindows) {
setWindowVisible(window, true);
}
Expand Down