Removed unnecessary code
This commit is contained in:
parent
c7b3f794ab
commit
617e134e83
@ -531,14 +531,6 @@ public class BrowserActivity extends Activity implements BrowserController {
|
|||||||
public synchronized void initializeTabs() {
|
public synchronized void initializeTabs() {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setIsIncognito(boolean letsAsk){
|
|
||||||
isIncognito = letsAsk;
|
|
||||||
}
|
|
||||||
|
|
||||||
public boolean isThisIncognito(){
|
|
||||||
return isIncognito;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void restoreOrNewTab() {
|
public void restoreOrNewTab() {
|
||||||
mIdGenerator = 0;
|
mIdGenerator = 0;
|
||||||
@ -1095,19 +1087,19 @@ public class BrowserActivity extends Activity implements BrowserController {
|
|||||||
mWebViews.remove(position);
|
mWebViews.remove(position);
|
||||||
if (mPreferences.getBoolean(
|
if (mPreferences.getBoolean(
|
||||||
PreferenceConstants.CLEAR_CACHE_EXIT, false)
|
PreferenceConstants.CLEAR_CACHE_EXIT, false)
|
||||||
&& mCurrentView != null && !isThisIncognito()) {
|
&& mCurrentView != null && !isIncognito()) {
|
||||||
mCurrentView.clearCache(true);
|
mCurrentView.clearCache(true);
|
||||||
Log.i(Constants.LOGTAG, "Cache Cleared");
|
Log.i(Constants.LOGTAG, "Cache Cleared");
|
||||||
|
|
||||||
}
|
}
|
||||||
if (mPreferences.getBoolean(PreferenceConstants.CLEAR_HISTORY_EXIT,
|
if (mPreferences.getBoolean(PreferenceConstants.CLEAR_HISTORY_EXIT,
|
||||||
false) && !isThisIncognito()) {
|
false) && !isIncognito()) {
|
||||||
clearHistory();
|
clearHistory();
|
||||||
Log.i(Constants.LOGTAG, "History Cleared");
|
Log.i(Constants.LOGTAG, "History Cleared");
|
||||||
|
|
||||||
}
|
}
|
||||||
if (mPreferences.getBoolean(PreferenceConstants.CLEAR_COOKIES_EXIT,
|
if (mPreferences.getBoolean(PreferenceConstants.CLEAR_COOKIES_EXIT,
|
||||||
false) && !isThisIncognito()) {
|
false) && !isIncognito()) {
|
||||||
clearCookies();
|
clearCookies();
|
||||||
Log.i(Constants.LOGTAG, "Cookies Cleared");
|
Log.i(Constants.LOGTAG, "Cookies Cleared");
|
||||||
|
|
||||||
@ -1138,19 +1130,19 @@ public class BrowserActivity extends Activity implements BrowserController {
|
|||||||
public boolean onKeyLongPress(int keyCode, KeyEvent event) {
|
public boolean onKeyLongPress(int keyCode, KeyEvent event) {
|
||||||
if (keyCode == KeyEvent.KEYCODE_BACK) {
|
if (keyCode == KeyEvent.KEYCODE_BACK) {
|
||||||
if (mPreferences.getBoolean(PreferenceConstants.CLEAR_CACHE_EXIT,
|
if (mPreferences.getBoolean(PreferenceConstants.CLEAR_CACHE_EXIT,
|
||||||
false) && mCurrentView != null && !isThisIncognito()) {
|
false) && mCurrentView != null && !isIncognito()) {
|
||||||
mCurrentView.clearCache(true);
|
mCurrentView.clearCache(true);
|
||||||
Log.i(Constants.LOGTAG, "Cache Cleared");
|
Log.i(Constants.LOGTAG, "Cache Cleared");
|
||||||
|
|
||||||
}
|
}
|
||||||
if (mPreferences.getBoolean(PreferenceConstants.CLEAR_HISTORY_EXIT,
|
if (mPreferences.getBoolean(PreferenceConstants.CLEAR_HISTORY_EXIT,
|
||||||
false) && !isThisIncognito()) {
|
false) && !isIncognito()) {
|
||||||
clearHistory();
|
clearHistory();
|
||||||
Log.i(Constants.LOGTAG, "History Cleared");
|
Log.i(Constants.LOGTAG, "History Cleared");
|
||||||
|
|
||||||
}
|
}
|
||||||
if (mPreferences.getBoolean(PreferenceConstants.CLEAR_COOKIES_EXIT,
|
if (mPreferences.getBoolean(PreferenceConstants.CLEAR_COOKIES_EXIT,
|
||||||
false) && !isThisIncognito()) {
|
false) && !isIncognito()) {
|
||||||
clearCookies();
|
clearCookies();
|
||||||
Log.i(Constants.LOGTAG, "Cookies Cleared");
|
Log.i(Constants.LOGTAG, "Cookies Cleared");
|
||||||
|
|
||||||
|
@ -16,7 +16,6 @@ public class IncognitoActivity extends BrowserActivity {
|
|||||||
protected void onCreate(Bundle savedInstanceState) {
|
protected void onCreate(Bundle savedInstanceState) {
|
||||||
super.onCreate(savedInstanceState);
|
super.onCreate(savedInstanceState);
|
||||||
mPreferences = getSharedPreferences(PreferenceConstants.PREFERENCES, 0);
|
mPreferences = getSharedPreferences(PreferenceConstants.PREFERENCES, 0);
|
||||||
super.setIsIncognito(true);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -16,7 +16,6 @@ public class MainActivity extends BrowserActivity {
|
|||||||
protected void onCreate(Bundle savedInstanceState) {
|
protected void onCreate(Bundle savedInstanceState) {
|
||||||
super.onCreate(savedInstanceState);
|
super.onCreate(savedInstanceState);
|
||||||
mPreferences = getSharedPreferences(PreferenceConstants.PREFERENCES, 0);
|
mPreferences = getSharedPreferences(PreferenceConstants.PREFERENCES, 0);
|
||||||
super.setIsIncognito(false);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
Loading…
x
Reference in New Issue
Block a user