Moved proxy code to utility class, remove proxy from lite version to reduce apk size

This commit is contained in:
Anthony Restaino 2015-06-05 00:03:02 -04:00
parent 9dc9634299
commit d8b8d2c047
21 changed files with 782 additions and 669 deletions

View File

@ -8,7 +8,7 @@
</facet> </facet>
<facet type="android" name="Android"> <facet type="android" name="Android">
<configuration> <configuration>
<option name="SELECTED_BUILD_VARIANT" value="LightningPlusDebug" /> <option name="SELECTED_BUILD_VARIANT" value="lightningPlusDebug" />
<option name="SELECTED_TEST_ARTIFACT" value="_android_test_" /> <option name="SELECTED_TEST_ARTIFACT" value="_android_test_" />
<option name="ASSEMBLE_TASK_NAME" value="assembleLightningPlusDebug" /> <option name="ASSEMBLE_TASK_NAME" value="assembleLightningPlusDebug" />
<option name="COMPILE_JAVA_TASK_NAME" value="compileLightningPlusDebugSources" /> <option name="COMPILE_JAVA_TASK_NAME" value="compileLightningPlusDebugSources" />
@ -25,34 +25,34 @@
</facet> </facet>
</component> </component>
<component name="NewModuleRootManager" inherit-compiler-output="false"> <component name="NewModuleRootManager" inherit-compiler-output="false">
<output url="file://$MODULE_DIR$/build/intermediates/classes/LightningPlus/debug" /> <output url="file://$MODULE_DIR$/build/intermediates/classes/lightningPlus/debug" />
<output-test url="file://$MODULE_DIR$/build/intermediates/classes/androidTest/LightningPlus/debug" /> <output-test url="file://$MODULE_DIR$/build/intermediates/classes/androidTest/lightningPlus/debug" />
<exclude-output /> <exclude-output />
<content url="file://$MODULE_DIR$"> <content url="file://$MODULE_DIR$">
<sourceFolder url="file://$MODULE_DIR$/build/generated/source/r/LightningPlus/debug" isTestSource="false" generated="true" /> <sourceFolder url="file://$MODULE_DIR$/build/generated/source/r/lightningPlus/debug" isTestSource="false" generated="true" />
<sourceFolder url="file://$MODULE_DIR$/build/generated/source/aidl/LightningPlus/debug" isTestSource="false" generated="true" /> <sourceFolder url="file://$MODULE_DIR$/build/generated/source/aidl/lightningPlus/debug" isTestSource="false" generated="true" />
<sourceFolder url="file://$MODULE_DIR$/build/generated/source/buildConfig/LightningPlus/debug" isTestSource="false" generated="true" /> <sourceFolder url="file://$MODULE_DIR$/build/generated/source/buildConfig/lightningPlus/debug" isTestSource="false" generated="true" />
<sourceFolder url="file://$MODULE_DIR$/build/generated/source/rs/LightningPlus/debug" isTestSource="false" generated="true" /> <sourceFolder url="file://$MODULE_DIR$/build/generated/source/rs/lightningPlus/debug" isTestSource="false" generated="true" />
<sourceFolder url="file://$MODULE_DIR$/build/generated/res/rs/LightningPlus/debug" type="java-resource" /> <sourceFolder url="file://$MODULE_DIR$/build/generated/res/rs/lightningPlus/debug" type="java-resource" />
<sourceFolder url="file://$MODULE_DIR$/build/generated/res/generated/LightningPlus/debug" type="java-resource" /> <sourceFolder url="file://$MODULE_DIR$/build/generated/res/generated/lightningPlus/debug" type="java-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/LightningPlusDebug/res" type="java-resource" /> <sourceFolder url="file://$MODULE_DIR$/src/lightningPlusDebug/res" type="java-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/LightningPlusDebug/resources" type="java-resource" /> <sourceFolder url="file://$MODULE_DIR$/src/lightningPlusDebug/resources" type="java-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/LightningPlusDebug/assets" type="java-resource" /> <sourceFolder url="file://$MODULE_DIR$/src/lightningPlusDebug/assets" type="java-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/LightningPlusDebug/aidl" isTestSource="false" /> <sourceFolder url="file://$MODULE_DIR$/src/lightningPlusDebug/aidl" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/src/LightningPlusDebug/java" isTestSource="false" /> <sourceFolder url="file://$MODULE_DIR$/src/lightningPlusDebug/java" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/src/LightningPlusDebug/jni" isTestSource="false" /> <sourceFolder url="file://$MODULE_DIR$/src/lightningPlusDebug/jni" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/src/LightningPlusDebug/rs" isTestSource="false" /> <sourceFolder url="file://$MODULE_DIR$/src/lightningPlusDebug/rs" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/build/generated/source/r/androidTest/LightningPlus/debug" isTestSource="true" generated="true" /> <sourceFolder url="file://$MODULE_DIR$/build/generated/source/r/androidTest/lightningPlus/debug" isTestSource="true" generated="true" />
<sourceFolder url="file://$MODULE_DIR$/build/generated/source/aidl/androidTest/LightningPlus/debug" isTestSource="true" generated="true" /> <sourceFolder url="file://$MODULE_DIR$/build/generated/source/aidl/androidTest/lightningPlus/debug" isTestSource="true" generated="true" />
<sourceFolder url="file://$MODULE_DIR$/build/generated/source/buildConfig/androidTest/LightningPlus/debug" isTestSource="true" generated="true" /> <sourceFolder url="file://$MODULE_DIR$/build/generated/source/buildConfig/androidTest/lightningPlus/debug" isTestSource="true" generated="true" />
<sourceFolder url="file://$MODULE_DIR$/build/generated/source/rs/androidTest/LightningPlus/debug" isTestSource="true" generated="true" /> <sourceFolder url="file://$MODULE_DIR$/build/generated/source/rs/androidTest/lightningPlus/debug" isTestSource="true" generated="true" />
<sourceFolder url="file://$MODULE_DIR$/build/generated/res/rs/androidTest/LightningPlus/debug" type="java-test-resource" /> <sourceFolder url="file://$MODULE_DIR$/build/generated/res/rs/androidTest/lightningPlus/debug" type="java-test-resource" />
<sourceFolder url="file://$MODULE_DIR$/build/generated/res/generated/androidTest/LightningPlus/debug" type="java-test-resource" /> <sourceFolder url="file://$MODULE_DIR$/build/generated/res/generated/androidTest/lightningPlus/debug" type="java-test-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/LightningPlus/res" type="java-resource" /> <sourceFolder url="file://$MODULE_DIR$/src/LightningPlus/res" type="java-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/LightningPlus/resources" type="java-resource" /> <sourceFolder url="file://$MODULE_DIR$/src/LightningPlus/resources" type="java-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/LightningPlus/assets" type="java-resource" /> <sourceFolder url="file://$MODULE_DIR$/src/lightningPlus/assets" type="java-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/LightningPlus/aidl" isTestSource="false" /> <sourceFolder url="file://$MODULE_DIR$/src/LightningPlus/aidl" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/src/LightningPlus/java" isTestSource="false" /> <sourceFolder url="file://$MODULE_DIR$/src/lightningPlus/java" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/src/LightningPlus/jni" isTestSource="false" /> <sourceFolder url="file://$MODULE_DIR$/src/LightningPlus/jni" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/src/LightningPlus/rs" isTestSource="false" /> <sourceFolder url="file://$MODULE_DIR$/src/LightningPlus/rs" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/src/androidTestLightningPlus/res" type="java-test-resource" /> <sourceFolder url="file://$MODULE_DIR$/src/androidTestLightningPlus/res" type="java-test-resource" />
@ -93,6 +93,7 @@
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.android.support/appcompat-v7/22.2.0/jars" /> <excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.android.support/appcompat-v7/22.2.0/jars" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.android.support/palette-v7/22.2.0/jars" /> <excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.android.support/palette-v7/22.2.0/jars" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.android.support/support-v4/22.2.0/jars" /> <excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.android.support/support-v4/22.2.0/jars" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/net.i2p.android/client/0.7/jars" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/incremental" /> <excludeFolder url="file://$MODULE_DIR$/build/intermediates/incremental" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/jacoco" /> <excludeFolder url="file://$MODULE_DIR$/build/intermediates/jacoco" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/javaResources" /> <excludeFolder url="file://$MODULE_DIR$/build/intermediates/javaResources" />
@ -110,6 +111,7 @@
</content> </content>
<orderEntry type="jdk" jdkName="Android API 22 Platform" jdkType="Android SDK" /> <orderEntry type="jdk" jdkName="Android API 22 Platform" jdkType="Android SDK" />
<orderEntry type="sourceFolder" forTests="false" /> <orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="library" exported="" name="client-0.7" level="project" />
<orderEntry type="library" exported="" name="palette-v7-22.2.0" level="project" /> <orderEntry type="library" exported="" name="palette-v7-22.2.0" level="project" />
<orderEntry type="library" exported="" name="support-v4-22.2.0" level="project" /> <orderEntry type="library" exported="" name="support-v4-22.2.0" level="project" />
<orderEntry type="library" exported="" name="support-annotations-22.2.0" level="project" /> <orderEntry type="library" exported="" name="support-annotations-22.2.0" level="project" />

View File

