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

Commit

Permalink
Null check focused window when entering/exiting private mode (#1763)
Browse files Browse the repository at this point in the history
  • Loading branch information
keianhzo authored Sep 4, 2019
1 parent d8d8d20 commit 4fdf7f5
Showing 1 changed file with 12 additions and 2 deletions.
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

0 comments on commit 4fdf7f5

Please sign in to comment.