Browse Source

perform exit cleanup when browser is closed regardless of whether last tab is deleted or not

master
Anthony Restaino 9 years ago
parent
commit
0a4d81f7e2
  1. 2
      app/src/main/java/acr/browser/lightning/activity/BrowserActivity.java
  2. 1
      app/src/main/java/acr/browser/lightning/activity/IncognitoActivity.java
  3. 1
      app/src/main/java/acr/browser/lightning/activity/MainActivity.java

2
app/src/main/java/acr/browser/lightning/activity/BrowserActivity.java

@ -1068,7 +1068,7 @@ public abstract class BrowserActivity extends ThemableBrowserActivity implements
Log.d(Constants.TAG, "deleted tab"); Log.d(Constants.TAG, "deleted tab");
} }
private void performExitCleanUp() { public void performExitCleanUp() {
final LightningView currentTab = mTabsManager.getCurrentTab(); final LightningView currentTab = mTabsManager.getCurrentTab();
if (mPreferences.getClearCacheExit() && currentTab != null && !isIncognito()) { if (mPreferences.getClearCacheExit() && currentTab != null && !isIncognito()) {
WebUtils.clearCache(currentTab.getWebView()); WebUtils.clearCache(currentTab.getWebView());

1
app/src/main/java/acr/browser/lightning/activity/IncognitoActivity.java

@ -58,6 +58,7 @@ public class IncognitoActivity extends BrowserActivity {
@Override @Override
public void closeActivity() { public void closeActivity() {
closeDrawers(); closeDrawers();
performExitCleanUp();
finish(); finish();
} }
} }

1
app/src/main/java/acr/browser/lightning/activity/MainActivity.java

@ -59,6 +59,7 @@ public class MainActivity extends BrowserActivity {
@Override @Override
public void closeActivity() { public void closeActivity() {
closeDrawers(); closeDrawers();
performExitCleanUp();
moveTaskToBack(true); moveTaskToBack(true);
} }

Loading…
Cancel
Save