@ -25,13 +25,13 @@ android {
} }
productFlavors { productFlavors {
LightningPlus { lightningPlus {
buildConfigField "boolean", "FULL_VERSION", "true" buildConfigField "boolean", "FULL_VERSION", "true"
applicationId "acr.browser.lightning" applicationId "acr.browser.lightning"
versionCode 78 versionCode 78
} }
LightningFree { lightningLite {
buildConfigField "boolean", "FULL_VERSION", "false" buildConfigField "boolean", "FULL_VERSION", "false"
applicationId "acr.browser.barebones" applicationId "acr.browser.barebones"
versionCode 81 versionCode 81
@ -44,13 +44,10 @@ android {
} }
dependencies { dependencies {
compile(project(':libnetcipher')) {
// Exclude any support-v4 modules because appcompat-v7 will import the latest
exclude module: 'support-v4'
exclude module: 'android-support-v4'
}
compile 'com.android.support:palette-v7:22.2.0' compile 'com.android.support:palette-v7:22.2.0'
compile 'com.android.support:appcompat-v7:22.2.0' compile 'com.android.support:appcompat-v7:22.2.0'
compile 'org.jsoup:jsoup:1.8.1' compile 'org.jsoup:jsoup:1.8.1'
compile 'net.i2p.android:client:0.7@aar'
lightningPlusCompile 'net.i2p.android:client:0.7'
lightningPlusCompile(project(':libnetcipher'))
} }

View File

@ -0,0 +1,219 @@
package acr.browser.lightning.utils;
import android.app.Activity;
import android.app.AlertDialog;
import android.content.Context;
import android.content.DialogInterface;
import android.util.Log;
import net.i2p.android.ui.I2PAndroidHelper;
import acr.browser.lightning.R;
import acr.browser.lightning.activity.BrowserApp;
import acr.browser.lightning.constant.Constants;
import acr.browser.lightning.preference.PreferenceManager;
import info.guardianproject.onionkit.ui.OrbotHelper;
import info.guardianproject.onionkit.web.WebkitProxy;
/**
* 6/4/2015 Anthony Restaino
*/
public class ProxyUtils {
// Helper
private static I2PAndroidHelper mI2PHelper;
private static boolean mI2PHelperBound;
private static boolean mI2PProxyInitialized;
private static PreferenceManager mPreferences;
private static ProxyUtils mInstance;
private ProxyUtils(Context context) {
mPreferences = PreferenceManager.getInstance();
mI2PHelper = new I2PAndroidHelper(context);
}
public static ProxyUtils getInstance(Context context) {
if (mInstance == null) {
mInstance = new ProxyUtils(context);
}
return mInstance;
}
/*
* If Orbot/Tor or I2P is installed, prompt the user if they want to enable
* proxying for this session
*/
public void checkForProxy(final Activity activity) {
boolean useProxy = mPreferences.getUseProxy();
OrbotHelper oh = new OrbotHelper(activity.getApplicationContext());
final boolean orbotInstalled = oh.isOrbotInstalled();
boolean orbotChecked = mPreferences.getCheckedForTor();
boolean orbot = orbotInstalled && !orbotChecked;
boolean i2pInstalled = mI2PHelper.isI2PAndroidInstalled();
boolean i2pChecked = mPreferences.getCheckedForI2P();
boolean i2p = i2pInstalled && !i2pChecked;
// TODO Is the idea to show this per-session, or only once?
if (!useProxy && (orbot || i2p)) {
if (orbot) mPreferences.setCheckedForTor(true);
if (i2p) mPreferences.setCheckedForI2P(true);
AlertDialog.Builder builder = new AlertDialog.Builder(activity);
if (orbotInstalled && i2pInstalled) {
String[] proxyChoices = activity.getResources().getStringArray(R.array.proxy_choices_array);
builder.setTitle(activity.getResources().getString(R.string.http_proxy))
.setSingleChoiceItems(proxyChoices, mPreferences.getProxyChoice(),
new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
mPreferences.setProxyChoice(which);
}
})
.setNeutralButton(activity.getResources().getString(R.string.action_ok),
new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
if (mPreferences.getUseProxy())
initializeProxy(activity);
}
});
} else {
DialogInterface.OnClickListener dialogClickListener = new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
switch (which) {
case DialogInterface.BUTTON_POSITIVE:
mPreferences.setProxyChoice(orbotInstalled ?
Constants.PROXY_ORBOT : Constants.PROXY_I2P);
initializeProxy(activity);
break;
case DialogInterface.BUTTON_NEGATIVE:
mPreferences.setProxyChoice(Constants.NO_PROXY);
break;
}
}
};
builder.setMessage(orbotInstalled ? R.string.use_tor_prompt : R.string.use_i2p_prompt)
.setPositiveButton(R.string.yes, dialogClickListener)
.setNegativeButton(R.string.no, dialogClickListener);
}
builder.show();
}
}
/*
* Initialize WebKit Proxying
*/
private void initializeProxy(Activity activity) {
String host;
int port;
switch (mPreferences.getProxyChoice()) {
case Constants.NO_PROXY:
// We shouldn't be here
return;
case Constants.PROXY_ORBOT:
OrbotHelper oh = new OrbotHelper(activity.getApplicationContext());
if (!oh.isOrbotRunning()) {
oh.requestOrbotStart(activity);
}
host = "localhost";
port = 8118;
break;
case Constants.PROXY_I2P:
mI2PProxyInitialized = true;
if (mI2PHelperBound && !mI2PHelper.isI2PAndroidRunning()) {
mI2PHelper.requestI2PAndroidStart(activity);
}
host = "localhost";
port = 4444;
break;
default:
host = mPreferences.getProxyHost();
port = mPreferences.getProxyPort();
}
try {
WebkitProxy.setProxy(BrowserApp.class.getName(), activity.getApplicationContext(),
host, port);
} catch (Exception e) {
Log.d(Constants.TAG, "error enabling web proxying", e);
}
}
public boolean isProxyReady(Context context) {
if (mPreferences.getProxyChoice() == Constants.PROXY_I2P) {
if (!mI2PHelper.isI2PAndroidRunning()) {
Utils.showToast(context, context.getString(R.string.i2p_not_running));
return false;
} else if (!mI2PHelper.areTunnelsActive()) {
Utils.showToast(context, context.getString(R.string.i2p_tunnels_not_ready));
return false;
}
}
return true;
}
public void updateProxySettings(Activity activity) {
if (mPreferences.getUseProxy()) {
initializeProxy(activity);
} else {
try {
WebkitProxy.resetProxy(BrowserApp.class.getName(),
activity.getApplicationContext());
} catch (Exception e) {
e.printStackTrace();
}
mI2PProxyInitialized = false;
}
}
public void onStop() {
mI2PHelper.unbind();
mI2PHelperBound = false;
}
public void onStart(final Activity activity) {
if (mPreferences.getProxyChoice() == Constants.PROXY_I2P) {
// Try to bind to I2P Android
mI2PHelper.bind(new I2PAndroidHelper.Callback() {
@Override
public void onI2PAndroidBound() {
mI2PHelperBound = true;
if (mI2PProxyInitialized && !mI2PHelper.isI2PAndroidRunning())
mI2PHelper.requestI2PAndroidStart(activity);
}
});
}
}
public int setProxyChoice(int choice, Activity activity) {
switch (choice) {
case Constants.PROXY_ORBOT:
OrbotHelper oh = new OrbotHelper(activity.getApplicationContext());
if (!oh.isOrbotInstalled()) {
choice = Constants.NO_PROXY;
Utils.showToast(activity, activity.getResources().getString(R.string.install_orbot));
}
break;
case Constants.PROXY_I2P:
I2PAndroidHelper ih = new I2PAndroidHelper(activity.getApplicationContext());
if (!ih.isI2PAndroidInstalled()) {
choice = Constants.NO_PROXY;
ih.promptToInstall(activity);
}
break;
case Constants.PROXY_MANUAL:
break;
}
return choice;
}
}

View File

@ -0,0 +1,58 @@
package acr.browser.lightning.utils;
import android.app.Activity;
import android.content.Context;
/**
* 6/4/2015 Anthony Restaino
*/
public class ProxyUtils {
private static ProxyUtils mInstance;
private ProxyUtils(Context context) {
}
public static ProxyUtils getInstance(Context context) {
if (mInstance == null) {
mInstance = new ProxyUtils(context);
}
return mInstance;
}
/*
* If Orbot/Tor or I2P is installed, prompt the user if they want to enable
* proxying for this session
*/
public void checkForProxy(final Activity activity) {
}
/*
* Initialize WebKit Proxying
*/
private void initializeProxy(Activity activity) {
}
public boolean isProxyReady(Context context) {
return true;
}
public void updateProxySettings(Activity activity) {
}
public void onStop() {
}
public void onStart(final Activity activity) {
}
public int setProxyChoice(int choice, Activity activity) {
return choice;
}
}

View File

