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

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

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

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

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

Loading…
Cancel
Save