|
|
|
@ -422,12 +422,6 @@ public class BrowserActivity extends Activity implements BrowserController {
@@ -422,12 +422,6 @@ public class BrowserActivity extends Activity implements BrowserController {
|
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
public void onDrawerSlide(View drawerView, float slideOffset) { |
|
|
|
|
super.onDrawerSlide(drawerView, slideOffset); |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
mNewTab.setOnClickListener(new OnClickListener() { |
|
|
|
@ -456,18 +450,15 @@ public class BrowserActivity extends Activity implements BrowserController {
@@ -456,18 +450,15 @@ public class BrowserActivity extends Activity implements BrowserController {
|
|
|
|
|
else |
|
|
|
|
checkForTor(); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/* |
|
|
|
|
* If Orbot/Tor is installed, prompt the user if they want to enable proxying for this session |
|
|
|
|
*/ |
|
|
|
|
public boolean checkForTor () |
|
|
|
|
{ |
|
|
|
|
public boolean checkForTor () { |
|
|
|
|
|
|
|
|
|
OrbotHelper oh = new OrbotHelper(this); |
|
|
|
|
if (oh.isOrbotInstalled()) |
|
|
|
|
{ |
|
|
|
|
if (oh.isOrbotInstalled()) { |
|
|
|
|
DialogInterface.OnClickListener dialogClickListener = new DialogInterface.OnClickListener() { |
|
|
|
|
@Override |
|
|
|
|
public void onClick(DialogInterface dialog, int which) { |
|
|
|
@ -501,8 +492,7 @@ public class BrowserActivity extends Activity implements BrowserController {
@@ -501,8 +492,7 @@ public class BrowserActivity extends Activity implements BrowserController {
|
|
|
|
|
/* |
|
|
|
|
* Initialize WebKit Proxying for Tor |
|
|
|
|
*/ |
|
|
|
|
public void initializeTor () |
|
|
|
|
{ |
|
|
|
|
public void initializeTor() { |
|
|
|
|
|
|
|
|
|
OrbotHelper oh = new OrbotHelper(this); |
|
|
|
|
if (!oh.isOrbotRunning()) |
|
|
|
@ -539,7 +529,7 @@ public class BrowserActivity extends Activity implements BrowserController {
@@ -539,7 +529,7 @@ public class BrowserActivity extends Activity implements BrowserController {
|
|
|
|
|
String mem = mPreferences.getString(PreferenceConstants.URL_MEMORY, |
|
|
|
|
""); |
|
|
|
|
mEditPrefs.putString(PreferenceConstants.URL_MEMORY, ""); |
|
|
|
|
String[] array = getArray(mem); |
|
|
|
|
String[] array = Utils.getArray(mem); |
|
|
|
|
int count = 0; |
|
|
|
|
for (int n = 0; n < array.length; n++) { |
|
|
|
|
if (array[n].length() > 0) { |
|
|
|
@ -558,10 +548,6 @@ public class BrowserActivity extends Activity implements BrowserController {
@@ -558,10 +548,6 @@ public class BrowserActivity extends Activity implements BrowserController {
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
public static String[] getArray(String input) { |
|
|
|
|
return input.split("\\|\\$\\|SEPARATOR\\|\\$\\|"); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
public void initializePreferences() { |
|
|
|
|
if (mPreferences == null) { |
|
|
|
|
mPreferences = getSharedPreferences( |
|
|
|
@ -640,15 +626,6 @@ public class BrowserActivity extends Activity implements BrowserController {
@@ -640,15 +626,6 @@ public class BrowserActivity extends Activity implements BrowserController {
|
|
|
|
|
return super.onCreateOptionsMenu(menu); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/* Called whenever we call invalidateOptionsMenu() */ |
|
|
|
|
@Override |
|
|
|
|
public boolean onPrepareOptionsMenu(Menu menu) { |
|
|
|
|
// If the nav drawer is open, hide action items related to the content
|
|
|
|
|
// view
|
|
|
|
|
|
|
|
|
|
return super.onPrepareOptionsMenu(menu); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
public boolean onOptionsItemSelected(MenuItem item) { |
|
|
|
|
// The action bar home/up action should open or close the drawer.
|
|
|
|
@ -1190,30 +1167,6 @@ public class BrowserActivity extends Activity implements BrowserController {
@@ -1190,30 +1167,6 @@ public class BrowserActivity extends Activity implements BrowserController {
|
|
|
|
|
super.onDestroy(); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
protected void onPostResume() { |
|
|
|
|
Log.i("Lightning", "onPostResume"); |
|
|
|
|
super.onPostResume(); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
protected void onRestart() { |
|
|
|
|
Log.i("Lightning", "onRestart"); |
|
|
|
|
super.onRestart(); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
protected void onStart() { |
|
|
|
|
Log.i("Lightning", "onStart"); |
|
|
|
|
super.onStart(); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
protected void onStop() { |
|
|
|
|
Log.i("Lightning", "onStop"); |
|
|
|
|
super.onStop(); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
protected void onResume() { |
|
|
|
|
super.onResume(); |
|
|
|
|