@ -92,8 +92,6 @@ import android.widget.TextView.OnEditorActionListener;
import android.widget.Toast; import android.widget.Toast;
import android.widget.VideoView; import android.widget.VideoView;
import net.i2p.android.ui.I2PAndroidHelper;
import java.io.File; import java.io.File;
import java.io.FileOutputStream; import java.io.FileOutputStream;
import java.io.FileWriter; import java.io.FileWriter;
@ -124,11 +122,10 @@ import acr.browser.lightning.object.ClickHandler;
import acr.browser.lightning.object.DrawerArrowDrawable; import acr.browser.lightning.object.DrawerArrowDrawable;
import acr.browser.lightning.object.SearchAdapter; import acr.browser.lightning.object.SearchAdapter;
import acr.browser.lightning.preference.PreferenceManager; import acr.browser.lightning.preference.PreferenceManager;
import acr.browser.lightning.utils.ProxyUtils;
import acr.browser.lightning.utils.Utils; import acr.browser.lightning.utils.Utils;
import acr.browser.lightning.view.AnimatedProgressBar; import acr.browser.lightning.view.AnimatedProgressBar;
import acr.browser.lightning.view.LightningView; import acr.browser.lightning.view.LightningView;
import info.guardianproject.onionkit.ui.OrbotHelper;
import info.guardianproject.onionkit.web.WebkitProxy;
public class BrowserActivity extends ThemableActivity implements BrowserController, OnClickListener { public class BrowserActivity extends ThemableActivity implements BrowserController, OnClickListener {
@ -165,7 +162,7 @@ public class BrowserActivity extends ThemableActivity implements BrowserControll
// Context // Context
private Activity mActivity; private Activity mActivity;
// Native // Primatives
private boolean mSystemBrowser = false, mIsNewIntent = false, mFullScreen, mColorMode, private boolean mSystemBrowser = false, mIsNewIntent = false, mFullScreen, mColorMode,
mDarkTheme; mDarkTheme;
private int mOriginalOrientation, mBackgroundColor, mIdGenerator; private int mOriginalOrientation, mBackgroundColor, mIdGenerator;
@ -182,10 +179,8 @@ public class BrowserActivity extends ThemableActivity implements BrowserControll
private Drawable mDeleteIcon, mRefreshIcon, mCopyIcon, mIcon; private Drawable mDeleteIcon, mRefreshIcon, mCopyIcon, mIcon;
private DrawerArrowDrawable mArrowDrawable; private DrawerArrowDrawable mArrowDrawable;
// Helper // Proxy
private I2PAndroidHelper mI2PHelper; private ProxyUtils mProxyUtils;
private boolean mI2PHelperBound;
private boolean mI2PProxyInitialized;
// Constant // Constant
private static final int API = android.os.Build.VERSION.SDK_INT; private static final int API = android.os.Build.VERSION.SDK_INT;
@ -269,7 +264,7 @@ public class BrowserActivity extends ThemableActivity implements BrowserControll
R.id.arrow_button); R.id.arrow_button);
arrowButton.setOnClickListener(this); arrowButton.setOnClickListener(this);
mI2PHelper = new I2PAndroidHelper(this); mProxyUtils = ProxyUtils.getInstance(this);
RelativeLayout back = (RelativeLayout) findViewById(R.id.action_back); RelativeLayout back = (RelativeLayout) findViewById(R.id.action_back);
back.setOnClickListener(this); back.setOnClickListener(this);
@ -354,7 +349,7 @@ public class BrowserActivity extends ThemableActivity implements BrowserControll
WebIconDatabase.getInstance().open(getDir("icons", MODE_PRIVATE).getPath()); WebIconDatabase.getInstance().open(getDir("icons", MODE_PRIVATE).getPath());
} }
checkForProxy(); mProxyUtils.checkForProxy(this);
} }
private class SearchClass { private class SearchClass {
@ -543,129 +538,6 @@ public class BrowserActivity extends ThemableActivity implements BrowserControll
} }
/*
* If Orbot/Tor or I2P is installed, prompt the user if they want to enable
* proxying for this session
*/
private void checkForProxy() {
boolean useProxy = mPreferences.getUseProxy();
OrbotHelper oh = new OrbotHelper(this);
final boolean orbotInstalled = oh.isOrbotInstalled();
boolean orbotChecked = mPreferences.getCheckedForTor();
boolean orbot = orbotInstalled && !orbotChecked;
boolean i2pInstalled = mI2PHelper.isI2PAndroidInstalled();
boolean i2pChecked = mPreferences.getCheckedForI2P();
boolean i2p = i2pInstalled && !i2pChecked;
// TODO Is the idea to show this per-session, or only once?
if (!useProxy && (orbot || i2p)) {
if (orbot) mPreferences.setCheckedForTor(true);
if (i2p) mPreferences.setCheckedForI2P(true);
AlertDialog.Builder builder = new AlertDialog.Builder(this);
if (orbotInstalled && i2pInstalled) {
String[] proxyChoices = this.getResources().getStringArray(R.array.proxy_choices_array);
builder.setTitle(getResources().getString(R.string.http_proxy))
.setSingleChoiceItems(proxyChoices, mPreferences.getProxyChoice(),
new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
mPreferences.setProxyChoice(which);
}
})
.setNeutralButton(getResources().getString(R.string.action_ok),
new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
if (mPreferences.getUseProxy())
initializeProxy();
}
});
} else {
DialogInterface.OnClickListener dialogClickListener = new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
switch (which) {
case DialogInterface.BUTTON_POSITIVE:
mPreferences.setProxyChoice(orbotInstalled ?
Constants.PROXY_ORBOT : Constants.PROXY_I2P);
initializeProxy();
break;
case DialogInterface.BUTTON_NEGATIVE:
mPreferences.setProxyChoice(Constants.NO_PROXY);
break;
}
}
};
builder.setMessage(orbotInstalled ? R.string.use_tor_prompt : R.string.use_i2p_prompt)
.setPositiveButton(R.string.yes, dialogClickListener)
.setNegativeButton(R.string.no, dialogClickListener);
}
builder.show();
}
}
/*
* Initialize WebKit Proxying
*/
private void initializeProxy() {
String host;
int port;
switch (mPreferences.getProxyChoice()) {
case Constants.NO_PROXY:
// We shouldn't be here
return;
case Constants.PROXY_ORBOT:
OrbotHelper oh = new OrbotHelper(this);
if (!oh.isOrbotRunning()) {
oh.requestOrbotStart(this);
}
host = "localhost";
port = 8118;
break;
case Constants.PROXY_I2P:
mI2PProxyInitialized = true;
if (mI2PHelperBound && !mI2PHelper.isI2PAndroidRunning()) {
mI2PHelper.requestI2PAndroidStart(this);
}
host = "localhost";
port = 4444;
break;
default:
host = mPreferences.getProxyHost();
port = mPreferences.getProxyPort();
}
try {
WebkitProxy.setProxy(BrowserApp.class.getName(), getApplicationContext(),
host, port);
} catch (Exception e) {
Log.d(Constants.TAG, "error enabling web proxying", e);
}
}
public boolean isProxyReady() {
if (mPreferences.getProxyChoice() == Constants.PROXY_I2P) {
if (!mI2PHelper.isI2PAndroidRunning()) {
Utils.showToast(this, getString(R.string.i2p_not_running));
return false;
} else if (!mI2PHelper.areTunnelsActive()) {
Utils.showToast(this, getString(R.string.i2p_tunnels_not_ready));
return false;
}
}
return true;
}
private boolean isTablet() { private boolean isTablet() {
return (getResources().getConfiguration().screenLayout & Configuration.SCREENLAYOUT_SIZE_MASK) == Configuration.SCREENLAYOUT_SIZE_XLARGE; return (getResources().getConfiguration().screenLayout & Configuration.SCREENLAYOUT_SIZE_MASK) == Configuration.SCREENLAYOUT_SIZE_XLARGE;
} }
@ -817,17 +689,7 @@ public class BrowserActivity extends ThemableActivity implements BrowserControll
} }
updateCookiePreference(); updateCookiePreference();
if (mPreferences.getUseProxy()) { mProxyUtils.updateProxySettings(this);
initializeProxy();
} else {
try {
WebkitProxy.resetProxy(BrowserApp.class.getName(),
getApplicationContext());
} catch (Exception e) {
e.printStackTrace();
}
mI2PProxyInitialized = false;
}
} }
/* /*
@ -1487,8 +1349,7 @@ public class BrowserActivity extends ThemableActivity implements BrowserControll
@Override @Override
protected void onStop() { protected void onStop() {
super.onStop(); super.onStop();
mI2PHelper.unbind(); mProxyUtils.onStop();
mI2PHelperBound = false;
} }
@Override @Override
@ -1503,17 +1364,7 @@ public class BrowserActivity extends ThemableActivity implements BrowserControll
@Override @Override
protected void onStart() { protected void onStart() {
super.onStart(); super.onStart();
if (mPreferences.getProxyChoice() == Constants.PROXY_I2P) { mProxyUtils.onStart(this);
// Try to bind to I2P Android
mI2PHelper.bind(new I2PAndroidHelper.Callback() {
@Override
public void onI2PAndroidBound() {
mI2PHelperBound = true;
if (mI2PProxyInitialized && !mI2PHelper.isI2PAndroidRunning())
mI2PHelper.requestI2PAndroidStart(BrowserActivity.this);
}
});
}
} }
@Override @Override
@ -2025,6 +1876,11 @@ public class BrowserActivity extends ThemableActivity implements BrowserControll
return false; return false;
} }
@Override
public boolean isProxyReady() {
return mProxyUtils.isProxyReady(this);
}
/** /**
* function that opens the HTML history page in the browser * function that opens the HTML history page in the browser
*/ */

View File

