From abbf602969c2bbf34987ee55127cdf396511a521 Mon Sep 17 00:00:00 2001 From: "Randall E. Barker" Date: Thu, 3 Oct 2019 13:48:42 -0700 Subject: [PATCH] No longer save number of private windows on exit. Fixes #1899 (#1902) --- .../org/mozilla/vrbrowser/ui/widgets/Windows.java | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/app/src/common/shared/org/mozilla/vrbrowser/ui/widgets/Windows.java b/app/src/common/shared/org/mozilla/vrbrowser/ui/widgets/Windows.java index cf39d5fba..09e7bd909 100644 --- a/app/src/common/shared/org/mozilla/vrbrowser/ui/widgets/Windows.java +++ b/app/src/common/shared/org/mozilla/vrbrowser/ui/widgets/Windows.java @@ -66,7 +66,6 @@ public void load(WindowWidget aWindow) { class WindowsState { WindowPlacement focusedWindowPlacement = WindowPlacement.FRONT; ArrayList regularWindowsState = new ArrayList<>(); - ArrayList privateWindowsState = new ArrayList<>(); boolean privateMode = false; } @@ -132,11 +131,6 @@ private void saveState() { windowState.load(window); state.regularWindowsState.add(windowState); } - for (WindowWidget window : mPrivateWindows) { - WindowState windowState = new WindowState(); - windowState.load(window); - state.privateWindowsState.add(windowState); - } Gson gson = new GsonBuilder().setPrettyPrinting().create(); gson.toJson(state, writer); @@ -578,11 +572,6 @@ private void restoreWindows() { WindowWidget window = addWindow(windowState); window.getSessionStack().restore(windowState.sessionStack, windowState.currentSessionId); } - mPrivateMode = true; - for (WindowState windowState : windowsState.privateWindowsState) { - WindowWidget window = addWindow(windowState); - window.getSessionStack().restore(windowState.sessionStack, windowState.currentSessionId); - } mPrivateMode = !windowsState.privateMode; if (windowsState.privateMode) { enterPrivateMode();