@ -26,426 +26,418 @@ import android.widget.LinearLayout;
import android.widget.RelativeLayout; import android.widget.RelativeLayout;
import android.widget.TextView; import android.widget.TextView;
import net.i2p.android.ui.I2PAndroidHelper;
import acr.browser.lightning.R; import acr.browser.lightning.R;
import acr.browser.lightning.constant.Constants; import acr.browser.lightning.constant.Constants;
import acr.browser.lightning.preference.PreferenceManager; import acr.browser.lightning.preference.PreferenceManager;
import acr.browser.lightning.utils.ProxyUtils;
import acr.browser.lightning.utils.Utils; import acr.browser.lightning.utils.Utils;
import info.guardianproject.onionkit.ui.OrbotHelper;
public class SettingsActivity extends ThemableSettingsActivity { public class SettingsActivity extends ThemableSettingsActivity {
private static final int API = android.os.Build.VERSION.SDK_INT; private static final int API = android.os.Build.VERSION.SDK_INT;
private PreferenceManager mPreferences; private PreferenceManager mPreferences;
private Context mContext; private Context mContext;
private Activity mActivity; private Activity mActivity;
private CharSequence[] mProxyChoices; private CharSequence[] mProxyChoices;
private TextView mProxyChoiceName; private TextView mProxyChoiceName;
@Override @Override
protected void onCreate(Bundle savedInstanceState) { protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState); super.onCreate(savedInstanceState);
setContentView(R.layout.settings); setContentView(R.layout.settings);
mContext = this; mContext = this;
mActivity = this; mActivity = this;
init(); init();
} }
@Override @Override
public boolean onOptionsItemSelected(MenuItem item) { public boolean onOptionsItemSelected(MenuItem item) {
finish(); finish();
return true; return true;
} }
@SuppressLint("NewApi") @SuppressLint("NewApi")
private void init() { private void init() {
// set up ActionBar // set up ActionBar
Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar); Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);
setSupportActionBar(toolbar); setSupportActionBar(toolbar);
getSupportActionBar().setDisplayHomeAsUpEnabled(true); getSupportActionBar().setDisplayHomeAsUpEnabled(true);
// mPreferences storage // mPreferences storage
mPreferences = PreferenceManager.getInstance(); mPreferences = PreferenceManager.getInstance();
// initialize UI // initialize UI
RelativeLayout layoutFlash = (RelativeLayout) findViewById(R.id.layoutFlash); RelativeLayout layoutFlash = (RelativeLayout) findViewById(R.id.layoutFlash);
RelativeLayout layoutBlockAds = (RelativeLayout) findViewById(R.id.layoutAdBlock); RelativeLayout layoutBlockAds = (RelativeLayout) findViewById(R.id.layoutAdBlock);
layoutBlockAds.setEnabled(Constants.FULL_VERSION); layoutBlockAds.setEnabled(Constants.FULL_VERSION);
RelativeLayout layoutImages = (RelativeLayout) findViewById(R.id.layoutImages); RelativeLayout layoutImages = (RelativeLayout) findViewById(R.id.layoutImages);
RelativeLayout layoutEnableJS = (RelativeLayout) findViewById(R.id.layoutEnableJS); RelativeLayout layoutEnableJS = (RelativeLayout) findViewById(R.id.layoutEnableJS);
LinearLayout layoutProxyChoice = (LinearLayout) findViewById(R.id.layoutProxyChoice); LinearLayout layoutProxyChoice = (LinearLayout) findViewById(R.id.layoutProxyChoice);
RelativeLayout layoutColor = (RelativeLayout) findViewById(R.id.layoutColorMode); RelativeLayout layoutColor = (RelativeLayout) findViewById(R.id.layoutColorMode);
RelativeLayout layoutBookmarks = (RelativeLayout) findViewById(R.id.layoutBookmarks); RelativeLayout layoutBookmarks = (RelativeLayout) findViewById(R.id.layoutBookmarks);
layoutBookmarks.setOnClickListener(new OnClickListener() { layoutBookmarks.setOnClickListener(new OnClickListener() {
@Override @Override
public void onClick(View v) { public void onClick(View v) {
startActivity(new Intent(mContext, BookmarkActivity.class)); startActivity(new Intent(mContext, BookmarkActivity.class));
} }
}); });
if (API >= 19) { if (API >= 19) {
mPreferences.setFlashSupport(0); mPreferences.setFlashSupport(0);
} }
int flashNum = mPreferences.getFlashSupport(); int flashNum = mPreferences.getFlashSupport();
boolean imagesBool = mPreferences.getBlockImagesEnabled(); boolean imagesBool = mPreferences.getBlockImagesEnabled();
boolean enableJSBool = mPreferences.getJavaScriptEnabled(); boolean enableJSBool = mPreferences.getJavaScriptEnabled();
mProxyChoiceName = (TextView) findViewById(R.id.proxyChoiceName); mProxyChoiceName = (TextView) findViewById(R.id.proxyChoiceName);
mProxyChoices = this.getResources().getStringArray(R.array.proxy_choices_array); mProxyChoices = this.getResources().getStringArray(R.array.proxy_choices_array);
int choice = mPreferences.getProxyChoice(); int choice = mPreferences.getProxyChoice();
if (choice == Constants.PROXY_MANUAL) if (choice == Constants.PROXY_MANUAL)
mProxyChoiceName.setText(mPreferences.getProxyHost() + ":" + mPreferences.getProxyPort()); mProxyChoiceName.setText(mPreferences.getProxyHost() + ":" + mPreferences.getProxyPort());
else else
mProxyChoiceName.setText(mProxyChoices[choice]); mProxyChoiceName.setText(mProxyChoices[choice]);
CheckBox flash = (CheckBox) findViewById(R.id.cbFlash); CheckBox flash = (CheckBox) findViewById(R.id.cbFlash);
CheckBox adblock = (CheckBox) findViewById(R.id.cbAdblock); CheckBox adblock = (CheckBox) findViewById(R.id.cbAdblock);
adblock.setEnabled(Constants.FULL_VERSION); adblock.setEnabled(Constants.FULL_VERSION);
CheckBox images = (CheckBox) findViewById(R.id.cbImageBlock); CheckBox images = (CheckBox) findViewById(R.id.cbImageBlock);
CheckBox enablejs = (CheckBox) findViewById(R.id.cbJavascript); CheckBox enablejs = (CheckBox) findViewById(R.id.cbJavascript);
CheckBox color = (CheckBox) findViewById(R.id.cbColorMode); CheckBox color = (CheckBox) findViewById(R.id.cbColorMode);
images.setChecked(imagesBool); images.setChecked(imagesBool);
enablejs.setChecked(enableJSBool); enablejs.setChecked(enableJSBool);
if (flashNum > 0) { if (flashNum > 0) {
flash.setChecked(true); flash.setChecked(true);
} else { } else {
flash.setChecked(false); flash.setChecked(false);
} }
adblock.setChecked(mPreferences.getAdBlockEnabled()); adblock.setChecked(mPreferences.getAdBlockEnabled());
color.setChecked(mPreferences.getColorModeEnabled()); color.setChecked(mPreferences.getColorModeEnabled());
initCheckBox(flash, adblock, images, enablejs, color); initCheckBox(flash, adblock, images, enablejs, color);
clickListenerForCheckBoxes(layoutFlash, layoutBlockAds, layoutImages, layoutEnableJS, clickListenerForCheckBoxes(layoutFlash, layoutBlockAds, layoutImages, layoutEnableJS,
layoutProxyChoice, layoutColor, flash, adblock, images, enablejs, color); layoutProxyChoice, layoutColor, flash, adblock, images, enablejs, color);
RelativeLayout general = (RelativeLayout) findViewById(R.id.layoutGeneral); RelativeLayout general = (RelativeLayout) findViewById(R.id.layoutGeneral);
RelativeLayout display = (RelativeLayout) findViewById(R.id.layoutDisplay); RelativeLayout display = (RelativeLayout) findViewById(R.id.layoutDisplay);
RelativeLayout privacy = (RelativeLayout) findViewById(R.id.layoutPrivacy); RelativeLayout privacy = (RelativeLayout) findViewById(R.id.layoutPrivacy);
RelativeLayout advanced = (RelativeLayout) findViewById(R.id.layoutAdvanced); RelativeLayout advanced = (RelativeLayout) findViewById(R.id.layoutAdvanced);
RelativeLayout about = (RelativeLayout) findViewById(R.id.layoutAbout); RelativeLayout about = (RelativeLayout) findViewById(R.id.layoutAbout);
general(general); general(general);
display(display); display(display);
privacy(privacy); privacy(privacy);
advanced(advanced); advanced(advanced);
about(about); about(about);
} }
public void clickListenerForCheckBoxes(RelativeLayout layoutFlash, public void clickListenerForCheckBoxes(RelativeLayout layoutFlash,
RelativeLayout layoutBlockAds, RelativeLayout layoutImages, RelativeLayout layoutBlockAds, RelativeLayout layoutImages,
RelativeLayout layoutEnableJS, LinearLayout layoutProxyChoice, RelativeLayout layoutColor, RelativeLayout layoutEnableJS, LinearLayout layoutProxyChoice, RelativeLayout layoutColor,
final CheckBox flash, final CheckBox adblock, final CheckBox images, final CheckBox flash, final CheckBox adblock, final CheckBox images,
final CheckBox enablejs, final CheckBox color) { final CheckBox enablejs, final CheckBox color) {
layoutFlash.setOnClickListener(new OnClickListener() { layoutFlash.setOnClickListener(new OnClickListener() {
@Override @Override
public void onClick(View v) { public void onClick(View v) {
if (API < 19) { if (API < 19) {
flash.setChecked(!flash.isChecked()); flash.setChecked(!flash.isChecked());
} else { } else {
Utils.createInformativeDialog(mContext, Utils.createInformativeDialog(mContext,
getResources().getString(R.string.title_warning), getResources() getResources().getString(R.string.title_warning), getResources()
.getString(R.string.dialog_adobe_dead)); .getString(R.string.dialog_adobe_dead));
} }
} }
}); });
layoutBlockAds.setOnClickListener(new OnClickListener() { layoutBlockAds.setOnClickListener(new OnClickListener() {
@Override @Override
public void onClick(View v) { public void onClick(View v) {
adblock.setChecked(!adblock.isChecked()); adblock.setChecked(!adblock.isChecked());
} }
}); });
layoutImages.setOnClickListener(new OnClickListener() { layoutImages.setOnClickListener(new OnClickListener() {
@Override @Override
public void onClick(View v) { public void onClick(View v) {
images.setChecked(!images.isChecked()); images.setChecked(!images.isChecked());
} }
}); });
layoutEnableJS.setOnClickListener(new OnClickListener() { layoutEnableJS.setOnClickListener(new OnClickListener() {
@Override @Override
public void onClick(View v) { public void onClick(View v) {
enablejs.setChecked(!enablejs.isChecked()); enablejs.setChecked(!enablejs.isChecked());
} }
}); });
layoutProxyChoice.setOnClickListener(new OnClickListener() { if (Constants.FULL_VERSION == false) {
layoutProxyChoice.setEnabled(false);
@Override }
public void onClick(View view) { layoutProxyChoice.setOnClickListener(new OnClickListener() {
proxyChoicePicker();
} @Override
}); public void onClick(View view) {
layoutColor.setOnClickListener(new OnClickListener() { proxyChoicePicker();
}
@Override });
public void onClick(View v) { layoutColor.setOnClickListener(new OnClickListener() {
color.setChecked(!color.isChecked());
} @Override
public void onClick(View v) {
}); color.setChecked(!color.isChecked());
} }
public void initCheckBox(CheckBox flash, CheckBox adblock, CheckBox images, CheckBox enablejs, });
CheckBox color) { }
flash.setEnabled(API < 19);
flash.setOnCheckedChangeListener(new OnCheckedChangeListener() { public void initCheckBox(CheckBox flash, CheckBox adblock, CheckBox images, CheckBox enablejs,
CheckBox color) {
@Override flash.setEnabled(API < 19);
public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) { flash.setOnCheckedChangeListener(new OnCheckedChangeListener() {
if (isChecked) {
getFlashChoice(); @Override
} else { public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
mPreferences.setFlashSupport(0); if (isChecked) {
} getFlashChoice();
} else {
boolean flashInstalled = false; mPreferences.setFlashSupport(0);
try { }
PackageManager pm = getPackageManager();
ApplicationInfo ai = pm.getApplicationInfo("com.adobe.flashplayer", 0); boolean flashInstalled = false;
if (ai != null) { try {
flashInstalled = true; PackageManager pm = getPackageManager();
} ApplicationInfo ai = pm.getApplicationInfo("com.adobe.flashplayer", 0);
} catch (NameNotFoundException e) { if (ai != null) {
flashInstalled = false; flashInstalled = true;
} }
if (!flashInstalled && isChecked) { } catch (NameNotFoundException e) {
Utils.createInformativeDialog(SettingsActivity.this, flashInstalled = false;
getResources().getString(R.string.title_warning), getResources() }
.getString(R.string.dialog_adobe_not_installed)); if (!flashInstalled && isChecked) {
buttonView.setChecked(false); Utils.createInformativeDialog(SettingsActivity.this,
mPreferences.setFlashSupport(0); getResources().getString(R.string.title_warning), getResources()
.getString(R.string.dialog_adobe_not_installed));
} else if ((API >= 17) && isChecked) { buttonView.setChecked(false);
Utils.createInformativeDialog(SettingsActivity.this, mPreferences.setFlashSupport(0);
getResources().getString(R.string.title_warning), getResources()
.getString(R.string.dialog_adobe_unsupported)); } else if ((API >= 17) && isChecked) {
} Utils.createInformativeDialog(SettingsActivity.this,
} getResources().getString(R.string.title_warning), getResources()
.getString(R.string.dialog_adobe_unsupported));
}); }
adblock.setOnCheckedChangeListener(new OnCheckedChangeListener() { }
@Override });
public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) { adblock.setOnCheckedChangeListener(new OnCheckedChangeListener() {
mPreferences.setAdBlockEnabled(isChecked);
} @Override
public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
}); mPreferences.setAdBlockEnabled(isChecked);
images.setOnCheckedChangeListener(new OnCheckedChangeListener() { }
@Override });
public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) { images.setOnCheckedChangeListener(new OnCheckedChangeListener() {
mPreferences.setBlockImagesEnabled(isChecked);
@Override
} public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
mPreferences.setBlockImagesEnabled(isChecked);
});
enablejs.setOnCheckedChangeListener(new OnCheckedChangeListener() { }
@Override });
public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) { enablejs.setOnCheckedChangeListener(new OnCheckedChangeListener() {
mPreferences.setJavaScriptEnabled(isChecked);
} @Override
public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
}); mPreferences.setJavaScriptEnabled(isChecked);
}
color.setOnCheckedChangeListener(new OnCheckedChangeListener() {
});
@Override
public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) { color.setOnCheckedChangeListener(new OnCheckedChangeListener() {
mPreferences.setColorModeEnabled(isChecked);
@Override
} public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
mPreferences.setColorModeEnabled(isChecked);
});
} }
private void getFlashChoice() { });
AlertDialog.Builder builder = new AlertDialog.Builder(mActivity); }
builder.setTitle(mContext.getResources().getString(R.string.title_flash));
builder.setMessage(getResources().getString(R.string.flash)) private void getFlashChoice() {
.setCancelable(true) AlertDialog.Builder builder = new AlertDialog.Builder(mActivity);
.setPositiveButton(getResources().getString(R.string.action_manual), builder.setTitle(mContext.getResources().getString(R.string.title_flash));
new DialogInterface.OnClickListener() { builder.setMessage(getResources().getString(R.string.flash))
@Override .setCancelable(true)
public void onClick(DialogInterface dialog, int id) { .setPositiveButton(getResources().getString(R.string.action_manual),
mPreferences.setFlashSupport(1); new DialogInterface.OnClickListener() {
} @Override
}) public void onClick(DialogInterface dialog, int id) {
.setNegativeButton(getResources().getString(R.string.action_auto), mPreferences.setFlashSupport(1);
new DialogInterface.OnClickListener() { }
})
@Override .setNegativeButton(getResources().getString(R.string.action_auto),
public void onClick(DialogInterface dialog, int which) { new DialogInterface.OnClickListener() {
mPreferences.setFlashSupport(2);
} @Override
}).setOnCancelListener(new OnCancelListener() { public void onClick(DialogInterface dialog, int which) {
mPreferences.setFlashSupport(2);
@Override }
public void onCancel(DialogInterface dialog) { }).setOnCancelListener(new OnCancelListener() {
mPreferences.setFlashSupport(0);
} @Override
public void onCancel(DialogInterface dialog) {
}); mPreferences.setFlashSupport(0);
AlertDialog alert = builder.create(); }
alert.show();
} });
AlertDialog alert = builder.create();
private void proxyChoicePicker() { alert.show();
AlertDialog.Builder picker = new AlertDialog.Builder(mContext); }
picker.setTitle(getResources().getString(R.string.http_proxy));
picker.setSingleChoiceItems(mProxyChoices, mPreferences.getProxyChoice(), private void proxyChoicePicker() {
new DialogInterface.OnClickListener() { AlertDialog.Builder picker = new AlertDialog.Builder(mContext);
picker.setTitle(getResources().getString(R.string.http_proxy));
@Override picker.setSingleChoiceItems(mProxyChoices, mPreferences.getProxyChoice(),
public void onClick(DialogInterface dialog, int which) { new DialogInterface.OnClickListener() {
setProxyChoice(which);
} @Override
}); public void onClick(DialogInterface dialog, int which) {
picker.setNeutralButton(getResources().getString(R.string.action_ok), setProxyChoice(which);
new DialogInterface.OnClickListener() { }
@Override });
public void onClick(DialogInterface dialog, int which) { picker.setNeutralButton(getResources().getString(R.string.action_ok),
} new DialogInterface.OnClickListener() {
}); @Override
picker.show(); public void onClick(DialogInterface dialog, int which) {
} }
});
private void setProxyChoice(int choice) { picker.show();
switch (choice) { }
case Constants.PROXY_ORBOT:
OrbotHelper oh = new OrbotHelper(this); private void setProxyChoice(int choice) {
if (!oh.isOrbotInstalled()) { ProxyUtils utils = ProxyUtils.getInstance(this);
choice = Constants.NO_PROXY; switch (choice) {
Utils.showToast(mContext, getResources().getString(R.string.install_orbot)); case Constants.PROXY_ORBOT:
} choice = utils.setProxyChoice(choice, this);
break; break;
case Constants.PROXY_I2P:
case Constants.PROXY_I2P: choice = utils.setProxyChoice(choice, this);
I2PAndroidHelper ih = new I2PAndroidHelper(this); break;
if (!ih.isI2PAndroidInstalled()) { case Constants.PROXY_MANUAL:
choice = Constants.NO_PROXY; manualProxyPicker();
ih.promptToInstall(this); break;
} }
break;
mPreferences.setProxyChoice(choice);
case Constants.PROXY_MANUAL: if (choice < mProxyChoices.length)
manualProxyPicker(); mProxyChoiceName.setText(mProxyChoices[choice]);
break; }
}
public void manualProxyPicker() {
mPreferences.setProxyChoice(choice); View v = getLayoutInflater().inflate(R.layout.picker_manual_proxy, null);
if (choice < mProxyChoices.length) final EditText eProxyHost = (EditText) v.findViewById(R.id.proxyHost);
mProxyChoiceName.setText(mProxyChoices[choice]); final EditText eProxyPort = (EditText) v.findViewById(R.id.proxyPort);
} eProxyHost.setText(mPreferences.getProxyHost());
eProxyPort.setText(Integer.toString(mPreferences.getProxyPort()));
public void manualProxyPicker() {
View v = getLayoutInflater().inflate(R.layout.picker_manual_proxy, null); new AlertDialog.Builder(mActivity)
final EditText eProxyHost = (EditText) v.findViewById(R.id.proxyHost); .setTitle(R.string.manual_proxy)
final EditText eProxyPort = (EditText) v.findViewById(R.id.proxyPort); .setView(v)
eProxyHost.setText(mPreferences.getProxyHost()); .setPositiveButton(R.string.action_ok, new DialogInterface.OnClickListener() {
eProxyPort.setText(Integer.toString(mPreferences.getProxyPort())); @Override
public void onClick(DialogInterface dialogInterface, int i) {
new AlertDialog.Builder(mActivity) String proxyHost = eProxyHost.getText().toString();
.setTitle(R.string.manual_proxy) int proxyPort = Integer.parseInt(eProxyPort.getText().toString());
.setView(v) mPreferences.setProxyHost(proxyHost);
.setPositiveButton(R.string.action_ok, new DialogInterface.OnClickListener() { mPreferences.setProxyPort(proxyPort);
@Override mProxyChoiceName.setText(proxyHost + ":" + proxyPort);
public void onClick(DialogInterface dialogInterface, int i) { }
String proxyHost = eProxyHost.getText().toString(); })
int proxyPort = Integer.parseInt(eProxyPort.getText().toString()); .show();
mPreferences.setProxyHost(proxyHost); }
mPreferences.setProxyPort(proxyPort);
mProxyChoiceName.setText(proxyHost + ":" + proxyPort); public void agentPicker() {
} final AlertDialog.Builder agentStringPicker = new AlertDialog.Builder(mActivity);
})
.show(); agentStringPicker.setTitle(getResources().getString(R.string.title_user_agent));
} final EditText getAgent = new EditText(this);
getAgent.append(mPreferences.getUserAgentString(""));
public void agentPicker() { agentStringPicker.setView(getAgent);
final AlertDialog.Builder agentStringPicker = new AlertDialog.Builder(mActivity); agentStringPicker.setPositiveButton(getResources().getString(R.string.action_ok),
new DialogInterface.OnClickListener() {
agentStringPicker.setTitle(getResources().getString(R.string.title_user_agent));
final EditText getAgent = new EditText(this); @Override
getAgent.append(mPreferences.getUserAgentString("")); public void onClick(DialogInterface dialog, int which) {
agentStringPicker.setView(getAgent); String text = getAgent.getText().toString();
agentStringPicker.setPositiveButton(getResources().getString(R.string.action_ok), mPreferences.setUserAgentString(text);
new DialogInterface.OnClickListener() { getAgent.setText(getResources().getString(R.string.agent_custom));
}
@Override });
public void onClick(DialogInterface dialog, int which) { agentStringPicker.show();
String text = getAgent.getText().toString(); }
mPreferences.setUserAgentString(text);
getAgent.setText(getResources().getString(R.string.agent_custom)); public void general(RelativeLayout view) {
} view.setOnClickListener(new OnClickListener() {
});
agentStringPicker.show(); @Override
} public void onClick(View v) {
startActivity(new Intent(mContext, GeneralSettingsActivity.class));
public void general(RelativeLayout view) { }
view.setOnClickListener(new OnClickListener() {
});
@Override }
public void onClick(View v) {
startActivity(new Intent(mContext, GeneralSettingsActivity.class)); public void display(RelativeLayout view) {
} view.setOnClickListener(new OnClickListener() {
}); @Override
} public void onClick(View v) {
startActivity(new Intent(mContext, DisplaySettingsActivity.class));
public void display(RelativeLayout view) { }
view.setOnClickListener(new OnClickListener() {
});
@Override }
public void onClick(View v) {
startActivity(new Intent(mContext, DisplaySettingsActivity.class)); public void privacy(RelativeLayout view) {
} view.setOnClickListener(new OnClickListener() {
}); @Override
} public void onClick(View v) {
startActivity(new Intent(mContext, PrivacySettingsActivity.class));
public void privacy(RelativeLayout view) { }
view.setOnClickListener(new OnClickListener() {
});
@Override }
public void onClick(View v) {
startActivity(new Intent(mContext, PrivacySettingsActivity.class)); public void advanced(RelativeLayout view) {
} view.setOnClickListener(new OnClickListener() {
}); @Override
} public void onClick(View v) {
startActivity(new Intent(mContext, AdvancedSettingsActivity.class));
public void advanced(RelativeLayout view) { }
view.setOnClickListener(new OnClickListener() {
});
@Override }
public void onClick(View v) {
startActivity(new Intent(mContext, AdvancedSettingsActivity.class)); public void about(RelativeLayout view) {
} view.setOnClickListener(new OnClickListener() {
}); @Override
} public void onClick(View v) {
startActivity(new Intent(mContext, AboutSettingsActivity.class));
public void about(RelativeLayout view) { }
view.setOnClickListener(new OnClickListener() {
});
@Override }
public void onClick(View v) {
startActivity(new Intent(mContext, AboutSettingsActivity.class));
}
});
}
} }

View File

@ -1,21 +1,21 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools" xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:orientation="vertical"> android:orientation="vertical">
<include layout="@layout/toolbar_settings" /> <include layout="@layout/toolbar_settings" />
<ScrollView <ScrollView
android:id="@+id/scrollView1" android:id="@+id/scrollView1"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" > android:layout_height="match_parent">
<LinearLayout <LinearLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:orientation="vertical" > android:orientation="vertical">
<RelativeLayout <RelativeLayout
android:id="@+id/layoutFlash" android:id="@+id/layoutFlash"
@ -25,7 +25,7 @@
android:minHeight="60dp" android:minHeight="60dp"
android:paddingBottom="10dp" android:paddingBottom="10dp"
android:paddingRight="10dp" android:paddingRight="10dp"
android:paddingTop="10dp" > android:paddingTop="10dp">
<TextView <TextView
android:id="@+id/textView1" android:id="@+id/textView1"
@ -61,7 +61,7 @@
android:minHeight="60dp" android:minHeight="60dp"
android:paddingBottom="10dp" android:paddingBottom="10dp"
android:paddingRight="10dp" android:paddingRight="10dp"
android:paddingTop="10dp" > android:paddingTop="10dp">
<TextView <TextView
android:layout_width="wrap_content" android:layout_width="wrap_content"
@ -96,7 +96,7 @@
android:minHeight="60dp" android:minHeight="60dp"
android:paddingBottom="10dp" android:paddingBottom="10dp"
android:paddingRight="10dp" android:paddingRight="10dp"
android:paddingTop="10dp" > android:paddingTop="10dp">
<TextView <TextView
android:id="@+id/textView2" android:id="@+id/textView2"
@ -132,7 +132,7 @@
android:minHeight="60dp" android:minHeight="60dp"
android:paddingBottom="10dp" android:paddingBottom="10dp"
android:paddingRight="10dp" android:paddingRight="10dp"
android:paddingTop="10dp" > android:paddingTop="10dp">
<TextView <TextView
android:id="@+id/textView3" android:id="@+id/textView3"
@ -160,40 +160,7 @@
android:layout_marginRight="10dp" android:layout_marginRight="10dp"
android:background="?attr/dividerColor" /> android:background="?attr/dividerColor" />
<LinearLayout
android:id="@+id/layoutProxyChoice"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="?attr/listChoiceBackgroundIndicator"
android:minHeight="60dp"
android:orientation="vertical"
android:paddingBottom="10dp"
android:paddingTop="10dp" >
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingLeft="16dp"
android:text="@string/http_proxy"
android:textAppearance="?android:attr/textAppearanceMedium" />
<TextView
android:id="@+id/proxyChoiceName"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingLeft="16dp"
android:textAppearance="?android:attr/textAppearanceSmall"
android:textColor="@color/light"
tools:text="Disabled" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="1dp"
android:layout_marginLeft="10dp"
android:layout_marginRight="10dp"
android:background="?attr/dividerColor" />
<RelativeLayout <RelativeLayout
android:id="@+id/layoutColorMode" android:id="@+id/layoutColorMode"
android:layout_width="match_parent" android:layout_width="match_parent"
@ -202,7 +169,7 @@
android:minHeight="60dp" android:minHeight="60dp"
android:paddingBottom="10dp" android:paddingBottom="10dp"
android:paddingRight="10dp" android:paddingRight="10dp"
android:paddingTop="10dp" > android:paddingTop="10dp">
<TextView <TextView
android:layout_width="wrap_content" android:layout_width="wrap_content"
@ -222,6 +189,40 @@
android:layout_centerVertical="true" /> android:layout_centerVertical="true" />
</RelativeLayout> </RelativeLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="1dp"
android:layout_marginLeft="10dp"
android:layout_marginRight="10dp"
android:background="?attr/dividerColor" />
<LinearLayout
android:id="@+id/layoutProxyChoice"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="?attr/listChoiceBackgroundIndicator"
android:minHeight="60dp"
android:orientation="vertical"
android:paddingBottom="10dp"
android:paddingTop="10dp">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingLeft="16dp"
android:text="@string/http_proxy"
android:textAppearance="?android:attr/textAppearanceMedium" />
<TextView
android:id="@+id/proxyChoiceName"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingLeft="16dp"
android:textAppearance="?android:attr/textAppearanceSmall"
android:textColor="@color/light"
tools:text="Disabled" />
</LinearLayout>
<LinearLayout <LinearLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="1dp" android:layout_height="1dp"
@ -236,7 +237,7 @@
android:background="?attr/listChoiceBackgroundIndicator" android:background="?attr/listChoiceBackgroundIndicator"
android:minHeight="60dp" android:minHeight="60dp"
android:paddingBottom="10dp" android:paddingBottom="10dp"
android:paddingTop="10dp" > android:paddingTop="10dp">
<TextView <TextView
android:id="@+id/textView7" android:id="@+id/textView7"
@ -263,7 +264,7 @@
android:background="?attr/listChoiceBackgroundIndicator" android:background="?attr/listChoiceBackgroundIndicator"
android:minHeight="60dp" android:minHeight="60dp"
android:paddingBottom="10dp" android:paddingBottom="10dp"
android:paddingTop="10dp" > android:paddingTop="10dp">
<TextView <TextView
android:layout_width="wrap_content" android:layout_width="wrap_content"
@ -289,7 +290,7 @@
android:background="?attr/listChoiceBackgroundIndicator" android:background="?attr/listChoiceBackgroundIndicator"
android:minHeight="60dp" android:minHeight="60dp"
android:paddingBottom="10dp" android:paddingBottom="10dp"
android:paddingTop="10dp" > android:paddingTop="10dp">
<TextView <TextView
android:id="@+id/textView8" android:id="@+id/textView8"
@ -316,7 +317,7 @@
android:background="?attr/listChoiceBackgroundIndicator" android:background="?attr/listChoiceBackgroundIndicator"
android:minHeight="60dp" android:minHeight="60dp"
android:paddingBottom="10dp" android:paddingBottom="10dp"
android:paddingTop="10dp" > android:paddingTop="10dp">
<TextView <TextView
android:id="@+id/textView9" android:id="@+id/textView9"
@ -343,7 +344,7 @@
android:background="?attr/listChoiceBackgroundIndicator" android:background="?attr/listChoiceBackgroundIndicator"
android:minHeight="60dp" android:minHeight="60dp"
android:paddingBottom="10dp" android:paddingBottom="10dp"
android:paddingTop="10dp" > android:paddingTop="10dp">
<TextView <TextView
android:id="@+id/textView10" android:id="@+id/textView10"
@ -370,14 +371,14 @@
android:background="?attr/listChoiceBackgroundIndicator" android:background="?attr/listChoiceBackgroundIndicator"
android:minHeight="60dp" android:minHeight="60dp"
android:paddingBottom="10dp" android:paddingBottom="10dp"
android:paddingTop="10dp" > android:paddingTop="10dp">
<LinearLayout <LinearLayout
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_alignParentLeft="true" android:layout_alignParentLeft="true"
android:layout_centerVertical="true" android:layout_centerVertical="true"
android:orientation="vertical" > android:orientation="vertical">
<TextView <TextView
android:id="@+id/textView11" android:id="@+id/textView11"

View File

@ -158,7 +158,6 @@
<string name="powered_by_google">Unterstützt durch Google</string> <string name="powered_by_google">Unterstützt durch Google</string>
<string name="title_adblock">Werbeblocker</string> <string name="title_adblock">Werbeblocker</string>
<string name="message_adblock">Der Werbeblocker ist nur in Lightning Browser+ verfügbar und kann im Google Play Store gekauft werden!</string> <string name="message_adblock">Der Werbeblocker ist nur in Lightning Browser+ verfügbar und kann im Google Play Store gekauft werden!</string>
<string name="enable_orbot">Orbot aktivieren</string>
<string name="use_tor_prompt">Orbot ist installiert. Soll Tor verwendet werden?</string> <string name="use_tor_prompt">Orbot ist installiert. Soll Tor verwendet werden?</string>
<string name="install_orbot">Um Tor verwenden zu können, muss Orbot installiert sein!</string> <string name="install_orbot">Um Tor verwenden zu können, muss Orbot installiert sein!</string>
<string name="yes">Ja</string> <string name="yes">Ja</string>

View File

@ -141,7 +141,6 @@
<string name="powered_by_google">Proporcionadas por Google</string> <string name="powered_by_google">Proporcionadas por Google</string>
<string name="title_adblock">AdBlock</string> <string name="title_adblock">AdBlock</string>
<string name="message_adblock">El bloqueador de publicidad AdBlock sólo está disponible en la versión de pago del navegador, Lightning Browser+. Puede descargarla en Google Play.</string> <string name="message_adblock">El bloqueador de publicidad AdBlock sólo está disponible en la versión de pago del navegador, Lightning Browser+. Puede descargarla en Google Play.</string>
<string name="enable_orbot">Habilitar Orbot</string>
<string name="use_tor_prompt">Parece que tienes Orbot instalado. ¿Quieres usar Tor?</string> <string name="use_tor_prompt">Parece que tienes Orbot instalado. ¿Quieres usar Tor?</string>
<string name="install_orbot">Por favor, instala Orbot para usar Tor.</string> <string name="install_orbot">Por favor, instala Orbot para usar Tor.</string>
<string name="yes"></string> <string name="yes"></string>

View File

@ -142,7 +142,6 @@
<string name="powered_by_google">Powered by Google</string> <string name="powered_by_google">Powered by Google</string>
<string name="title_adblock">AdBlock</string> <string name="title_adblock">AdBlock</string>
<string name="message_adblock">Το AdBlock είναι προς το παρόν διαθέσιμο μόνο στην πληρωμένη έκδοση του browser, Lightning Browser+. Είναι διαθέσιμη για κατέβασμα στο Google Play.</string> <string name="message_adblock">Το AdBlock είναι προς το παρόν διαθέσιμο μόνο στην πληρωμένη έκδοση του browser, Lightning Browser+. Είναι διαθέσιμη για κατέβασμα στο Google Play.</string>
<string name="enable_orbot">Ενεργοποίηση Orbot</string>
<string name="use_tor_prompt">Φαίνεται οτι έχετε εγκατεστημένο το Orbot. Θα θέλατε να χρησιμοποιήσετε το Tor?</string> <string name="use_tor_prompt">Φαίνεται οτι έχετε εγκατεστημένο το Orbot. Θα θέλατε να χρησιμοποιήσετε το Tor?</string>
<string name="install_orbot">Παρακαλώ εγκαταστήστε το Orbot για να χρησιμοποιήσετε το Tor.</string> <string name="install_orbot">Παρακαλώ εγκαταστήστε το Orbot για να χρησιμοποιήσετε το Tor.</string>
<string name="yes">Ναι</string> <string name="yes">Ναι</string>

View File

@ -158,7 +158,6 @@
<string name="powered_by_google">A Google támogatásával</string> <string name="powered_by_google">A Google támogatásával</string>
<string name="title_adblock">AdBlock</string> <string name="title_adblock">AdBlock</string>
<string name="message_adblock">Az AdBlock jelenleg csak a Lightning Browser + fizetős változatban érhető el.Ez letölthető a Google Play Áruházból.</string> <string name="message_adblock">Az AdBlock jelenleg csak a Lightning Browser + fizetős változatban érhető el.Ez letölthető a Google Play Áruházból.</string>
<string name="enable_orbot">Orbot bekapcsolása</string>
<string name="use_tor_prompt">Úgy tűnik, hogy önnek telepítve van az Orbot.Szeretné használni Tor-t?</string> <string name="use_tor_prompt">Úgy tűnik, hogy önnek telepítve van az Orbot.Szeretné használni Tor-t?</string>
<string name="install_orbot">Kérjük telepítse az Orbot-ot annak érdekében, hogy működjön a proxy a Tor-ral.</string> <string name="install_orbot">Kérjük telepítse az Orbot-ot annak érdekében, hogy működjön a proxy a Tor-ral.</string>
<string name="yes">Igen</string> <string name="yes">Igen</string>

View File

@ -93,7 +93,6 @@
<string name="message_text_copied">Testo copiato negli appunti</string> <string name="message_text_copied">Testo copiato negli appunti</string>
<string name="message_link_copied">Link copiato negli appunti</string> <string name="message_link_copied">Link copiato negli appunti</string>
<string name="block_ads">Blocca Annunci</string> <string name="block_ads">Blocca Annunci</string>
<string name="enable_orbot">Abilita Orbot</string>
<string name="sync_history">Sincronizza cronologia con Google</string> <string name="sync_history">Sincronizza cronologia con Google</string>
<string name="export_bookmarks">Esporta segnalibri</string> <string name="export_bookmarks">Esporta segnalibri</string>
<string name="import_backup">Importa segnalibri da backup</string> <string name="import_backup">Importa segnalibri da backup</string>

View File

@ -155,7 +155,6 @@
<string name="powered_by_google">Powered by Google</string> <string name="powered_by_google">Powered by Google</string>
<string name="title_adblock">広告ブロック</string> <string name="title_adblock">広告ブロック</string>
<string name="message_adblock">広告ブロックは有料版のLightning Browser+でのみ利用可能です。Google Playからダウンロードできます。</string> <string name="message_adblock">広告ブロックは有料版のLightning Browser+でのみ利用可能です。Google Playからダウンロードできます。</string>
<string name="enable_orbot">Orbot</string>
<string name="use_tor_prompt">Orbotがインストールされています。Torを使用しますか?</string> <string name="use_tor_prompt">Orbotがインストールされています。Torを使用しますか?</string>
<string name="install_orbot">Torでプロキシを有効にするにはOrbotをインストールしてください</string> <string name="install_orbot">Torでプロキシを有効にするにはOrbotをインストールしてください</string>
<string name="yes">はい</string> <string name="yes">はい</string>

View File

@ -141,7 +141,6 @@
<string name="powered_by_google">Dostarczane przez Google</string> <string name="powered_by_google">Dostarczane przez Google</string>
<string name="title_adblock">Blokowanie reklam</string> <string name="title_adblock">Blokowanie reklam</string>
<string name="message_adblock">Blokowanie reklam jest obecnie dostępne tylko w płatnej wersji przeglądarki, Lightning Browser+. Jest ona dostępna do pobrania w sklepie Google Play.</string> <string name="message_adblock">Blokowanie reklam jest obecnie dostępne tylko w płatnej wersji przeglądarki, Lightning Browser+. Jest ona dostępna do pobrania w sklepie Google Play.</string>
<string name="enable_orbot">Włącz Orbota</string>
<string name="use_tor_prompt">Wygląda na to że Orbot jest zainstalowany. Chciałbyś go włączyć i użyć sieci Tor do łączenia się z internetem?</string> <string name="use_tor_prompt">Wygląda na to że Orbot jest zainstalowany. Chciałbyś go włączyć i użyć sieci Tor do łączenia się z internetem?</string>
<string name="install_orbot">Zanistaluj Orbota by móc używać sieci Tor do łączenia się z internetem.</string> <string name="install_orbot">Zanistaluj Orbota by móc używać sieci Tor do łączenia się z internetem.</string>
<string name="yes">Tak</string> <string name="yes">Tak</string>

View File

@ -158,7 +158,6 @@
<string name="powered_by_google">Disponibilizado por Google</string> <string name="powered_by_google">Disponibilizado por Google</string>
<string name="title_adblock">AdBlock</string> <string name="title_adblock">AdBlock</string>
<string name="message_adblock">O AdBlock apenas está disponível na versão paga, o Lightning Browser+. Esta versão está disponível na loja Google.</string> <string name="message_adblock">O AdBlock apenas está disponível na versão paga, o Lightning Browser+. Esta versão está disponível na loja Google.</string>
<string name="enable_orbot">Ativar Orbot</string>
<string name="use_tor_prompt">Parece que você tem o Orbot instalado. Gostaria de utilizar a rede Tor?</string> <string name="use_tor_prompt">Parece que você tem o Orbot instalado. Gostaria de utilizar a rede Tor?</string>
<string name="install_orbot">Por favor instale o Orbot para poder utilizar a rede Tor.</string> <string name="install_orbot">Por favor instale o Orbot para poder utilizar a rede Tor.</string>
<string name="yes">Sim</string> <string name="yes">Sim</string>

View File

@ -141,7 +141,6 @@
<string name="powered_by_google">Используя Google</string> <string name="powered_by_google">Используя Google</string>
<string name="title_adblock">AdBlock</string> <string name="title_adblock">AdBlock</string>
<string name="message_adblock">AdBlock в настоящее время доступен только в платной версии браузера Lightning Browser+. Он доступен для загрузки в Google Play.</string> <string name="message_adblock">AdBlock в настоящее время доступен только в платной версии браузера Lightning Browser+. Он доступен для загрузки в Google Play.</string>
<string name="enable_orbot">Использовать Orbot</string>
<string name="use_tor_prompt">Похоже, установлен Orbot. Вы хотите использовать Tor?</string> <string name="use_tor_prompt">Похоже, установлен Orbot. Вы хотите использовать Tor?</string>
<string name="install_orbot">Пожалуйста, установите Orbot для проксирования через Tor.</string> <string name="install_orbot">Пожалуйста, установите Orbot для проксирования через Tor.</string>
<string name="yes">Да</string> <string name="yes">Да</string>

View File

@ -155,7 +155,6 @@
<string name="powered_by_google">Погоњено Гуглом</string> <string name="powered_by_google">Погоњено Гуглом</string>
<string name="title_adblock">Адблок</string> <string name="title_adblock">Адблок</string>
<string name="message_adblock">Адблок је доступан само у плаћеном издању прегледача, „Lightning Browser+“. Доступан је за преузимање на Гугловом Плеју.</string> <string name="message_adblock">Адблок је доступан само у плаћеном издању прегледача, „Lightning Browser+“. Доступан је за преузимање на Гугловом Плеју.</string>
<string name="enable_orbot">Омогући Орбот</string>
<string name="use_tor_prompt">Изгледа да имате Орбот инсталиран. Желите ли да користите Тор?</string> <string name="use_tor_prompt">Изгледа да имате Орбот инсталиран. Желите ли да користите Тор?</string>
<string name="install_orbot">Инсталирајте Орбот да бисте користили Тор.</string> <string name="install_orbot">Инсталирајте Орбот да бисте користили Тор.</string>
<string name="yes">Да</string> <string name="yes">Да</string>

View File

@ -142,7 +142,6 @@
<string name="powered_by_google">Powered by Google</string> <string name="powered_by_google">Powered by Google</string>
<string name="title_adblock">AdBlock</string> <string name="title_adblock">AdBlock</string>
<string name="message_adblock">AdBlock şu anda yalnızca ücretli sürüm olan Lightning Browser+ ile kullanılabilir. Ücretli sürümü Google Play aracılığı ile indirebilirsin.</string> <string name="message_adblock">AdBlock şu anda yalnızca ücretli sürüm olan Lightning Browser+ ile kullanılabilir. Ücretli sürümü Google Play aracılığı ile indirebilirsin.</string>
<string name="enable_orbot">Orbot\'u kullan</string>
<string name="use_tor_prompt">Cihazında Orbot yüklü görünüyor. Tor kullanmak ister misin?</string> <string name="use_tor_prompt">Cihazında Orbot yüklü görünüyor. Tor kullanmak ister misin?</string>
<string name="install_orbot">Tor proxy ağı ile gezinmek için Orbot yüklemelisin.</string> <string name="install_orbot">Tor proxy ağı ile gezinmek için Orbot yüklemelisin.</string>
<string name="yes">Evet</string> <string name="yes">Evet</string>

View File

@ -142,7 +142,6 @@
<string name="powered_by_google">由 Google 提供支持</string> <string name="powered_by_google">由 Google 提供支持</string>
<string name="title_adblock">广告拦截</string> <string name="title_adblock">广告拦截</string>
<string name="message_adblock">广告拦截现在只能在付费版的浏览器 - Lightning Browser+ 中使用。你可以在 Google Play 中下载它。</string> <string name="message_adblock">广告拦截现在只能在付费版的浏览器 - Lightning Browser+ 中使用。你可以在 Google Play 中下载它。</string>
<string name="enable_orbot">启用 Orbot</string>
<string name="use_tor_prompt">看起来你已经安装了 Orbot. 你想要使用 Tor 吗?</string> <string name="use_tor_prompt">看起来你已经安装了 Orbot. 你想要使用 Tor 吗?</string>
<string name="install_orbot">请安装 Orbot 以便通过 Tor 全使用代理。</string> <string name="install_orbot">请安装 Orbot 以便通过 Tor 全使用代理。</string>
<string name="yes"></string> <string name="yes"></string>

View File

@ -158,7 +158,7 @@
<string name="powered_by_google">Powered by Google</string> <string name="powered_by_google">Powered by Google</string>
<string name="title_adblock">AdBlock</string> <string name="title_adblock">AdBlock</string>
<string name="message_adblock">AdBlock is currently only available in the browser\'s paid version, Lightning Browser+. It is available to download on Google Play.</string> <string name="message_adblock">AdBlock is currently only available in the browser\'s paid version, Lightning Browser+. It is available to download on Google Play.</string>
<string name="http_proxy">HTTP proxy</string> <string name="http_proxy">HTTP Proxy</string>
<string-array name="proxy_choices_array"> <string-array name="proxy_choices_array">
<item>None</item> <item>None</item>
<item>Orbot</item> <item>Orbot</item>