tor-commits
Threads by month
- ----- 2025 -----
- June
- May
- April
- March
- February
- January
- ----- 2024 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2023 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2022 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2021 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2020 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2019 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2018 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2017 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2016 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2015 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2014 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2013 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2012 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2011 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
October 2011
- 18 participants
- 1256 discussions

[orbot/master] updated BUILD info to add split command for tor binary
by n8fr8@torproject.org 28 Oct '11
by n8fr8@torproject.org 28 Oct '11
28 Oct '11
commit 6afb5da06abcea9709f7352a306bf026a141cec9
Author: Nathan Freitas <nathan(a)freitas.net>
Date: Mon Jul 25 17:35:39 2011 -0400
updated BUILD info to add split command for tor binary
---
BUILD | 8 +++++++-
1 files changed, 7 insertions(+), 1 deletions(-)
diff --git a/BUILD b/BUILD
index b2e4109..b22aec4 100644
--- a/BUILD
+++ b/BUILD
@@ -124,7 +124,13 @@ Finally, we'll make a proper Android package with ant and the Android App SDK:
export APP_SDK=~/Documents/projects/android/android-sdk-linux_x86-1.5_r3/tools
cd ../Orbot/
cp $DROID_ROOT/external/privoxy/privoxy-3.0.12-stable/privoxy assets/privoxy
- cp $DROID_ROOT/external/tor/tor/src/or/tor assets/tor
+
+Now you need to split and copy the tor binary into res/raw. We split it into < 1M chunks
+because some Android devices don't like resources larger than 1M.
+
+ split --bytes=1m $DROID_ROOT/external/tor/tor/src/or/tor res/raw/tor
+
+Now build the Android app
$APP_SDK/android update project --name Orbot --target 3 --path .
ant release
1
0
commit e86e1d92f299fd26910b070cc918d84f7b62021b
Author: Nathan Freitas <nathan(a)freitas.net>
Date: Mon Jul 25 17:35:51 2011 -0400
updated tor version number
---
AndroidManifest.xml | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/AndroidManifest.xml b/AndroidManifest.xml
index 90e588f..781581d 100644
--- a/AndroidManifest.xml
+++ b/AndroidManifest.xml
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
- package="org.torproject.android" android:versionName="0.2.2.25-orbot-alpha-1.0.5.3" android:versionCode="16">
+ package="org.torproject.android" android:versionName="0.2.3.1-orbot-alpha-1.0.5.3" android:versionCode="16">
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED"/>
1
0
commit a85f5b95527d9a1a137091bb64121f31753c51db
Author: Nathan Freitas <nathan(a)freitas.net>
Date: Fri Oct 28 00:31:08 2011 -0400
new wizard interface nearly complete
---
src/org/torproject/android/AppManager.java | 272 -------------
.../torproject/android/ConfigureTransProxy.java | 183 ---------
src/org/torproject/android/LotsaText.java | 133 ------
src/org/torproject/android/Orbot.java | 75 ++--
src/org/torproject/android/Permissions.java | 229 -----------
.../android/ProcessSettingsAsyncTask.java | 32 --
.../torproject/android/SettingsPreferences.java | 134 ------
src/org/torproject/android/TipsAndTricks.java | 139 -------
src/org/torproject/android/TorConstants.java | 7 +-
src/org/torproject/android/TorifiedApp.java | 111 -----
src/org/torproject/android/WizardHelper.java | 425 --------------------
11 files changed, 37 insertions(+), 1703 deletions(-)
diff --git a/src/org/torproject/android/AppManager.java b/src/org/torproject/android/AppManager.java
deleted file mode 100644
index 9fbc60c..0000000
--- a/src/org/torproject/android/AppManager.java
+++ /dev/null
@@ -1,272 +0,0 @@
-/* Copyright (c) 2009, Nathan Freitas, Orbot / The Guardian Project - http://openideals.com/guardian */
-/* See LICENSE for licensing information */
-
-package org.torproject.android;
-
-import java.util.Arrays;
-import java.util.Comparator;
-import java.util.Iterator;
-import java.util.List;
-import java.util.StringTokenizer;
-
-import android.app.Activity;
-import android.content.Context;
-import android.content.SharedPreferences;
-import android.content.SharedPreferences.Editor;
-import android.content.pm.ApplicationInfo;
-import android.content.pm.PackageManager;
-import android.graphics.drawable.Drawable;
-import android.os.Bundle;
-import android.preference.PreferenceManager;
-import android.view.LayoutInflater;
-import android.view.View;
-import android.view.View.OnClickListener;
-import android.view.ViewGroup;
-import android.widget.ArrayAdapter;
-import android.widget.CheckBox;
-import android.widget.CompoundButton;
-import android.widget.CompoundButton.OnCheckedChangeListener;
-import android.widget.ImageView;
-import android.widget.ListAdapter;
-import android.widget.ListView;
-import android.widget.TextView;
-
-
-public class AppManager extends Activity implements OnCheckedChangeListener, OnClickListener, TorConstants {
-
- private static TorifiedApp[] apps = null;
-
- private ListView listApps;
-
- private AppManager mAppManager;
-
-
- private boolean appsLoaded = false;
-
- protected void onCreate(Bundle savedInstanceState) {
- super.onCreate(savedInstanceState);
-
- this.setContentView(R.layout.layout_apps);
-
- mAppManager = this;
-
-
-
- }
-
-
-
- @Override
- protected void onResume() {
- super.onResume();
- listApps = (ListView)findViewById(R.id.applistview);
-
- if (!appsLoaded)
- loadApps();
- }
-
-
-
- private void loadApps ()
- {
- resetApps(this);
- final TorifiedApp[] apps = getApps(this);
-
- Arrays.sort(apps, new Comparator<TorifiedApp>() {
- public int compare(TorifiedApp o1, TorifiedApp o2) {
- if (o1.isTorified() == o2.isTorified()) return o1.getName().compareTo(o2.getName());
- if (o1.isTorified()) return -1;
- return 1;
- }
- });
-
- final LayoutInflater inflater = getLayoutInflater();
-
- final ListAdapter adapter = new ArrayAdapter<TorifiedApp>(this,R.layout.layout_apps_item,R.id.itemtext,apps) {
- public View getView(int position, View convertView, ViewGroup parent) {
- ListEntry entry;
- if (convertView == null) {
- // Inflate a new view
- convertView = inflater.inflate(R.layout.layout_apps_item, parent, false);
- entry = new ListEntry();
- entry.icon = (ImageView) convertView.findViewById(R.id.itemicon);
- entry.box = (CheckBox) convertView.findViewById(R.id.itemcheck);
- entry.text = (TextView) convertView.findViewById(R.id.itemtext);
-
- entry.text.setOnClickListener(mAppManager);
- entry.text.setOnClickListener(mAppManager);
-
- convertView.setTag(entry);
-
- entry.box.setOnCheckedChangeListener(mAppManager);
- } else {
- // Convert an existing view
- entry = (ListEntry) convertView.getTag();
- }
-
-
- final TorifiedApp app = apps[position];
-
-
- entry.icon.setImageDrawable(app.getIcon());
- entry.text.setText(app.getName());
-
- final CheckBox box = entry.box;
- box.setTag(app);
- box.setChecked(app.isTorified());
-
- entry.text.setTag(box);
- entry.icon.setTag(box);
-
- return convertView;
- }
- };
-
- listApps.setAdapter(adapter);
-
- appsLoaded = true;
-
- }
-
- private static class ListEntry {
- private CheckBox box;
- private TextView text;
- private ImageView icon;
- }
-
- /* (non-Javadoc)
- * @see android.app.Activity#onStop()
- */
- @Override
- protected void onStop() {
- super.onStop();
-
- }
-
- public static TorifiedApp[] getApps (Context context)
- {
- if (apps == null)
- resetApps(context);
-
- return apps;
- }
-
- public static TorifiedApp[] resetApps (Context context)
- {
-
- SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);
-
- String tordAppString = prefs.getString(PREFS_KEY_TORIFIED, "");
- String[] tordApps;
-
- StringTokenizer st = new StringTokenizer(tordAppString,"|");
- tordApps = new String[st.countTokens()];
- int tordIdx = 0;
- while (st.hasMoreTokens())
- {
- tordApps[tordIdx++] = st.nextToken();
- }
-
- Arrays.sort(tordApps);
-
- //else load the apps up
- PackageManager pMgr = context.getPackageManager();
-
- List<ApplicationInfo> lAppInfo = pMgr.getInstalledApplications(0);
-
- Iterator<ApplicationInfo> itAppInfo = lAppInfo.iterator();
-
- apps = new TorifiedApp[lAppInfo.size()];
-
- ApplicationInfo aInfo = null;
-
- int appIdx = 0;
-
- while (itAppInfo.hasNext())
- {
- aInfo = itAppInfo.next();
-
- apps[appIdx] = new TorifiedApp();
-
- apps[appIdx].setEnabled(aInfo.enabled);
- apps[appIdx].setUid(aInfo.uid);
- apps[appIdx].setUsername(pMgr.getNameForUid(apps[appIdx].getUid()));
- apps[appIdx].setProcname(aInfo.processName);
- apps[appIdx].setName(pMgr.getApplicationLabel(aInfo).toString());
- apps[appIdx].setIcon(pMgr.getApplicationIcon(aInfo));
-
- // check if this application is allowed
- if (Arrays.binarySearch(tordApps, apps[appIdx].getUsername()) >= 0) {
- apps[appIdx].setTorified(true);
- }
- else
- {
- apps[appIdx].setTorified(false);
- }
-
- appIdx++;
- }
-
-
- return apps;
- }
-
-
- public void saveAppSettings (Context context)
- {
- if (apps == null)
- return;
-
- SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(this);
-
- // final SharedPreferences prefs = context.getSharedPreferences(PREFS_KEY, 0);
-
- StringBuilder tordApps = new StringBuilder();
-
- for (int i = 0; i < apps.length; i++)
- {
- if (apps[i].isTorified())
- {
- tordApps.append(apps[i].getUsername());
- tordApps.append("|");
- }
- }
-
- Editor edit = prefs.edit();
- edit.putString(PREFS_KEY_TORIFIED, tordApps.toString());
- edit.commit();
-
- }
-
-
- /**
- * Called an application is check/unchecked
- */
- public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
- final TorifiedApp app = (TorifiedApp) buttonView.getTag();
- if (app != null) {
- app.setTorified(isChecked);
- }
-
- saveAppSettings(this);
-
- }
-
-
-
- @Override
- public void onClick(View v) {
-
- CheckBox cbox = (CheckBox)v.getTag();
-
- final TorifiedApp app = (TorifiedApp)cbox.getTag();
- if (app != null) {
- app.setTorified(!app.isTorified());
- cbox.setChecked(app.isTorified());
- }
-
- saveAppSettings(this);
-
- }
-
-}
diff --git a/src/org/torproject/android/ConfigureTransProxy.java b/src/org/torproject/android/ConfigureTransProxy.java
deleted file mode 100644
index d515aae..0000000
--- a/src/org/torproject/android/ConfigureTransProxy.java
+++ /dev/null
@@ -1,183 +0,0 @@
-package org.torproject.android;
-
-import android.app.Activity;
-import android.app.AlertDialog;
-import android.content.Context;
-import android.content.DialogInterface;
-import android.content.Intent;
-import android.content.SharedPreferences;
-import android.content.SharedPreferences.Editor;
-import android.net.Uri;
-import android.os.Bundle;
-import android.preference.PreferenceManager;
-import android.view.View;
-import android.view.View.OnClickListener;
-import android.widget.Button;
-import android.widget.CheckBox;
-import android.widget.CompoundButton;
-import android.widget.RadioButton;
-import android.widget.RadioGroup;
-import android.widget.TextView;
-import android.widget.CompoundButton.OnCheckedChangeListener;
-import android.widget.Toast;
-
-public class ConfigureTransProxy extends Activity implements TorConstants {
-
- private Context context;
- private int flag = 0;
-
- protected void onCreate(Bundle savedInstanceState)
- {
- super.onCreate(savedInstanceState);
- context = this;
-
- }
-
- @Override
- protected void onStart() {
-
- super.onStart();
- setContentView(R.layout.layout_wizard_root);
-
- stepSix();
-
- }
-
- @Override
- protected void onResume() {
- super.onResume();
-
-
- }
-
-
-
- private void stepSix(){
-
- String title = context.getString(R.string.wizard_transproxy_title);
- TextView txtTitle = ((TextView)findViewById(R.id.WizardTextTitle));
- txtTitle.setText(title);
-
- Button back = ((Button)findViewById(R.id.btnWizard1));
- Button next = ((Button)findViewById(R.id.btnWizard2));
- next.setEnabled(false);
-
- back.setOnClickListener(new View.OnClickListener() {
-
- @Override
- public void onClick(View v) {
-
- startActivityForResult(new Intent(getBaseContext(), Permissions.class), 1);
- }
- });
-
- next.setOnClickListener(new View.OnClickListener() {
-
- //Dirty flag variable - improve logic
- @Override
- public void onClick(View v) {
- if( flag == 1 )
- context.startActivity(new Intent(context, AppManager.class));
-
- else
- showWizardFinal();
- }
- });
-
- RadioGroup mRadioGroup = (RadioGroup)findViewById(R.id.radioGroup);
- mRadioGroup.setOnCheckedChangeListener(new RadioGroup.OnCheckedChangeListener (){
-
-
- @Override
- public void onCheckedChanged(RadioGroup group, int checkedId){
- Button next = ((Button)findViewById(R.id.btnWizard2));
- next.setEnabled(true);
- next.setOnClickListener(new View.OnClickListener() {
-
- @Override
- public void onClick(View v) {
-
- showWizardFinal();
- }
- });
-
- RadioButton rb0 = (RadioButton)findViewById(R.id.radio0);
- RadioButton rb1 = (RadioButton)findViewById(R.id.radio1);
- RadioButton rb2 = (RadioButton)findViewById(R.id.radio2);
-
- SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);
-
- Editor pEdit = prefs.edit();
- pEdit.putBoolean(PREF_TRANSPARENT, rb0.isChecked());
- pEdit.putBoolean(PREF_TRANSPARENT_ALL, rb0.isChecked());
- pEdit.commit();
-
- if(rb0.isChecked())
- {
- pEdit.putString("radiobutton","rb0");
- pEdit.commit();
- }
-
- else if(rb1.isChecked())
- {
- flag = 1;
-
- pEdit.putBoolean(PREF_TRANSPARENT, true);
- pEdit.putBoolean(PREF_TRANSPARENT_ALL, false);
- pEdit.putString("radiobutton","rb1");
- pEdit.commit();
-
- next.setOnClickListener(new View.OnClickListener() {
-
- @Override
- public void onClick(View v) {
-
- context.startActivity(new Intent(context, AppManager.class));
-
-
- }
- });
- }
- else if(rb2.isChecked())
- {
- pEdit.putString("radiobutton", "rb2");
- pEdit.commit();
- }
-
- }
- });
-
-
- }
-
- private void showWizardFinal ()
- {
- String title = null;
- String msg = null;
-
-
- title = context.getString(R.string.wizard_final);
- msg = context.getString(R.string.wizard_final_msg);
-
- DialogInterface.OnClickListener ocListener = new DialogInterface.OnClickListener() {
-
- @Override
- public void onClick(DialogInterface dialog, int which) {
- context.startActivity(new Intent(context, Orbot.class));
-
- }
- };
-
-
- new AlertDialog.Builder(context)
- .setIcon(R.drawable.icon)
- .setTitle(title)
- .setPositiveButton(R.string.button_close, ocListener)
- .setMessage(msg)
- .show();
-
-
-
-
- }
-}
\ No newline at end of file
diff --git a/src/org/torproject/android/LotsaText.java b/src/org/torproject/android/LotsaText.java
deleted file mode 100644
index 1b0656b..0000000
--- a/src/org/torproject/android/LotsaText.java
+++ /dev/null
@@ -1,133 +0,0 @@
-package org.torproject.android;
-
-import android.app.Activity;
-import android.content.Context;
-import android.content.Intent;
-import android.content.SharedPreferences;
-import android.content.SharedPreferences.Editor;
-import android.os.Bundle;
-import android.preference.PreferenceManager;
-import android.view.View;
-import android.widget.Button;
-import android.widget.ImageView;
-import android.widget.TextView;
-
-public class LotsaText extends Activity implements TorConstants{
-
- private Context context;
-
- protected void onCreate(Bundle savedInstanceState)
- {
-
-
- super.onCreate(savedInstanceState);
- context = this;
-
-
- }
-
- @Override
- protected void onStart() {
-
- super.onStart();
- setContentView(R.layout.scrollingtext_buttons_view);
-
- SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);
-
- boolean wizardScreen1 = prefs.getBoolean("wizardscreen1",true);
- if(wizardScreen1)
- stepOne();
- else
- stepTwo();
-
- }
-
- @Override
- protected void onResume() {
- super.onResume();
-
-
- }
-
-
-
- private void stepOne() {
-
- SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);
-
- Editor pEdit = prefs.edit();
- pEdit.putBoolean("wizardscreen1",true);
- pEdit.commit();
-
- String title = context.getString(R.string.wizard_title);
- String msg = context.getString(R.string.wizard_title_msg);
-
- TextView txtTitle = ((TextView)findViewById(R.id.WizardTextTitle));
- txtTitle.setText(title);
-
- TextView txtBody = ((TextView)findViewById(R.id.WizardTextBody));
- txtBody.setText(msg);
-
- Button btn1 = ((Button)findViewById(R.id.btnWizard1));
- Button btn2 = ((Button)findViewById(R.id.btnWizard2));
- ImageView img = (ImageView) findViewById(R.id.orbot_image);
-
- btn1.setVisibility(Button.INVISIBLE);
- img.setImageResource(R.drawable.tor);
-
- btn2.setOnClickListener(new View.OnClickListener() {
-
- @Override
- public void onClick(View v) {
- stepTwo();
- }
- });
-
- }
-
- private void stepTwo() {
-
- SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);
-
- Editor pEdit = prefs.edit();
- pEdit.putBoolean("wizardscreen1",false);
- pEdit.commit();
-
- setContentView(R.layout.scrollingtext_buttons_view);
- String title = context.getString(R.string.wizard_warning_title);
- String msg = context.getString(R.string.wizard_warning_msg);
-
- TextView txtTitle = ((TextView)findViewById(R.id.WizardTextTitle));
- txtTitle.setText(title);
-
- TextView txtBody = ((TextView)findViewById(R.id.WizardTextBody));
- txtBody.setText(msg);
-
- Button btn1 = ((Button)findViewById(R.id.btnWizard1));
- Button btn2 = ((Button)findViewById(R.id.btnWizard2));
- ImageView img = (ImageView) findViewById(R.id.orbot_image);
-
- btn1.setVisibility(Button.VISIBLE);
- img.setImageResource(R.drawable.warning);
-
- btn1.setOnClickListener(new View.OnClickListener() {
-
- @Override
- public void onClick(View v) {
-
- stepOne();
- }
- });
-
- btn2.setOnClickListener(new View.OnClickListener() {
-
- @Override
- public void onClick(View v) {
- startActivityForResult(new Intent(getBaseContext(), Permissions.class), 1);
- }
- });
-
- }
-
-
-}
\ No newline at end of file
diff --git a/src/org/torproject/android/Orbot.java b/src/org/torproject/android/Orbot.java
index 0f162af..5470042 100644
--- a/src/org/torproject/android/Orbot.java
+++ b/src/org/torproject/android/Orbot.java
@@ -14,6 +14,9 @@ import java.util.StringTokenizer;
import org.torproject.android.service.ITorService;
import org.torproject.android.service.ITorServiceCallback;
import org.torproject.android.service.TorServiceConstants;
+import org.torproject.android.settings.ProcessSettingsAsyncTask;
+import org.torproject.android.settings.SettingsPreferences;
+import org.torproject.android.wizard.LotsaText;
import android.app.Activity;
import android.app.AlertDialog;
@@ -59,7 +62,7 @@ public class Orbot extends Activity implements OnLongClickListener, TorConstants
private MenuItem mItemOnOff = null; //the menu item which we toggle based on Orbot state
/* Some tracking bits */
- private int torStatus = STATUS_READY; //latest status reported from the tor service
+ private int torStatus = TorServiceConstants.STATUS_OFF; //latest status reported from the tor service
// this is a value we get passed back from the TorService
/* Tor Service interaction */
@@ -175,7 +178,7 @@ public class Orbot extends Activity implements OnLongClickListener, TorConstants
{
}
- else if (mService.getStatus() == STATUS_READY)
+ else if (mService.getStatus() == TorServiceConstants.STATUS_OFF)
{
if (mItemOnOff != null)
mItemOnOff.setTitle(R.string.menu_stop);
@@ -573,7 +576,7 @@ public class Orbot extends Activity implements OnLongClickListener, TorConstants
if (imgStatus != null)
{
- if (torStatus == STATUS_ON)
+ if (torStatus == TorServiceConstants.STATUS_ON)
{
imgStatus.setImageResource(R.drawable.toron);
@@ -584,7 +587,7 @@ public class Orbot extends Activity implements OnLongClickListener, TorConstants
lblStatus.setText(lblMsg);
- if (torServiceMsg.length() > 0)
+ if (torServiceMsg != null && torServiceMsg.length() > 0)
showAlert("Update", torServiceMsg, false);
boolean showFirstTime = prefs.getBoolean("connect_first_time",true);
@@ -607,7 +610,7 @@ public class Orbot extends Activity implements OnLongClickListener, TorConstants
}
- else if (torStatus == STATUS_CONNECTING)
+ else if (torStatus == TorServiceConstants.STATUS_CONNECTING)
{
imgStatus.setImageResource(R.drawable.torstarting);
@@ -619,18 +622,6 @@ public class Orbot extends Activity implements OnLongClickListener, TorConstants
mItemOnOff.setTitle(R.string.menu_stop);
}
- else if (torStatus == STATUS_OFF)
- {
- imgStatus.setImageResource(R.drawable.toroff);
-
-
- hideProgressDialog();
-
- lblStatus.setText(getString(R.string.status_shutting_down));
-
- if (mItemOnOff != null)
- mItemOnOff.setTitle(R.string.menu_start);
- }
else
{
@@ -704,34 +695,30 @@ public class Orbot extends Activity implements OnLongClickListener, TorConstants
public boolean onLongClick(View view) {
- try
+ try
+ {
+
+ if (mService != null && mService.getStatus() == TorServiceConstants.STATUS_OFF)
{
- if (mService == null)
- {
-
- }
- else if (mService.getStatus() == STATUS_READY)
- {
-
- createProgressDialog(getString(R.string.status_starting_up));
+ createProgressDialog(getString(R.string.status_starting_up));
- startTor();
- }
- else
- {
-
- stopTor();
-
- }
-
+ startTor();
}
- catch (Exception e)
+ else
{
- Log.d(TAG,"error onclick",e);
- }
- return true;
+ stopTor();
+
+ }
+
+ }
+ catch (Exception e)
+ {
+ Log.d(TAG,"error onclick",e);
+ }
+
+ return true;
}
@@ -775,13 +762,21 @@ public class Orbot extends Activity implements OnLongClickListener, TorConstants
// this is what takes messages or values from the callback threads or other non-mainUI threads
//and passes them back into the main UI thread for display to the user
private Handler mHandler = new Handler() {
+
+ private String lastServiceMsg = null;
+
public void handleMessage(Message msg) {
switch (msg.what) {
case TorServiceConstants.STATUS_MSG:
String torServiceMsg = (String)msg.getData().getString(HANDLER_TOR_MSG);
- updateStatus(torServiceMsg);
+ if (lastServiceMsg == null || !lastServiceMsg.equals(torServiceMsg))
+ {
+ updateStatus(torServiceMsg);
+
+ lastServiceMsg = torServiceMsg;
+ }
break;
case TorServiceConstants.LOG_MSG:
diff --git a/src/org/torproject/android/Permissions.java b/src/org/torproject/android/Permissions.java
deleted file mode 100644
index 2ee4f7e..0000000
--- a/src/org/torproject/android/Permissions.java
+++ /dev/null
@@ -1,229 +0,0 @@
-package org.torproject.android;
-
-import org.torproject.android.service.TorService;
-import org.torproject.android.service.TorServiceUtils;
-import org.torproject.android.service.TorTransProxy;
-
-import android.app.Activity;
-import android.content.Context;
-import android.content.Intent;
-import android.content.SharedPreferences;
-import android.content.SharedPreferences.Editor;
-import android.os.Bundle;
-import android.preference.PreferenceManager;
-import android.util.Log;
-import android.view.View;
-import android.widget.Button;
-import android.widget.CheckBox;
-import android.widget.CompoundButton;
-import android.widget.CompoundButton.OnCheckedChangeListener;
-import android.widget.TextView;
-import android.widget.Toast;
-
-public class Permissions extends Activity implements TorConstants {
-
- private Context context;
-
- protected void onCreate(Bundle savedInstanceState)
- {
- super.onCreate(savedInstanceState);
- context = this;
-
- }
-
- @Override
- protected void onStart() {
-
- super.onStart();
- setContentView(R.layout.layout_wizard_permissions);
-
- stepThree();
-
- }
-
- @Override
- protected void onResume() {
- super.onResume();
-
-
- }
-
- private void stepThree(){
-
- boolean hasRoot = TorServiceUtils.checkRootAccess();
- SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);
-
- Editor pEdit = prefs.edit();
- pEdit.putBoolean("has_root",hasRoot);
- pEdit.commit();
-
- if (hasRoot)
- {
- stepFourRoot();
- }
- else
- {
- stepFour();
- }
-
- }
-
- private void stepFourRoot(){
-
- String title = context.getString(R.string.wizard_permissions_title);
- String msg1 = context.getString(R.string.wizard_permissions_root_msg1);
- String msg2 = context.getString(R.string.wizard_permissions_root_msg2);
-
- TextView txtTitle = ((TextView)findViewById(R.id.WizardTextTitle));
- txtTitle.setText(title);
-
- TextView txtBody1 = ((TextView)findViewById(R.id.WizardTextBody1));
- txtBody1.setText(msg1);
-
-
- TextView txtBody2 = ((TextView)findViewById(R.id.WizardTextBody2));
- txtBody2.setText(msg2);
- txtBody2.setVisibility(TextView.VISIBLE);
-
- Button grantPermissions = ((Button)findViewById(R.id.grantPermissions));
- grantPermissions.setVisibility(Button.VISIBLE);
-
- Button back = ((Button)findViewById(R.id.btnWizard1));
- Button next = ((Button)findViewById(R.id.btnWizard2));
- next.setEnabled(false);
-
- CheckBox consent = (CheckBox)findViewById(R.id.checkBox);
- consent.setVisibility(CheckBox.VISIBLE);
-
- consent.setOnCheckedChangeListener(new OnCheckedChangeListener (){
-
- @Override
- public void onCheckedChanged(CompoundButton buttonView,
- boolean isChecked) {
-
-
- SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);
-
- Editor pEdit = prefs.edit();
-
- pEdit.putBoolean(PREF_TRANSPARENT, !isChecked);
- pEdit.putBoolean(PREF_TRANSPARENT_ALL, !isChecked);
-
- pEdit.commit();
-
- Button next = ((Button)findViewById(R.id.btnWizard2));
- if(isChecked)
- next.setEnabled(true);
- else
- next.setEnabled(false);
-
-
- }
-
- });
-
-
- grantPermissions.setOnClickListener(new View.OnClickListener() {
-
- @Override
- public void onClick(View v) {
- //Check and Install iptables - TorTransProxy.testOwnerModule(this)
-
- SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);
- boolean hasRoot = prefs.getBoolean("has_root",false);
-
- if (hasRoot)
- {
- try {
- int resp = TorTransProxy.testOwnerModule(context);
-
- if (resp < 0)
- {
- hasRoot = false;
- Toast.makeText(context, "ERROR: IPTables OWNER module not available", Toast.LENGTH_LONG).show();
-
- Log.i(TorService.TAG,"ERROR: IPTables OWNER module not available");
- stepFour();
- }
-
- } catch (Exception e) {
-
- hasRoot = false;
- Log.d(TorService.TAG,"ERROR: IPTables OWNER module not available",e);
- }
- }
-
- startActivityForResult(new Intent(getBaseContext(), ConfigureTransProxy.class), 1);
-
-
- }
- });
-
- back.setOnClickListener(new View.OnClickListener() {
-
- @Override
- public void onClick(View v) {
-
- startActivityForResult(new Intent(getBaseContext(), LotsaText.class), 1);
- }
- });
-
-
- next.setOnClickListener(new View.OnClickListener() {
-
-
- @Override
- public void onClick(View v) {
- startActivityForResult(new Intent(getBaseContext(), TipsAndTricks.class), 1);
- }
- });
-
- }
-
- private void stepFour(){
-
- Toast.makeText(context, "NON ROOT FUNC", Toast.LENGTH_SHORT).show();
- String title = context.getString(R.string.wizard_permissions_title);
- String msg = context.getString(R.string.wizard_permissions_msg);
-
- TextView txtTitle = ((TextView)findViewById(R.id.WizardTextTitle));
- txtTitle.setText(title);
-
- TextView txtBody = ((TextView)findViewById(R.id.WizardTextBody1));
- txtBody.setText(msg);
-
- Button btn1 = ((Button)findViewById(R.id.btnWizard1));
- Button btn2 = ((Button)findViewById(R.id.btnWizard2));
- btn2.setEnabled(true);
-
-
- TextView txtBody2 = ((TextView)findViewById(R.id.WizardTextBody2));
- txtBody2.setVisibility(TextView.GONE);
-
- Button grantPermissions = ((Button)findViewById(R.id.grantPermissions));
- grantPermissions.setVisibility(Button.GONE);
-
-
- CheckBox consent = (CheckBox)findViewById(R.id.checkBox);
- consent.setVisibility(CheckBox.GONE);
-
- btn1.setOnClickListener(new View.OnClickListener() {
-
- @Override
- public void onClick(View v) {
-
- startActivityForResult(new Intent(getBaseContext(), LotsaText.class), 1);
- }
- });
-
- btn2.setOnClickListener(new View.OnClickListener() {
-
- @Override
- public void onClick(View v) {
- startActivityForResult(new Intent(getBaseContext(), TipsAndTricks.class), 1);
- }
- });
- }
-
-
-}
\ No newline at end of file
diff --git a/src/org/torproject/android/ProcessSettingsAsyncTask.java b/src/org/torproject/android/ProcessSettingsAsyncTask.java
deleted file mode 100644
index c4e88a7..0000000
--- a/src/org/torproject/android/ProcessSettingsAsyncTask.java
+++ /dev/null
@@ -1,32 +0,0 @@
-package org.torproject.android;
-
-import org.torproject.android.service.ITorService;
-
-import android.os.AsyncTask;
-import android.os.RemoteException;
-
-public class ProcessSettingsAsyncTask extends AsyncTask<ITorService, Integer, Long>
-{
-
-
- @Override
- protected Long doInBackground(ITorService... torService) {
-
- try {
- torService[0].processSettings();
- } catch (RemoteException e) {
- e.printStackTrace();
- }
-
- return 100L;
- }
-
- protected void onProgressUpdate(Integer... progress) {
-
- }
-
- protected void onPostExecute(Long result) {
-
- }
-
-}
diff --git a/src/org/torproject/android/SettingsPreferences.java b/src/org/torproject/android/SettingsPreferences.java
deleted file mode 100644
index 7cf9093..0000000
--- a/src/org/torproject/android/SettingsPreferences.java
+++ /dev/null
@@ -1,134 +0,0 @@
-/* Copyright (c) 2009, Nathan Freitas, Orbot / The Guardian Project - http://openideals.com/guardian */
-/* See LICENSE for licensing information */
-
-package org.torproject.android;
-
-import org.torproject.android.service.TorServiceUtils;
-import org.torproject.android.service.TorTransProxy;
-
-import android.content.Intent;
-import android.content.SharedPreferences;
-import android.content.SharedPreferences.Editor;
-import android.os.Bundle;
-import android.preference.CheckBoxPreference;
-import android.preference.Preference;
-import android.preference.PreferenceManager;
-import android.preference.Preference.OnPreferenceClickListener;
-import android.preference.PreferenceActivity;
-import android.preference.PreferenceCategory;
-
-
-public class SettingsPreferences
- extends PreferenceActivity implements OnPreferenceClickListener {
-
- private CheckBoxPreference prefCBTransProxy = null;
- private CheckBoxPreference prefcBTransProxyAll = null;
- private Preference prefTransProxyApps = null;
- private CheckBoxPreference prefHiddenServices = null;
-
- private boolean hasRoot = false;
-
-
- private final static int HIDDEN_SERVICE_PREF_IDX = 6;
-
- protected void onCreate(Bundle savedInstanceState)
- {
- super.onCreate(savedInstanceState);
- addPreferencesFromResource(R.xml.preferences);
-
- SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(this);
-
- if (prefs.contains("has_root"))
- {
- hasRoot = prefs.getBoolean("has_root",false);
- }
- else
- {
- hasRoot = TorServiceUtils.checkRootAccess();
- Editor pEdit = prefs.edit();
- pEdit.putBoolean("has_root",hasRoot);
- pEdit.commit();
- }
- }
-
-
- @Override
- protected void onResume() {
-
- super.onResume();
-
-
- int transProxyGroupIdx = 1;
-
- if (!hasRoot)
- {
- getPreferenceScreen().getPreference(transProxyGroupIdx).setEnabled(false);
- }
- else
- {
- prefCBTransProxy = ((CheckBoxPreference)((PreferenceCategory)this.getPreferenceScreen().getPreference(transProxyGroupIdx)).getPreference(0));
- prefcBTransProxyAll = (CheckBoxPreference)((PreferenceCategory)this.getPreferenceScreen().getPreference(transProxyGroupIdx)).getPreference(1);
- prefTransProxyApps = ((PreferenceCategory)this.getPreferenceScreen().getPreference(transProxyGroupIdx)).getPreference(2);
-
- prefcBTransProxyAll.setEnabled(prefCBTransProxy.isChecked());
-
- prefTransProxyApps.setEnabled(prefCBTransProxy.isChecked() && (!prefcBTransProxyAll.isChecked()));
-
- prefCBTransProxy.setOnPreferenceClickListener(this);
- prefcBTransProxyAll.setOnPreferenceClickListener(this);
- prefTransProxyApps.setOnPreferenceClickListener(this);
-
- }
-
-
- prefHiddenServices = ((CheckBoxPreference)((PreferenceCategory)this.getPreferenceScreen().getPreference(HIDDEN_SERVICE_PREF_IDX)).getPreference(0));
- prefHiddenServices.setOnPreferenceClickListener(this);
- ((PreferenceCategory)this.getPreferenceScreen().getPreference(HIDDEN_SERVICE_PREF_IDX)).getPreference(1).setEnabled(prefHiddenServices.isChecked());
- ((PreferenceCategory)this.getPreferenceScreen().getPreference(HIDDEN_SERVICE_PREF_IDX)).getPreference(2).setEnabled(prefHiddenServices.isChecked());
-
-
- };
-
-
-
-
- /* (non-Javadoc)
- * @see android.app.Activity#onStop()
- */
- @Override
- protected void onStop() {
- super.onStop();
-
- //Log.d(getClass().getName(),"Exiting Preferences");
- }
-
- @Override
- public boolean onPreferenceClick(Preference preference) {
-
- setResult(1010);
-
- if (preference == prefTransProxyApps)
- {
- startActivity(new Intent(this, AppManager.class));
-
- }
- else if (preference == prefHiddenServices)
- {
-
- ((PreferenceCategory)this.getPreferenceScreen().getPreference(HIDDEN_SERVICE_PREF_IDX)).getPreference(1).setEnabled(prefHiddenServices.isChecked());
- ((PreferenceCategory)this.getPreferenceScreen().getPreference(HIDDEN_SERVICE_PREF_IDX)).getPreference(2).setEnabled(prefHiddenServices.isChecked());
-
- }
- else
- {
- prefcBTransProxyAll.setEnabled(prefCBTransProxy.isChecked());
- prefTransProxyApps.setEnabled(prefCBTransProxy.isChecked() && (!prefcBTransProxyAll.isChecked()));
-
- }
-
- return true;
- }
-
-
-
-}
diff --git a/src/org/torproject/android/TipsAndTricks.java b/src/org/torproject/android/TipsAndTricks.java
deleted file mode 100644
index ebb5ad3..0000000
--- a/src/org/torproject/android/TipsAndTricks.java
+++ /dev/null
@@ -1,139 +0,0 @@
-package org.torproject.android;
-
-import android.app.Activity;
-import android.app.AlertDialog;
-import android.content.Context;
-import android.content.DialogInterface;
-import android.content.Intent;
-import android.net.Uri;
-import android.os.Bundle;
-import android.view.View;
-import android.view.View.OnClickListener;
-import android.widget.Button;
-import android.widget.TextView;
-
-public class TipsAndTricks extends Activity implements TorConstants {
-
- private Context context;
-
- protected void onCreate(Bundle savedInstanceState)
- {
- super.onCreate(savedInstanceState);
- context = this;
-
- }
-
- @Override
- protected void onStart() {
-
- super.onStart();
- setContentView(R.layout.layout_wizard_tips);
-
- stepFive();
-
- }
-
- @Override
- protected void onResume() {
- super.onResume();
-
-
- }
-
- void stepFive(){
-
- String title = context.getString(R.string.wizard_tips_title);
- TextView txtTitle = ((TextView)findViewById(R.id.WizardTextTitle));
- txtTitle.setText(title);
-
- Button btn1 = (Button)findViewById(R.id.WizardRootButtonInstallGibberbot);
-
- btn1.setOnClickListener(new OnClickListener() {
-
- @Override
- public void onClick(View view) {
-
- String url = context.getString(R.string.gibberbot_apk_url);
- context.startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse(url)));
-
- }
- });
-
- Button btn2 = (Button)findViewById(R.id.WizardRootButtonInstallFirefox);
-
- btn2.setOnClickListener(new OnClickListener() {
-
- @Override
- public void onClick(View view) {
-
- String url = context.getString(R.string.firefox_apk_url);
- context.startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse(url)));
-
- }
- });
-
- Button btn3 = (Button)findViewById(R.id.WizardRootButtonInstallProxyMob);
-
- btn3.setOnClickListener(new OnClickListener() {
-
- @Override
- public void onClick(View view) {
-
- String url = context.getString(R.string.proxymob_url);
- context.startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse(url)));
- }
- });
-
- Button back = ((Button)findViewById(R.id.btnWizard1));
- Button next = ((Button)findViewById(R.id.btnWizard2));
-
- back.setOnClickListener(new View.OnClickListener() {
-
- @Override
- public void onClick(View v) {
-
- startActivityForResult(new Intent(getBaseContext(), Permissions.class), 1);
- }
- });
-
- next.setOnClickListener(new View.OnClickListener() {
-
- @Override
- public void onClick(View v) {
- showWizardFinal();
- }
- });
-
- }
-
- private void showWizardFinal ()
- {
- String title = null;
- String msg = null;
-
-
- title = context.getString(R.string.wizard_final);
- msg = context.getString(R.string.wizard_final_msg);
-
- DialogInterface.OnClickListener ocListener = new DialogInterface.OnClickListener() {
-
- @Override
- public void onClick(DialogInterface dialog, int which) {
- context.startActivity(new Intent(context, Orbot.class));
-
- }
- };
-
-
- new AlertDialog.Builder(context)
- .setIcon(R.drawable.icon)
- .setTitle(title)
- .setPositiveButton(R.string.button_close, ocListener)
- .setMessage(msg)
- .show();
-
-
-
-
- }
-}
\ No newline at end of file
diff --git a/src/org/torproject/android/TorConstants.java b/src/org/torproject/android/TorConstants.java
index 56eb5d5..38bb0d2 100644
--- a/src/org/torproject/android/TorConstants.java
+++ b/src/org/torproject/android/TorConstants.java
@@ -16,11 +16,6 @@ public interface TorConstants {
//path to check Tor against
public final static String URL_TOR_CHECK = "https://check.torproject.org";
- public final static int STATUS_OFF = -1;
- public final static int STATUS_READY = 0;
- public final static int STATUS_ON = 1;
- public final static int STATUS_CONNECTING = 2;
-
public final static String NEWLINE = "\n";
@@ -45,6 +40,8 @@ public interface TorConstants {
public final static String PREF_TRANSPARENT = "pref_transparent";
public final static String PREF_TRANSPARENT_ALL = "pref_transparent_all";
+ public final static String PREF_HAS_ROOT = "has_root";
+
}
diff --git a/src/org/torproject/android/TorifiedApp.java b/src/org/torproject/android/TorifiedApp.java
deleted file mode 100644
index 9e659e7..0000000
--- a/src/org/torproject/android/TorifiedApp.java
+++ /dev/null
@@ -1,111 +0,0 @@
-package org.torproject.android;
-
-import android.graphics.drawable.Drawable;
-
-public class TorifiedApp {
-
- private boolean enabled;
- private int uid;
- private String username;
- private String procname;
- private String name;
- private Drawable icon;
-
- private boolean torified = false;
-
- /**
- * @return the torified
- */
- public boolean isTorified() {
- return torified;
- }
- /**
- * @param torified the torified to set
- */
- public void setTorified(boolean torified) {
- this.torified = torified;
- }
- private int[] enabledPorts;
-
- /**
- * @return the enabledPorts
- */
- public int[] getEnabledPorts() {
- return enabledPorts;
- }
- /**
- * @param enabledPorts the enabledPorts to set
- */
- public void setEnabledPorts(int[] enabledPorts) {
- this.enabledPorts = enabledPorts;
- }
- /**
- * @return the enabled
- */
- public boolean isEnabled() {
- return enabled;
- }
- /**
- * @param enabled the enabled to set
- */
- public void setEnabled(boolean enabled) {
- this.enabled = enabled;
- }
- /**
- * @return the uid
- */
- public int getUid() {
- return uid;
- }
- /**
- * @param uid the uid to set
- */
- public void setUid(int uid) {
- this.uid = uid;
- }
- /**
- * @return the username
- */
- public String getUsername() {
- return username;
- }
- /**
- * @param username the username to set
- */
- public void setUsername(String username) {
- this.username = username;
- }
- /**
- * @return the procname
- */
- public String getProcname() {
- return procname;
- }
- /**
- * @param procname the procname to set
- */
- public void setProcname(String procname) {
- this.procname = procname;
- }
- /**
- * @return the name
- */
- public String getName() {
- return name;
- }
- /**
- * @param name the name to set
- */
- public void setName(String name) {
- this.name = name;
- }
-
-
- public Drawable getIcon() {
- return icon;
- }
-
- public void setIcon(Drawable icon) {
- this.icon = icon;
- }
-}
diff --git a/src/org/torproject/android/WizardHelper.java b/src/org/torproject/android/WizardHelper.java
deleted file mode 100644
index c85c50a..0000000
--- a/src/org/torproject/android/WizardHelper.java
+++ /dev/null
@@ -1,425 +0,0 @@
-package org.torproject.android;
-
-import org.torproject.android.service.TorService;
-import org.torproject.android.service.TorServiceUtils;
-import org.torproject.android.service.TorTransProxy;
-
-import android.app.AlertDialog;
-import android.app.Dialog;
-import android.content.Context;
-import android.content.DialogInterface;
-import android.content.Intent;
-import android.content.SharedPreferences;
-import android.content.SharedPreferences.Editor;
-import android.net.Uri;
-import android.preference.PreferenceManager;
-import android.util.Log;
-import android.view.LayoutInflater;
-import android.view.View;
-import android.view.View.OnClickListener;
-import android.widget.Button;
-import android.widget.CheckBox;
-import android.widget.CompoundButton;
-import android.widget.TextView;
-import android.widget.CompoundButton.OnCheckedChangeListener;
-import android.widget.Toast;
-
-public class WizardHelper implements TorConstants {
-
- private Context context;
- private AlertDialog currentDialog;
-
- public WizardHelper (Context context)
- {
- this.context = context;
- }
-
-
- public void showWizard ()
- {
- showWizardStep1();
- }
-
- public void showWizardStep1()
- {
-
-
- String title = context.getString(R.string.wizard_title);
-
- LayoutInflater li = LayoutInflater.from(context);
- View view = li.inflate(R.layout.layout_wizard_welcome, null);
-
-
- showCustomDialog(title, view,context.getString(R.string.btn_next),null,new DialogInterface.OnClickListener() {
-
- @Override
- public void onClick(DialogInterface dialog, int which) {
- dialog.dismiss();
-
- if (which == DialogInterface.BUTTON_NEUTRAL)
- {
-
- showWizardStep2();
- }
- /*
- else if (which == DialogInterface.BUTTON_POSITIVE)
- {
- showAbout();
- }*/
-
- }
- });
- }
-
- public void showWizardStep2()
- {
-
-
- String title = context.getString(R.string.wizard_permissions_stock);
-
- LayoutInflater li = LayoutInflater.from(context);
- View view = li.inflate(R.layout.layout_wizard_stock, null);
-
- Button btn1 = (Button)view.findViewById(R.id.WizardRootButtonEnable);
-
- btn1.setOnClickListener(new OnClickListener() {
-
- @Override
- public void onClick(View view) {
-
-
- boolean hasRoot = TorServiceUtils.checkRootAccess();
-
- if (hasRoot)
- {
- try {
- int resp = TorTransProxy.testOwnerModule(context);
-
- if (resp < 0)
- {
- hasRoot = false;
- Toast.makeText(context, "ERROR: IPTables OWNER module not available", Toast.LENGTH_LONG).show();
-
- Log.i(TorService.TAG,"ERROR: IPTables OWNER module not available");
- }
-
- } catch (Exception e) {
-
- hasRoot = false;
- Log.d(TorService.TAG,"ERROR: IPTables OWNER module not available",e);
- }
- }
-
- SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);
-
- Editor pEdit = prefs.edit();
- pEdit.putBoolean("has_root",hasRoot);
- pEdit.commit();
-
- if (hasRoot)
- {
- currentDialog.dismiss();
- showWizardStep2Root();
- }
- else
- {
- Toast.makeText(context, "Unable to get root access", Toast.LENGTH_LONG).show();
- view.setEnabled(false);
- }
- }
- });
-
- CheckBox cb1 = (CheckBox)view.findViewById(R.id.CheckBoxConsent);
-
- cb1.setOnCheckedChangeListener(new OnCheckedChangeListener (){
-
- @Override
- public void onCheckedChanged(CompoundButton buttonView,
- boolean isChecked) {
-
- currentDialog.getButton(AlertDialog.BUTTON_NEUTRAL).setEnabled(isChecked);
-
- SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);
-
- Editor pEdit = prefs.edit();
- pEdit.putBoolean("has_root",false);
- pEdit.commit();
-
- }
-
- });
-
-
- showCustomDialog(title, view,context.getString(R.string.btn_next),context.getString(R.string.btn_back),new DialogInterface.OnClickListener() {
-
- @Override
- public void onClick(DialogInterface dialog, int which) {
- dialog.dismiss();
-
- if (which == DialogInterface.BUTTON_NEUTRAL)
- {
- showWizardTipsAndTricks();
- }
- else if (which == DialogInterface.BUTTON_POSITIVE)
- {
- showWizardStep1();
- }
-
- }
- });
-
- currentDialog.getButton(AlertDialog.BUTTON_NEUTRAL).setEnabled(false);
-
-
- }
-
- public void showWizardStep2Root()
- {
-
- String title = null;
- String msg = null;
-
-
-
- title = context.getString(R.string.wizard_permissions_root);
- msg = context.getString(R.string.wizard_premissions_msg_root);
-
-
-
- showDialog(title, msg,context.getString(R.string.btn_next),context.getString(R.string.btn_back),new DialogInterface.OnClickListener() {
-
- @Override
- public void onClick(DialogInterface dialog, int which) {
- dialog.dismiss();
-
- if (which == DialogInterface.BUTTON_NEUTRAL)
- {
- showWizardRootConfigureTorification();
- }
- else if (which == DialogInterface.BUTTON_POSITIVE)
- {
- showWizardStep1();
- }
-
- }
- });
-
-
- }
-
- public void showWizardTipsAndTricks()
- {
-
- String title = context.getString(R.string.wizard_tips_tricks);
-
- LayoutInflater li = LayoutInflater.from(context);
- View view = li.inflate(R.layout.layout_wizard_tips, null);
-
- Button btn1 = (Button)view.findViewById(R.id.WizardRootButtonInstallGibberbot);
-
- btn1.setOnClickListener(new OnClickListener() {
-
- @Override
- public void onClick(View view) {
-
- String url = context.getString(R.string.otrchat_apk_url);
- context.startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse(url)));
-
- }
- });
-
- Button btn2 = (Button)view.findViewById(R.id.WizardRootButtonInstallFirefox);
-
- btn2.setOnClickListener(new OnClickListener() {
-
- @Override
- public void onClick(View view) {
-
- String url = context.getString(R.string.orweb_apk_url);
- context.startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse(url)));
-
- }
- });
-
- Button btn3 = (Button)view.findViewById(R.id.WizardRootButtonInstallProxyMob);
-
- btn3.setOnClickListener(new OnClickListener() {
-
- @Override
- public void onClick(View view) {
-
- showProxyHelp();
-
- }
- });
-
- showCustomDialog(title, view,context.getString(R.string.btn_next),context.getString(R.string.btn_back),new DialogInterface.OnClickListener() {
-
-
-
- @Override
- public void onClick(DialogInterface dialog, int which) {
- dialog.dismiss();
-
- if (which == DialogInterface.BUTTON_NEUTRAL)
- {
- showWizardFinal();
-
- }
- else if (which == DialogInterface.BUTTON_POSITIVE)
- {
- showWizardStep2();
- }
-
- }
- });
- }
-
- public void showWizardRootConfigureTorification()
- {
- /*
- LayoutInflater li = LayoutInflater.from(context);
- View view = li.inflate(R.layout.layout_wizard_root, null);
-
- CheckBox cb1 = (CheckBox)view.findViewById(R.id.WizardRootCheckBox01);
- Button btn1 = (Button)view.findViewById(R.id.WizardRootButton01);
-
- cb1.setOnCheckedChangeListener(new OnCheckedChangeListener (){
-
- @Override
- public void onCheckedChanged(CompoundButton buttonView,
- boolean isChecked) {
-
-
- SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);
-
- Editor pEdit = prefs.edit();
-
- pEdit.putBoolean(PREF_TRANSPARENT, isChecked);
- pEdit.putBoolean(PREF_TRANSPARENT_ALL, isChecked);
-
- pEdit.commit();
-
- //Button btn1 = (Button)buttonView.getParent().findViewById(R.id.WizardRootButton01);
- //btn1.setEnabled(!isChecked);
-
- }
-
- });
-
-
-
- btn1.setOnClickListener(new OnClickListener() {
-
- @Override
- public void onClick(View view) {
-
-
- SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);
-
- Editor pEdit = prefs.edit();
- pEdit.putBoolean(PREF_TRANSPARENT, true);
- pEdit.putBoolean(PREF_TRANSPARENT_ALL, false);
- pEdit.commit();
-
- context.startActivity(new Intent(context, AppManager.class));
-
- }
- });
-
- showCustomDialog(context.getString(R.string.wizard_configure),view,context.getString(R.string.btn_next),context.getString(R.string.btn_back),new DialogInterface.OnClickListener() {
-
- @Override
- public void onClick(DialogInterface dialog, int which) {
-
- dialog.dismiss();
-
- if (which == DialogInterface.BUTTON_NEUTRAL)
- {
- showWizardTipsAndTricks();
-
- }
- else if (which == DialogInterface.BUTTON_POSITIVE)
- {
- showWizardStep2();
- }
-
- }
- });
-
- */
-
- }
-
-
- private void showWizardFinal ()
- {
- String title = null;
- String msg = null;
-
-
- title = context.getString(R.string.wizard_final);
- msg = context.getString(R.string.wizard_final_msg);
-
- new AlertDialog.Builder(context)
- .setIcon(R.drawable.icon)
- .setTitle(title)
- .setPositiveButton(R.string.button_close, null)
- .setMessage(msg)
- .show();
-
-
-
-
-
- }
-
- public void showDialog (String title, String msg, String button1, String button2, DialogInterface.OnClickListener ocListener)
- {
-
-// dialog.setContentView(R.layout.custom_dialog);
-
-
- AlertDialog.Builder builder = new AlertDialog.Builder(context)
- .setIcon(R.drawable.icon)
- .setTitle(title)
- .setMessage(msg)
- .setNeutralButton(button1, ocListener)
- .setPositiveButton(button2, ocListener);
-
-
- currentDialog = builder.show();
-
-
- }
-
- private void showCustomDialog (String title, View view, String button1, String button2, DialogInterface.OnClickListener ocListener)
- {
-
- currentDialog = new AlertDialog.Builder(context)
- .setIcon(R.drawable.icon)
- .setTitle(title)
- .setView(view)
- .setNeutralButton(button1, ocListener)
- .setPositiveButton(button2, ocListener)
- .show();
-
-
- }
-
-
-
- private void showProxyHelp ()
- {
-
- LayoutInflater li = LayoutInflater.from(context);
- View view = li.inflate(R.layout.layout_wizard_proxy_help, null);
-
- new AlertDialog.Builder(context)
- .setTitle(context.getString(R.string.wizard_proxy_help_info))
- .setView(view)
- .show();
- }
-
-}
-
1
0

28 Oct '11
commit 2cc235077ea01dc8c4158814341634600a36aa01
Author: Nathan Freitas <nathan(a)freitas.net>
Date: Mon Jul 25 17:25:49 2011 -0400
updated tor binary segments to 0.2.3.1-alpah
---
res/raw/toraa | Bin 1048576 -> 1048576 bytes
res/raw/torab | Bin 1048576 -> 1048576 bytes
res/raw/torac | Bin 1048576 -> 1048576 bytes
res/raw/torad | Bin 108367 -> 194605 bytes
4 files changed, 0 insertions(+), 0 deletions(-)
diff --git a/res/raw/toraa b/res/raw/toraa
index a522212..e8aac1a 100644
Binary files a/res/raw/toraa and b/res/raw/toraa differ
diff --git a/res/raw/torab b/res/raw/torab
index 3631f9e..c3bca22 100644
Binary files a/res/raw/torab and b/res/raw/torab differ
diff --git a/res/raw/torac b/res/raw/torac
index bb24253..f04ee68 100644
Binary files a/res/raw/torac and b/res/raw/torac differ
diff --git a/res/raw/torad b/res/raw/torad
index 9a88db0..ac4fb03 100644
Binary files a/res/raw/torad and b/res/raw/torad differ
1
0

[orbot/master] fixes geoip settings, and other small server config changes
by n8fr8@torproject.org 28 Oct '11
by n8fr8@torproject.org 28 Oct '11
28 Oct '11
commit a2d41e4f790ffc04fe65ab922fdcc6394924ddfa
Author: Nathan Freitas <nathan(a)freitas.net>
Date: Fri Oct 28 00:29:57 2011 -0400
fixes geoip settings, and other small server config changes
---
.../android/service/TorBinaryInstaller.java | 56 ++++++++-----------
src/org/torproject/android/service/TorService.java | 56 ++++++++++----------
.../android/service/TorServiceConstants.java | 7 ++-
.../android/service/TorServiceUtils.java | 44 +++-------------
.../torproject/android/service/TorTransProxy.java | 6 +-
5 files changed, 66 insertions(+), 103 deletions(-)
diff --git a/src/org/torproject/android/service/TorBinaryInstaller.java b/src/org/torproject/android/service/TorBinaryInstaller.java
index ba6ab3f..72f4ad3 100644
--- a/src/org/torproject/android/service/TorBinaryInstaller.java
+++ b/src/org/torproject/android/service/TorBinaryInstaller.java
@@ -13,6 +13,7 @@ import java.util.zip.ZipEntry;
import java.util.zip.ZipFile;
import org.torproject.android.R;
+import org.torproject.android.TorConstants;
import android.content.Context;
import android.util.Log;
@@ -34,43 +35,34 @@ public class TorBinaryInstaller implements TorServiceConstants {
/*
* Extract the Tor binary from the APK file using ZIP
*/
- public boolean installFromRaw ()
+ public boolean installFromRaw () throws IOException
{
- boolean result = false;
-
- try
- {
- InputStream is;
-
- is = context.getResources().openRawResource(R.raw.toraa);
- streamToFile(is,installFolder, TOR_BINARY_ASSET_KEY, false);
-
- is = context.getResources().openRawResource(R.raw.torab);
- streamToFile(is,installFolder, TOR_BINARY_ASSET_KEY, true);
+ InputStream is;
- is = context.getResources().openRawResource(R.raw.torac);
- streamToFile(is,installFolder, TOR_BINARY_ASSET_KEY, true);
-
- is = context.getResources().openRawResource(R.raw.torad);
- streamToFile(is,installFolder, TOR_BINARY_ASSET_KEY, true);
-
- is = context.getResources().openRawResource(R.raw.torrc);
- streamToFile(is,installFolder, TORRC_ASSET_KEY, false);
+ is = context.getResources().openRawResource(R.raw.toraa);
+ streamToFile(is,installFolder, TOR_BINARY_ASSET_KEY, false);
+
+ is = context.getResources().openRawResource(R.raw.torab);
+ streamToFile(is,installFolder, TOR_BINARY_ASSET_KEY, true);
- is = context.getResources().openRawResource(R.raw.privoxy);
- streamToFile(is,installFolder, PRIVOXY_ASSET_KEY, false);
+ is = context.getResources().openRawResource(R.raw.torac);
+ streamToFile(is,installFolder, TOR_BINARY_ASSET_KEY, true);
- is = context.getResources().openRawResource(R.raw.privoxy_config);
- streamToFile(is,installFolder, PRIVOXYCONFIG_ASSET_KEY, false);
+ is = context.getResources().openRawResource(R.raw.torad);
+ streamToFile(is,installFolder, TOR_BINARY_ASSET_KEY, true);
+
+ is = context.getResources().openRawResource(R.raw.torrc);
+ streamToFile(is,installFolder, TORRC_ASSET_KEY, false);
- }
- catch (IOException ioe)
- {
- Log.e(TAG, "unable to install tor binaries from raw", ioe);
- return false;
- }
-
+ is = context.getResources().openRawResource(R.raw.privoxy);
+ streamToFile(is,installFolder, PRIVOXY_ASSET_KEY, false);
+
+ is = context.getResources().openRawResource(R.raw.privoxy_config);
+ streamToFile(is,installFolder, PRIVOXYCONFIG_ASSET_KEY, false);
+
+ is = context.getResources().openRawResource(R.raw.geoip);
+ streamToFile(is,installFolder, GEOIP_ASSET_KEY, false);
return true;
}
@@ -132,7 +124,7 @@ public class TorBinaryInstaller implements TorServiceConstants {
} catch (IOException ex) {
- Log.e(TAG, "error copying binary", ex);
+ Log.e(TorConstants.TAG, "error copying binary", ex);
}
}
diff --git a/src/org/torproject/android/service/TorService.java b/src/org/torproject/android/service/TorService.java
index 0f9cee3..70b7c9c 100644
--- a/src/org/torproject/android/service/TorService.java
+++ b/src/org/torproject/android/service/TorService.java
@@ -17,12 +17,12 @@ import net.freehaven.tor.control.ConfigEntry;
import net.freehaven.tor.control.EventHandler;
import net.freehaven.tor.control.TorControlConnection;
-import org.torproject.android.AppManager;
import org.torproject.android.Orbot;
-import org.torproject.android.ProcessSettingsAsyncTask;
import org.torproject.android.R;
import org.torproject.android.TorConstants;
import org.torproject.android.Utils;
+import org.torproject.android.settings.AppManager;
+import org.torproject.android.settings.ProcessSettingsAsyncTask;
import android.app.AlertDialog;
import android.app.Notification;
@@ -40,7 +40,7 @@ import android.os.RemoteException;
import android.preference.PreferenceManager;
import android.util.Log;
-public class TorService extends Service implements TorServiceConstants, Runnable, EventHandler
+public class TorService extends Service implements TorServiceConstants, TorConstants, Runnable, EventHandler
{
public static boolean ENABLE_DEBUG_LOG = false;
@@ -516,24 +516,14 @@ public class TorService extends Service implements TorServiceConstants, Runnable
private boolean setupTransProxy (boolean activate) throws Exception
{
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(this);
- boolean hasRoot;
+
+ boolean hasRoot = prefs.getBoolean(PREF_HAS_ROOT,false);
- if (prefs.contains("has_root"))
- {
- hasRoot = prefs.getBoolean("has_root",false);
- }
- else
+ if (!hasRoot)
{
- hasRoot = TorServiceUtils.checkRootAccess();
- Editor pEdit = prefs.edit();
- pEdit.putBoolean("has_root",hasRoot);
- pEdit.commit();
+
}
-
- if (!hasRoot)
- return false;
-
- if (activate)
+ else if (activate)
{
boolean enableTransparentProxy = prefs.getBoolean("pref_transparent", false);
@@ -748,7 +738,7 @@ public class TorService extends Service implements TorServiceConstants, Runnable
{
logNotice( "Connecting to control port: " + TOR_CONTROL_PORT);
- String baseMessage = getString(R.string.tor_process_connecting);
+ String baseMessage = getString(R.string.tor_process_starting);
sendCallbackStatusMessage(baseMessage);
torConnSocket = new Socket(IP_LOCALHOST, TOR_CONTROL_PORT);
@@ -756,7 +746,6 @@ public class TorService extends Service implements TorServiceConstants, Runnable
// conn.authenticate(new byte[0]); // See section 3.2
- sendCallbackStatusMessage(getString(R.string.tor_process_connecting_step2));
logNotice( "SUCCESS connected to control port");
@@ -772,7 +761,7 @@ public class TorService extends Service implements TorServiceConstants, Runnable
logNotice( "SUCCESS authenticated to control port");
- sendCallbackStatusMessage(getString(R.string.tor_process_connecting_step2) + getString(R.string.tor_process_connecting_step3));
+ sendCallbackStatusMessage(getString(R.string.tor_process_starting) + ' ' + getString(R.string.tor_process_complete));
addEventHandler();
@@ -785,7 +774,7 @@ public class TorService extends Service implements TorServiceConstants, Runnable
conn = null;
Log.d(TAG,"Attempt: Error connecting to control port: " + ce.getLocalizedMessage(),ce);
- sendCallbackStatusMessage(getString(R.string.tor_process_connecting_step4));
+ sendCallbackStatusMessage(getString(R.string.tor_process_waiting));
Thread.sleep(1000);
@@ -910,14 +899,14 @@ public class TorService extends Service implements TorServiceConstants, Runnable
if (msg.indexOf(TOR_CONTROL_PORT_MSG_BOOTSTRAP_DONE)!=-1)
{
currentStatus = STATUS_ON;
+ showToolbarNotification (getString(R.string.status_activated),NOTIFY_ID,R.drawable.tornotificationon);
getHiddenServiceHostname ();
}
-
-
- showToolbarNotification (getString(R.string.status_activated),NOTIFY_ID,R.drawable.tornotificationon);
+
+
sendCallbackStatusMessage (msg);
@@ -1273,7 +1262,6 @@ public class TorService extends Service implements TorServiceConstants, Runnable
private boolean applyPreferences () throws RemoteException
{
-
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(this);
ENABLE_DEBUG_LOG = prefs.getBoolean("pref_enable_logging",false);
@@ -1284,9 +1272,7 @@ public class TorService extends Service implements TorServiceConstants, Runnable
//boolean autoUpdateBridges = prefs.getBoolean(TorConstants.PREF_BRIDGES_UPDATED, false);
boolean becomeRelay = prefs.getBoolean(TorConstants.PREF_OR, false);
-
boolean ReachableAddresses = prefs.getBoolean(TorConstants.PREF_REACHABLE_ADDRESSES,false);
-
boolean enableHiddenServices = prefs.getBoolean("pref_hs_enable", false);
boolean enableStrictNodes = prefs.getBoolean("pref_strict_nodes", false);
@@ -1294,6 +1280,18 @@ public class TorService extends Service implements TorServiceConstants, Runnable
String exitNodes = prefs.getString("pref_exit_nodes", null);
String excludeNodes = prefs.getString("pref_exclude_nodes", null);
+ String proxyType = prefs.getString("pref_proxy_type", null);
+ if (proxyType != null)
+ {
+ String proxyHost = prefs.getString("pref_proxy_host", null);
+ String proxyPort = prefs.getString("pref_proxy_port", null);
+
+ if (proxyHost != null && proxyPort != null)
+ {
+ mBinder.updateConfiguration(proxyType + "Proxy", proxyHost + ':' + proxyPort, false);
+ }
+ }
+
if (currentStatus == STATUS_ON)
{
//reset iptables rules in active mode
@@ -1308,6 +1306,8 @@ public class TorService extends Service implements TorServiceConstants, Runnable
}
}
+ File fileGeoIP = new File(appBinHome,"geoip");
+ mBinder.updateConfiguration("GeoIPFile", fileGeoIP.getAbsolutePath(), false);
mBinder.updateConfiguration("EntryNodes", entranceNodes, false);
mBinder.updateConfiguration("ExitNodes", exitNodes, false);
mBinder.updateConfiguration("ExcludeNodes", excludeNodes, false);
diff --git a/src/org/torproject/android/service/TorServiceConstants.java b/src/org/torproject/android/service/TorServiceConstants.java
index 4f58dde..759d0ce 100644
--- a/src/org/torproject/android/service/TorServiceConstants.java
+++ b/src/org/torproject/android/service/TorServiceConstants.java
@@ -4,11 +4,9 @@ package org.torproject.android.service;
public interface TorServiceConstants {
- public final static String TAG = "ORBOT";
public final static String TOR_APP_USERNAME = "org.torproject.android";
- public final static String ASSETS_BASE = "assets/";
//home directory of Android application
@@ -27,7 +25,10 @@ public interface TorServiceConstants {
//privoxy.config
public final static String PRIVOXYCONFIG_ASSET_KEY = "privoxy.config";
-
+
+ //geoip data file asset key
+ public final static String GEOIP_ASSET_KEY = "geoip";
+
//various console cmds
public final static String SHELL_CMD_CHMOD = "chmod";
public final static String SHELL_CMD_KILL = "kill -9";
diff --git a/src/org/torproject/android/service/TorServiceUtils.java b/src/org/torproject/android/service/TorServiceUtils.java
index 657d525..51d6378 100644
--- a/src/org/torproject/android/service/TorServiceUtils.java
+++ b/src/org/torproject/android/service/TorServiceUtils.java
@@ -9,47 +9,15 @@ import java.io.InputStreamReader;
import java.io.OutputStreamWriter;
import java.util.StringTokenizer;
+import org.torproject.android.TorConstants;
+
import android.util.Log;
public class TorServiceUtils implements TorServiceConstants {
- /**
- * Check if we have root access
- * @return boolean true if we have root
- */
- /*
- public static boolean checkRootAccess() {
-
-
-
- StringBuilder log = new StringBuilder();
-
- try {
-
- // Run an empty script just to check root access
- String[] cmd = {"exit 0"};
- int exitCode = TorServiceUtils.doShellCommand(cmd, log, true, true);
- if (exitCode == 0) {
-
- return true;
- }
-
- } catch (IOException e) {
- //this means that there is no root to be had (normally) so we won't log anything
- TorService.logException("Error checking for root access",e);
-
- }
- catch (Exception e) {
- TorService.logException("Error checking for root access",e);
- //this means that there is no root to be had (normally)
- }
-
- TorService.logMessage("Could not acquire root permissions");
- return false;
- }
- */
- public static boolean checkRootAccess(){
+ public static boolean isRootPossible()
+ {
StringBuilder log = new StringBuilder();
@@ -79,6 +47,8 @@ public class TorServiceUtils implements TorServiceConstants {
}
TorService.logMessage("Could not acquire root permissions");
+
+
return false;
}
@@ -102,7 +72,7 @@ public class TorServiceUtils implements TorServiceConstants {
}
catch (Exception e2)
{
- Log.w(TAG,"Unable to get proc id for: " + command,e2);
+ Log.w(TorConstants.TAG,"Unable to get proc id for: " + command,e2);
}
}
diff --git a/src/org/torproject/android/service/TorTransProxy.java b/src/org/torproject/android/service/TorTransProxy.java
index de8ea83..2c1119a 100644
--- a/src/org/torproject/android/service/TorTransProxy.java
+++ b/src/org/torproject/android/service/TorTransProxy.java
@@ -2,16 +2,16 @@ package org.torproject.android.service;
import java.io.File;
-import org.torproject.android.TorifiedApp;
+import org.torproject.android.TorConstants;
+import org.torproject.android.settings.TorifiedApp;
import android.content.Context;
import android.util.Log;
public class TorTransProxy implements TorServiceConstants {
- private final static String TAG = TorServiceConstants.TAG;
+ private final static String TAG = TorConstants.TAG;
-
public static int purgeIptables(Context context) throws Exception {
1
0
commit def974fa958c44d930047fb48122f472d4fe0301
Author: Nathan Freitas <nathan(a)freitas.net>
Date: Fri Oct 28 00:31:26 2011 -0400
updated layout, strings, and graphics
---
res/drawable/ic_launcher_gibberbot.png | Bin 7527 -> 6365 bytes
res/drawable/tor.png | Bin 6682 -> 4766 bytes
res/drawable/warning.png | Bin 2922 -> 2735 bytes
res/layout/layout_wizard_permissions.xml | 39 +++++++++++-----
res/layout/layout_wizard_tips.xml | 37 +++++++++++----
res/layout/scrollingtext_buttons_view.xml | 18 +++-----
res/values-ar/strings.xml | 5 --
res/values-ca/strings.xml | 4 --
res/values-de/strings.xml | 4 --
res/values-es/strings.xml | 4 --
res/values-fa/strings.xml | 4 --
res/values-mk/strings.xml | 4 --
res/values-nb/strings.xml | 4 --
res/values-nl/strings.xml | 4 --
res/values-pl/strings.xml | 5 --
res/values-pt/strings.xml | 4 --
res/values-ru/strings.xml | 4 --
res/values-sv/strings.xml | 4 --
res/values-zh/strings.xml | 4 --
res/values/strings.xml | 69 ++++++++++++++++++-----------
res/xml/preferences.xml | 26 +++++++++++
21 files changed, 129 insertions(+), 114 deletions(-)
diff --git a/res/drawable/ic_launcher_gibberbot.png b/res/drawable/ic_launcher_gibberbot.png
index e409910..24835a2 100644
Binary files a/res/drawable/ic_launcher_gibberbot.png and b/res/drawable/ic_launcher_gibberbot.png differ
diff --git a/res/drawable/tor.png b/res/drawable/tor.png
index ace8631..0d63dd9 100644
Binary files a/res/drawable/tor.png and b/res/drawable/tor.png differ
diff --git a/res/drawable/warning.png b/res/drawable/warning.png
index 42dc6d6..f5371dc 100644
Binary files a/res/drawable/warning.png and b/res/drawable/warning.png differ
diff --git a/res/layout/layout_wizard_permissions.xml b/res/layout/layout_wizard_permissions.xml
index 1ba5fec..1327f15 100644
--- a/res/layout/layout_wizard_permissions.xml
+++ b/res/layout/layout_wizard_permissions.xml
@@ -7,23 +7,36 @@
<RelativeLayout
android:layout_width="fill_parent"
- android:layout_height="wrap_content"
+ android:layout_height="70sp"
android:id="@+id/relativeLayout1"
- android:layout_gravity="center_horizontal"
- android:background="#000000">
-
- <TextView android:textSize="10pt"
+ android:layout_gravity="center_vertical|center_horizontal"
+ android:background="#000000"
+ >
+ <ImageView
+ android:src="@drawable/icon"
+ android:id="@+id/orbot_image"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_alignParentLeft="true"
+ android:paddingLeft="20sp" >
+ </ImageView>
+ <TextView
android:textColor="#FFFFFF"
- android:layout_alignParentTop="true"
- android:layout_height="wrap_content"
+ android:textSize="10pt"
+ android:layout_toRightOf="@id/orbot_image"
+ android:gravity="center_vertical"
+ android:layout_height="fill_parent"
android:id="@+id/WizardTextTitle"
android:layout_width="wrap_content"
android:fadingEdge="vertical"
- android:text="TITLE"
+ android:text="TITLE"
android:singleLine="true"
- android:padding="20px" android:layout_centerInParent="true">
+ android:layout_centerInParent="true"
+ android:paddingLeft="5sp"
+ >
</TextView>
- </RelativeLayout>
+ </RelativeLayout>
+
<TableLayout android:id="@+id/TableLayout01" android:stretchColumns="*" android:layout_height="fill_parent" android:layout_width="wrap_content">
<TableRow android:layout_margin="10dip" android:id="@+id/TableRow01" android:layout_weight="1" android:layout_width="fill_parent" android:layout_height="fill_parent">
@@ -37,9 +50,9 @@
>
<LinearLayout android:background="#575757" android:layout_width="wrap_content" android:id="@+id/linearLayout1" android:layout_height="wrap_content" android:orientation="vertical">
<TextView android:layout_width="wrap_content" android:textColor="#ffffff" android:layout_height="wrap_content" android:textSize="8pt" android:id="@+id/WizardTextBody1" android:text="this is sample text this is sample textthis is sample textthis is sample textthis is sample textthis is sample textthis is sample textthis is sample textthis is sample textthis is sample textthis is sample textthis is sample textthis is sample textthis is sample textthis is sample textthis is sample textthis is sample textthis is sample textthis is sample textthis is sample text" android:padding="20dip"></TextView>
- <Button android:layout_width="wrap_content" android:visibility="gone" android:layout_height="wrap_content" android:gravity="center" android:text="Grant Permission" android:id="@+id/grantPermissions" android:layout_gravity="center"></Button>
- <TextView android:layout_width="wrap_content" android:visibility="gone" android:textColor="#ffffff" android:layout_height="wrap_content" android:textSize="8pt" android:id="@+id/WizardTextBody2" android:text="this is sample text this is sample textthis is sample textthis is sample textthis is sample textthis is sample textthis is sample textthis is sample textthis is sample textthis is sample textthis is sample textthis is sample textthis is sample textthis is sample textthis is sample textthis is sample textthis is sample textthis is sample textthis is sample textthis is sample text" android:padding="20dip"></TextView>
- <CheckBox android:id="@+id/checkBox" android:layout_gravity="center" android:text="@string/wizard_permissions_consent" android:layout_height="wrap_content" android:layout_width="wrap_content" android:gravity="center" android:visibility="visible"></CheckBox>
+ <Button android:layout_width="wrap_content" android:visibility="gone" android:layout_height="wrap_content" android:gravity="center" android:text="@string/button_grant_superuser" android:id="@+id/grantPermissions" android:layout_gravity="center"></Button>
+ <TextView android:layout_width="wrap_content" android:layout_gravity="left" android:visibility="gone" android:textColor="#ffffff" android:layout_height="wrap_content" android:textSize="8pt" android:id="@+id/WizardTextBody2" android:text="this is sample text this is sample textthis is sample textthis is sample textthis is sample textthis is sample textthis is sample textthis is sample textthis is sample textthis is sample textthis is sample textthis is sample textthis is sample textthis is sample textthis is sample textthis is sample textthis is sample textthis is sample textthis is sample textthis is sample text" android:padding="20dip"></TextView>
+ <CheckBox android:id="@+id/checkBox" android:layout_gravity="left" android:text="@string/wizard_permissions_consent" android:layout_height="wrap_content" android:layout_width="wrap_content" android:gravity="center" android:visibility="visible"></CheckBox>
</LinearLayout>
</ScrollView>
diff --git a/res/layout/layout_wizard_tips.xml b/res/layout/layout_wizard_tips.xml
index 17ddb88..0a7f07b 100644
--- a/res/layout/layout_wizard_tips.xml
+++ b/res/layout/layout_wizard_tips.xml
@@ -5,24 +5,38 @@
android:layout_width="fill_parent"
android:layout_height="fill_parent">
+
<RelativeLayout
android:layout_width="fill_parent"
- android:layout_height="wrap_content"
+ android:layout_height="70sp"
android:id="@+id/relativeLayout1"
- android:layout_gravity="center_horizontal"
- android:background="#000000">
- <TextView android:textSize="10pt"
+ android:layout_gravity="center_vertical|center_horizontal"
+ android:background="#000000"
+ >
+ <ImageView
+ android:src="@drawable/warning"
+ android:id="@+id/orbot_image"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_alignParentLeft="true"
+ android:paddingLeft="20sp" >
+ </ImageView>
+ <TextView
android:textColor="#FFFFFF"
- android:layout_alignParentTop="true"
- android:layout_height="wrap_content"
+ android:textSize="10pt"
+ android:layout_toRightOf="@id/orbot_image"
+ android:gravity="center_vertical"
+ android:layout_height="fill_parent"
android:id="@+id/WizardTextTitle"
android:layout_width="wrap_content"
android:fadingEdge="vertical"
- android:text="TITLE"
+ android:text="TITLE"
android:singleLine="true"
- android:padding="20px" android:layout_centerInParent="true">
+ android:layout_centerInParent="true"
+ android:paddingLeft="5sp"
+ >
</TextView>
- </RelativeLayout>
+ </RelativeLayout>
<TableLayout android:id="@+id/TableLayout01" android:stretchColumns="*" android:layout_height="fill_parent" android:layout_width="wrap_content">
<TableRow android:layout_margin="10dip" android:id="@+id/TableRow01" android:layout_weight="1" android:layout_width="fill_parent" android:layout_height="fill_parent">
@@ -43,12 +57,15 @@
>
<TextView android:text="@string/wizard_tips_msg" android:layout_width="wrap_content" android:textColor="#ffffff" android:layout_height="wrap_content" android:textSize="8pt" android:id="@+id/WizardTextBody1" android:padding="20dip"></TextView>
+<Button android:text="@string/wizard_tips_orweb" android:layout_gravity="left" android:drawableLeft="@drawable/icon_orweb" android:layout_marginTop="10px" android:id="@+id/WizardRootButtonInstallOrweb" android:layout_width="wrap_content" android:layout_height="wrap_content"/>
+
<Button android:text="@string/wizard_tips_gibberbot" android:layout_gravity="left" android:drawableLeft="@drawable/ic_launcher_gibberbot" android:layout_marginTop="10px" android:id="@+id/WizardRootButtonInstallGibberbot" android:layout_width="wrap_content" android:layout_height="wrap_content"/>
+<!--
<Button android:text="@string/wizard_tips_firefox" android:layout_gravity="left" android:drawableLeft="@drawable/icon_firefox" android:layout_marginTop="10px" android:id="@+id/WizardRootButtonInstallFirefox" android:layout_width="wrap_content" android:layout_height="wrap_content"/>
<Button android:text="@string/wizard_tips_proxymob" android:layout_marginTop="10px" android:drawableLeft="@drawable/proxymob" android:id="@+id/WizardRootButtonInstallProxyMob" android:layout_width="wrap_content" android:layout_height="wrap_content"/>
-
+ -->
</LinearLayout>
</ScrollView>
diff --git a/res/layout/scrollingtext_buttons_view.xml b/res/layout/scrollingtext_buttons_view.xml
index df59922..815f864 100644
--- a/res/layout/scrollingtext_buttons_view.xml
+++ b/res/layout/scrollingtext_buttons_view.xml
@@ -8,9 +8,9 @@
<RelativeLayout
android:layout_width="fill_parent"
- android:layout_height="wrap_content"
+ android:layout_height="70sp"
android:id="@+id/relativeLayout1"
- android:layout_gravity="center_horizontal"
+ android:layout_gravity="center_vertical|center_horizontal"
android:background="#000000"
>
<ImageView
@@ -19,29 +19,25 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
- android:paddingLeft="20px" android:layout_marginLeft="10dip" android:layout_marginTop="8dip">
+ android:paddingLeft="20sp" >
</ImageView>
<TextView
android:textColor="#FFFFFF"
android:textSize="10pt"
android:layout_toRightOf="@id/orbot_image"
- android:layout_alignParentTop="true"
android:gravity="center_vertical"
- android:layout_height="wrap_content"
+ android:layout_height="fill_parent"
android:id="@+id/WizardTextTitle"
android:layout_width="wrap_content"
android:fadingEdge="vertical"
android:text="TITLE"
android:singleLine="true"
-
-
-
android:layout_centerInParent="true"
- android:paddingLeft="5px"
- android:padding="20px"
+ android:paddingLeft="5sp"
>
</TextView>
- </RelativeLayout>
+ </RelativeLayout>
+
<TableLayout android:id="@+id/TableLayout01" android:stretchColumns="*" android:layout_height="fill_parent" android:layout_width="wrap_content" >
<TableRow android:id="@+id/TableRow01" android:layout_weight="1" android:layout_width="fill_parent" android:layout_height="fill_parent" android:layout_margin="10dip">
diff --git a/res/values-ar/strings.xml b/res/values-ar/strings.xml
index a4e22a2..621fc3d 100644
--- a/res/values-ar/strings.xml
+++ b/res/values-ar/strings.xml
@@ -14,11 +14,6 @@
<string name="status_disabled">"تم إيقاف اوربوت</string>
<string name="status_shutting_down">جاري إغلاق اوربوت</string>
-<string name="tor_process_connecting">بدء تور...</string>
-<string name="tor_process_connecting_step2">ضبط التحكم...</string>
-<string name="tor_process_connecting_step3">مكتمل.</string>
-<string name="tor_process_connecting_step4">انتظار.</string>
-
<string name="not_anonymous_yet">تحذير: حركة مرورك ليست خفية الى الآن! من فضلك قم بتكوين التطبيقات الخاصة بك لإستخدام HTTP proxy 127.0.0.1:8118 أو SOCK4A أو SOKS5 127.0.0.1:9050</string>
<string name="menu_home">الصفحة الرئيسية</string>
<string name="menu_browse">تصفّح</string>
diff --git a/res/values-ca/strings.xml b/res/values-ca/strings.xml
index c6d6321..e863ec9 100644
--- a/res/values-ca/strings.xml
+++ b/res/values-ca/strings.xml
@@ -14,10 +14,6 @@
<string name="status_disabled">Orbot està desactivat</string>
<string name="status_shutting_down">Orbot s\'està aturant</string>
-<string name="tor_process_connecting">Iniciant Tor...</string>
-<string name="tor_process_connecting_step2">Preparant el control...</string>
-<string name="tor_process_connecting_step3">acomplert.</string>
-<string name="tor_process_connecting_step4">esperant.</string>
<string name="not_anonymous_yet">ATENCIÓ : El trànsit de la teva connexió ja no es anònim! Siusplau, configura les teves aplicacions per a usar HTTP proxy 127.0.0.1:8118, per SOCKS4A o SOCKS5 proxy 127.0.0.1:9050</string>
<string name="menu_home">Lloc d\'inici</string>
diff --git a/res/values-de/strings.xml b/res/values-de/strings.xml
index 039062b..2d5a566 100644
--- a/res/values-de/strings.xml
+++ b/res/values-de/strings.xml
@@ -14,10 +14,6 @@
<string name="status_disabled">"Orbot ist deaktiviert</string>
<string name="status_shutting_down">Orbot wird beendet</string>
-<string name="tor_process_connecting">Starte Tor...</string>
-<string name="tor_process_connecting_step2">Baue Kontrollverbindung auf...</string>
-<string name="tor_process_connecting_step3">erfolgreich abgeschlossen.</string>
-<string name="tor_process_connecting_step4">warte.</string>
<string name="not_anonymous_yet">WARNUNG: Die Verbindung ist noch nicht anonymisiert! Bitte stellen Sie Ihre Programme so ein, dass sie entwederden HTTP proxy 127.0.0.1:8118, SOCKS4A oder SOCKS proxy 127.0.0.1:9050 nutzen.</string>
<string name="menu_home">Home</string>
diff --git a/res/values-es/strings.xml b/res/values-es/strings.xml
index 9b9768d..c588f1c 100644
--- a/res/values-es/strings.xml
+++ b/res/values-es/strings.xml
@@ -14,10 +14,6 @@
<string name="status_disabled">"Orbot está desactivado</string>
<string name="status_shutting_down">Orbot se está cerrando</string>
-<string name="tor_process_connecting">Iniciando Tor...</string>
-<string name="tor_process_connecting_step2">Configurción de control...</string>
-<string name="tor_process_connecting_step3">completo.</string>
-<string name="tor_process_connecting_step4">esperando.</string>
<string name="not_anonymous_yet">ADVERTENCIA: ¡Su tráfico no es anónimo aún! Por favor, configure sus aplicaciones para usar el Proxy HTTP 127.0.0.1:8118, el SOCKS4A o el Proxy SOCKS5 127.0.0.1:9050</string>
<string name="menu_home">Principal</string>
diff --git a/res/values-fa/strings.xml b/res/values-fa/strings.xml
index cd52e7d..466b02a 100644
--- a/res/values-fa/strings.xml
+++ b/res/values-fa/strings.xml
@@ -14,10 +14,6 @@
<string name="status_disabled">اوربات غیرفعال شده است.</string>
<string name="status_shutting_down">اوربات در حال بسته شدن است.</string>
-<string name="tor_process_connecting">شروع تُر ...</string>
-<string name="tor_process_connecting_step2">راه اندازی نظارت...</string>
-<string name="tor_process_connecting_step3">كامل شد.</string>
-<string name="tor_process_connecting_step4">در انتظار.</string>
<string name="not_anonymous_yet">هشدار: فعالیت شما هنوز "گمنام" نیست! لطفن اپلیکیشن خود را تنظیم کنید تا از HTTP پروکسی 127.0.0.1:8118 و یا SOCKS4A و یا SOCKS5 پروکسی 127.0.01:9050 استفاده کند.</string>
<string name="menu_home">خانه</string>
diff --git a/res/values-mk/strings.xml b/res/values-mk/strings.xml
index 4d1454d..c4bf305 100644
--- a/res/values-mk/strings.xml
+++ b/res/values-mk/strings.xml
@@ -14,10 +14,6 @@
<string name="status_disabled">"Орбот е дезактивиран</string>
<string name="status_shutting_down">Орбот се исклучува</string>
-<string name="tor_process_connecting">Вклучување на Тор...</string>
-<string name="tor_process_connecting_step2">Воспоставување контрола...</string>
-<string name="tor_process_connecting_step3">готово.</string>
-<string name="tor_process_connecting_step4">чекање.</string>
<string name="not_anonymous_yet">ВНИМАНИЕ: Вашиот сообраќај сеуште не е анонимен! Треба да ги конфигурирате Вашите апликации да го користат проксито за HTTP, 127.0.0.1:8118, или проксито за SOCKS4A или SOCKS5, 127.0.0.1:9050</string>
<string name="menu_home">Дома</string>
diff --git a/res/values-nb/strings.xml b/res/values-nb/strings.xml
index 1bc5d65..5059bf7 100644
--- a/res/values-nb/strings.xml
+++ b/res/values-nb/strings.xml
@@ -14,10 +14,6 @@
<string name="status_disabled">"Orbot er deaktivert</string>
<string name="status_shutting_down">Orbot skrur seg av</string>
-<string name="tor_process_connecting">Starter Tor...</string>
-<string name="tor_process_connecting_step2">autentiserer kontrolltilkobling...</string>
-<string name="tor_process_connecting_step3">ferdig.</string>
-<string name="tor_process_connecting_step4">venter.</string>
<string name="not_anonymous_yet">ADVARSEL: Trafikken din er ikke anonym helt enda! Vær vennlig og konfigurer applikasjonene dine til å bruke HTTP proxy 127.0.0.1:8118 eller SOCKS4A eller SOCKS5 proxy 127.0.0.1:9050</string>
<string name="menu_home">Hjem</string>
diff --git a/res/values-nl/strings.xml b/res/values-nl/strings.xml
index 1d4dfb4..28b27fe 100644
--- a/res/values-nl/strings.xml
+++ b/res/values-nl/strings.xml
@@ -14,10 +14,6 @@
<string name="status_disabled">Orbot is uitgeschakeld</string>
<string name="status_shutting_down">Orbot is aan het afsluiten</string>
-<string name="tor_process_connecting">Bezig met opstarten van Tor...</string>
-<string name="tor_process_connecting_step2">Bezig met instellen aansturing</string>
-<string name="tor_process_connecting_step3">klaar.</string>
-<string name="tor_process_connecting_step4">aan het wachten.</string>
<string name="not_anonymous_yet">WAARSCHUWING: Uw verkeer is nog niet anononiem! Stel uw programma\'s alstublieft in dat ze gebruik maken van HTTP proxy 127.0.0.1:8118 of SOCKS4A of SOCKS5 proxy 127.0.0.1:9050</string>
<string name="menu_home">Thuis</string>
diff --git a/res/values-pl/strings.xml b/res/values-pl/strings.xml
index 7b42d3f..5925f29 100644
--- a/res/values-pl/strings.xml
+++ b/res/values-pl/strings.xml
@@ -14,11 +14,6 @@
<string name="status_disabled">Orbot wyłączony</string>
<string name="status_shutting_down">Orbot wyłącza się</string>
-<string name="tor_process_connecting">Tor startuje...</string>
-<string name="tor_process_connecting_step2">Ustawianie sterowania...</string>
-<string name="tor_process_connecting_step3">zakończono.</string>
-<string name="tor_process_connecting_step4">oczekiwanie.</string>
-
<string name="not_anonymous_yet">UWAGA: Twoja komunikacja nie jest jeszcze anonimowa! Proszę skonfiguruj aplikacje aby używały serwera proxy HTTP 127.0.0.1:8118 lub SOCKS4A lub SOCKS5 127.0.0.1:9050</string>
<string name="menu_home">Start</string>
<string name="menu_browse">Przeglądaj</string>
diff --git a/res/values-pt/strings.xml b/res/values-pt/strings.xml
index 7925730..d82dac3 100644
--- a/res/values-pt/strings.xml
+++ b/res/values-pt/strings.xml
@@ -13,10 +13,6 @@
<string name="status_disabled">"Orbot está Desactivado</string>
<string name="status_shutting_down">Orbot a encerrar</string>
-<string name="tor_process_connecting">A iniciar Tor...</string>
-<string name="tor_process_connecting_step2">a autenticar a ligação de controlo...</string>
-<string name="tor_process_connecting_step3">completo.</string>
-<string name="tor_process_connecting_step4">a aguardar.</string>
<string name="not_anonymous_yet">ATENÇÃO: A sua ligação ainda não é anónima! Por favor configure as suas aplicações para utilizarem o proxy HTTP 127.0.0.1:8118 ou o proxy SOCKS4A ou SOCKS5 127.0.0.1:9050</string>
<string name="menu_home">Início</string>
diff --git a/res/values-ru/strings.xml b/res/values-ru/strings.xml
index 1b66df4..67057b5 100644
--- a/res/values-ru/strings.xml
+++ b/res/values-ru/strings.xml
@@ -14,10 +14,6 @@
<string name="status_disabled">"Orbot Отключен</string>
<string name="status_shutting_down">Orbot выключается</string>
-<string name="tor_process_connecting">Запуск Tor...</string>
-<string name="tor_process_connecting_step2">Настройка управления...</string>
-<string name="tor_process_connecting_step3">готово.</string>
-<string name="tor_process_connecting_step4">ожидание.</string>
<string name="not_anonymous_yet">ВНИМАНИЕ! Ваш поток данных еще не анонимен! Пожалуйста, настройте свои приложения на использование HTTP прокси 127.0.0.1:8118 или SOCKS4A или SOCKS5 прокси 127.0.0.1:9050</string>
<string name="menu_home">Домашняя страница</string>
diff --git a/res/values-sv/strings.xml b/res/values-sv/strings.xml
index 5d5be5b..97b6925 100644
--- a/res/values-sv/strings.xml
+++ b/res/values-sv/strings.xml
@@ -14,10 +14,6 @@
<string name="status_disabled">"Orbot är inaktiverad</string>
<string name="status_shutting_down">Orbot avslutas</string>
-<string name="tor_process_connecting">Startar Tor...</string>
-<string name="tor_process_connecting_step2">verifierar kontroll uppkopplingen...</string>
-<string name="tor_process_connecting_step3">klar.</string>
-<string name="tor_process_connecting_step4">väntar.</string>
<string name="not_anonymous_yet">VARNING: Din trafik är inte anonym än! Vänligen konfigurera dina apps att använda HTTP proxy 127.0.0.1:8118 eller SOCKS4A/5 proxy 127.0.0.1:9050</string>
<string name="menu_home">Hem</string>
diff --git a/res/values-zh/strings.xml b/res/values-zh/strings.xml
index 0354e0d..ebf38ad 100644
--- a/res/values-zh/strings.xml
+++ b/res/values-zh/strings.xml
@@ -14,10 +14,6 @@
<string name="status_disabled">Orbot 已停用</string>
<string name="status_shutting_down">Orbot 正在关闭</string>
-<string name="tor_process_connecting">正在启动Tor....</string>
-<string name="tor_process_connecting_step2">设置控制...</string>
-<string name="tor_process_connecting_step3">完毕。</string>
-<string name="tor_process_connecting_step4">等待中。</string>
<string name="not_anonymous_yet">警告: 您的通讯还不是匿名的! 请设置您的应用程序使用代理服务器 127.0.0.1:8118 或者 SOCKS4A 或者 SOCKS5 代理服务器 127.0.0.1:9050</string>
<string name="menu_home">首页</string>
diff --git a/res/values/strings.xml b/res/values/strings.xml
index d9befc4..d0d8b89 100644
--- a/res/values/strings.xml
+++ b/res/values/strings.xml
@@ -14,10 +14,9 @@
<string name="status_disabled">"Orbot is Deactivated</string>
<string name="status_shutting_down">Orbot is shutting down</string>
-<string name="tor_process_connecting">Starting Tor...</string>
-<string name="tor_process_connecting_step2">Setting up control...</string>
-<string name="tor_process_connecting_step3">complete.</string>
-<string name="tor_process_connecting_step4">waiting.</string>
+<string name="tor_process_starting">Starting Tor client...</string>
+<string name="tor_process_complete">complete.</string>
+<string name="tor_process_waiting">waiting.</string>
<string name="not_anonymous_yet">WARNING: Your traffic is not anonymous yet! Please configure your applications to use HTTP proxy 127.0.0.1:8118 or SOCKS4A or SOCKS5 proxy 127.0.0.1:9050</string>
<string name="menu_home">Home</string>
@@ -68,7 +67,7 @@
<string name="title_error">Application Error</string>
-<string name="wizard_title">Welcome to Orbot</string>
+<string name="wizard_title">Orbot</string>
<string name="wizard_btn_tell_me_more">About Orbot</string>
<string name="btn_next">Next</string>
@@ -80,7 +79,6 @@
<!-- Welcome Wizard strings (DJH) -->
- <string name="wizard_welcome_msg">Orbot brings Tor to Android. Tor is free software and an open network that helps you defend against a form of network surveillance that threatens personal freedom and privacy, confidential business activities and relationships, and state security known as traffic analysis.\n\n*WARNING:* Simply installing Orbot will _not_ magically anonymize your mobile traffic! This wizard will help you get started.</string>
<string name="wizard_details">Some Orbot Details</string>
<string name="wizard_details_msg">Orbot is an open-source application that contains Tor, LibEvent and Privoxy. It provides a local HTTP proxy (8118) and a SOCKS proxy (9050) into the Tor network. Orbot also has the ability, on rooted device, to send all internet traffic through Tor.</string>
<string name="wizard_permissions_root">Permission Granted</string>
@@ -89,7 +87,7 @@
<string name="wizard_permissions_msg_stock"> While it is not required, Orbot can become a more powerful tool if your device has root access. Use the button below to grant Orbot superpowers! </string>
<string name="wizard_permissions_no_root">If you don\'t have root access or have no idea what we\'re talking about, just be sure to use apps made to work with Orbot.</string>
- <string name="wizard_permissions_consent">I understand and would like to continue without root</string>
+ <string name="wizard_permissions_consent">I understand and would like to continue without Superuser</string>
<string name="wizard_permission_enable_root">Grant Root for Orbot</string>
<string name="wizard_configure">Configure Torification</string>
@@ -99,9 +97,8 @@
<string name="wizard_tips_tricks">Orbot-enabled Apps</string>
- <string name="wizard_tips_msg">We encourage you to download & use apps that know how to connect directly to Orbot. Click on the buttons below to install.</string>
+ <string name="wizard_tips_msg">The apps below were developed to work with Orbot. Click each button to install now, or you can find them later in the Android Market.</string>
<string name="wizard_tips_otrchat">Gibberbot - Secure instant messaging client for Android</string>
- <string name="wizard_tips_orweb">ORWEB (Android 1.x Only) - Browser designed for privacy & for Orbot</string>
<string name="wizard_tips_proxy">Proxy Settings - Learn how to configure apps to work with Orbot</string>
<string name="wizard_proxy_help_info">Proxy Settings</string>
@@ -112,16 +109,13 @@
</string>
<string name="wizard_final">Orbot is ready!</string>
- <string name="wizard_final_msg">Hundreds of thousands of people around the world use Tor for a wide variety of reasons: journalists and bloggers, human rights workers, law enforcement officers, soldiers, corporations, citizens of repressive regimes, and just ordinary citizens... and now you are ready to, as well!</string>
-
- <string name="otrchat_apk_url">market://search?q=pname:info.guardianproject.otr.app.im</string>
- <string name="orweb_apk_url">market://search?q=pname:nfo.guardianproject.browser</string>
+ <string name="wizard_final_msg">Hundreds of thousands of people around the world use Tor for a wide variety of reasons.\n\nJournalists and bloggers, human rights defenders, law enforcement officers, soldiers, corporations, citizens of repressive regimes, and just ordinary citizens... and now you are ready to, as well!</string>
<!-- END Welcome Wizard strings (DJH) -->
- <string name="connect_first_time"> You\'ve successfully connected to the Tor network - but this does NOT mean your device is secure. You can use the \'Check\' option from the menu to test your browser. \n\nVisit us at https://guardianproject.info/apps/orbot or send an email to help(a)guardianproject.info to learn more.</string>
+ <string name="connect_first_time">You\'ve successfully connected to the Tor network - but this does NOT mean your device is secure. You can use the \'Check\' option from the menu to test your browser. \n\nVisit us at https://guardianproject.info/apps/orbot or send an email to help(a)guardianproject.info to learn more.</string>
- <string name="tor_check">This will open your default web browser to https://check.torproject.org in order to see if Orbot is probably configured and you are connected to Tor.</string>
+ <string name="tor_check">This will open your web browser to https://check.torproject.org in order to see if Orbot is probably configured and you are connected to Tor.</string>
<string name="pref_hs_group">Hidden Services</string>
@@ -131,33 +125,39 @@
<string name="pref_start_boot_summary">Automatically start Orbot and connect Tor when your Android device boots</string>
<!-- New Wizard Strings -->
<!-- Title Screen -->
- <string name="wizard_title_msg">Orbot brings Tor to Android \n\nTor helps you defend against a form of network surveillance that threatens privacy, confidential business activity and relationships, and state security known as traffic analysis</string>
+ <string name="wizard_title_msg">Orbot brings Tor to Android!\n\nTor helps you defend against content filtering, traffic analysis and network surveillance that threatens privacy, confidential information and personal relationships.\n\nThis wizard will help you configure Orbot and Tor on your device.</string>
<!-- Warning screen -->
<string name="wizard_warning_title">Warning</string>
- <string name="wizard_warning_msg">Simply installing Orbot will not automatically anonymize your mobile traffic.\n\nPlease follow the following steps to get started</string>
+ <string name="wizard_warning_msg">Simply installing Orbot will not automatically anonymize your mobile traffic.\n\nYou must properly configure Orbot, your device and other apps to successfully use Tor.</string>
<!-- Permissions screen -->
<string name="wizard_permissions_title">Permissions</string>
- <string name="wizard_permissions_root_msg1">Orbot has detected that you have root permissions enabled. To enable \'Transparent Proxying\', please grant superuser privileges to Orbot</string>
- <string name="wizard_permissions_root_msg2">If you choose to continue without providing superuser privileges, make sure to use apps made to work with orbot</string>
- <string name="wizard_permissions_msg">Orbot has detected that you do not have root permissions.\nTransparent Proxying is not possible without superuser privileges.\nMake sure to use apps that have been configured to work with Orbot</string>
+ <string name="wizard_permissions_root_msg1">You can optionally grant Orbot \'Superuser\' access to enable advanced features, such as Transparent Proxying.</string>
+ <string name="wizard_permissions_root_msg2">If you do not want to do this, please make sure to use apps made to work with Orbot</string>
+ <string name="wizard_permissions_no_root_msg">Your device is running in standard mode, and does not support root or \'Superuser\' access.\n\nIn order to you to benefit from Tor, you will need to use apps built to work with Orbot, or that support HTTP or SOCKS proxy settings.\n\n</string>
<!-- TipsAndTricks screen -->
- <string name="wizard_tips_title">Orbot configured Apps</string>
- <string name="wizard_tips_gibberbot">Gibberbot - Secure instant messaging client for Android</string>
+ <string name="wizard_tips_title">Orbot-Enabled Apps</string>
+ <string name="wizard_tips_gibberbot">Gibberbot: Secure chat app with Off-the-Record Encryption</string>
+ <string name="gibberbot_apk_url">https://market.android.com/details?id=info.guardianproject.otr.app.im</string>
+
+ <string name="wizard_tips_orweb">Orweb: Privacy-enhanced browser that works through Tor</string>
+ <string name="orweb_apk_url">https://market.android.com/details?id=info.guardianproject.browser</string>
+
+<!--
<string name="wizard_tips_firefox">Firefox - Android browser - To be used along with ProxyMob Add-on </string>
<string name="wizard_tips_proxymob">ProxyMob - Simple Firefox Add-on for setting HTTP, SOCKS and SSL proxy settings</string>
- <string name="gibberbot_apk_url">https://market.android.com/details?id=info.guardianproject.otr.app.im</string>
<string name="firefox_apk_url">https://market.android.com/details?id=org.mozilla.firefox</string>
<string name="proxymob_url">https://addons.mozilla.org/mobile/downloads/latest/251558/type:attachment/a…</string>
+ -->
<!-- Transparent Proxy screen -->
- <string name="wizard_transproxy_title">Transparent Proxy</string>
- <string name="wizard_transproxy_msg">Transparent Proxying allows you to redirect client requests without any special configuration or knowledge at the client.</string>
+ <string name="wizard_transproxy_title">Transparent Proxying</string>
+ <string name="wizard_transproxy_msg">This allows your apps to automatically run through the Tor network without any configuration.</string>
<string name="wizard_transproxy_hint">(Check this box if you have no idea what we are talking about)</string>
<string name="wizard_transproxy_none">None</string>
<string name="pref_transparent_tethering_title">Tor Tethering</string>
<string name="pref_transparent_tethering_summary">Enable Tor Transparent Proxying for Wifi and USB Tethered Devices</string>
-
+<string name="button_grant_superuser">Request Superuser Access</string>
<string name="pref_select_apps">Select Apps</string>
<string name="pref_select_apps_summary">Choose Apps to Route Through Tor</string>
@@ -167,4 +167,21 @@
<string name="pref_entrance_node">Entrance Nodes</string>
<string name="pref_entrance_node_summary">Fingerprints, nicks, countries and addresses for the first hop</string>
<string name="pref_entrance_node_dialog">Enter Entrance Nodes</string>
+
+<string name="pref_use_whispercore">Use WhisperCore</string>
+<string name="pref_use_whispercore_summary">Use the proprietary NetFilter APIs provided by WhisperSystems (required device with WhisperCore installed)</string>
+
+
+<string name="pref_proxy_type_title">Proxy Type</string>
+<string name="pref_proxy_type_summary">Protocol to use for proxy server: HTTP, HTTPS, Socks4, Socks5</string>
+<string name="pref_proxy_type_dialog">Enter Proxy Type</string>
+
+<string name="pref_proxy_host_title">Proxy Host</string>
+<string name="pref_proxy_host_summary">Proxy server hostname</string>
+<string name="pref_proxy_host_dialog">Enter Proxy Host</string>
+
+<string name="pref_proxy_port_title">Proxy Port</string>
+<string name="pref_proxy_port_summary">Proxy server port</string>
+<string name="pref_proxy_port_dialog">Enter Proxy port</string>
+
</resources>
diff --git a/res/xml/preferences.xml b/res/xml/preferences.xml
index a6c0f67..8416e01 100644
--- a/res/xml/preferences.xml
+++ b/res/xml/preferences.xml
@@ -14,6 +14,14 @@ android:key="has_root"
android:title="@string/pref_has_root"
android:summary="@string/pref_has_root_summary"
android:enabled="true"/>
+<!--
+<CheckBoxPreference
+android:defaultValue="false"
+android:key="use_whispercore"
+android:title="@string/pref_use_whispercore"
+android:summary="@string/pref_use_whispercore_summary"
+android:enabled="true"/>
+ -->
</PreferenceCategory>
<PreferenceCategory android:title="@string/pref_trans_proxy_group">
@@ -137,6 +145,24 @@ android:dialogTitle="Enter ports"
<EditTextPreference android:key="pref_hs_hostname" android:summary="the addressable name for your hidden service (generated automatically)" android:title=".Onion Hostname"></EditTextPreference>
</PreferenceCategory>
+<PreferenceCategory android:title="Proxy Service">
+<EditTextPreference android:key="pref_proxy_type"
+android:title="@string/pref_proxy_type_title"
+android:summary="@string/pref_proxy_type_summary"
+android:dialogTitle="@string/pref_proxy_type_dialog"
+/>
+<EditTextPreference android:key="pref_proxy_host"
+android:title="@string/pref_proxy_host_title"
+android:summary="@string/pref_proxy_host_summary"
+android:dialogTitle="@string/pref_proxy_host_dialog"
+/>
+<EditTextPreference android:key="pref_proxy_port"
+android:title="@string/pref_proxy_port_title"
+android:summary="@string/pref_proxy_port_summary"
+android:dialogTitle="@string/pref_proxy_port_dialog"
+/>
+</PreferenceCategory>
+
<PreferenceCategory android:title="Debug">
<CheckBoxPreference
android:key="pref_enable_logging"
1
0

[orbot/master] finalizing packages for wizard and new config options
by n8fr8@torproject.org 28 Oct '11
by n8fr8@torproject.org 28 Oct '11
28 Oct '11
commit adbf7be054adb83dd90e8504a5f2baa38e2fe775
Author: Nathan Freitas <nathan(a)freitas.net>
Date: Fri Oct 28 00:31:45 2011 -0400
finalizing packages for wizard and new config options
---
.../torproject/android/service/TorrcConfig.java | 33 ++
.../torproject/android/service/WhisperManager.java | 93 +++++
.../torproject/android/settings/AppManager.java | 278 +++++++++++++
.../android/settings/ProcessSettingsAsyncTask.java | 32 ++
.../android/settings/SettingsPreferences.java | 132 ++++++
.../torproject/android/settings/TorifiedApp.java | 111 +++++
.../android/wizard/ConfigureTransProxy.java | 192 +++++++++
src/org/torproject/android/wizard/LotsaText.java | 140 +++++++
src/org/torproject/android/wizard/Permissions.java | 235 +++++++++++
.../torproject/android/wizard/TipsAndTricks.java | 180 ++++++++
.../torproject/android/wizard/WizardHelper.java | 435 ++++++++++++++++++++
11 files changed, 1861 insertions(+), 0 deletions(-)
diff --git a/src/org/torproject/android/service/TorrcConfig.java b/src/org/torproject/android/service/TorrcConfig.java
new file mode 100644
index 0000000..92bfb9b
--- /dev/null
+++ b/src/org/torproject/android/service/TorrcConfig.java
@@ -0,0 +1,33 @@
+package org.torproject.android.service;
+
+public class TorrcConfig {
+
+}
+
+/*
+ * GeoIPFile
+ */
+/*
+HTTPProxy host[:port]
+Tor will make all its directory requests through this host:port (or host:80 if port is not specified), rather than connecting directly to any directory servers.
+
+HTTPProxyAuthenticator username:password
+If defined, Tor will use this username:password for Basic HTTP proxy authentication, as in RFC 2617. This is currently the only form of HTTP proxy authentication that Tor supports; feel free to submit a patch if you want it to support others.
+
+HTTPSProxy host[:port]
+Tor will make all its OR (SSL) connections through this host:port (or host:443 if port is not specified), via HTTP CONNECT rather than connecting directly to servers. You may want to set FascistFirewall to restrict the set of ports you might try to connect to, if your HTTPS proxy only allows connecting to certain ports.
+
+HTTPSProxyAuthenticator username:password
+If defined, Tor will use this username:password for Basic HTTPS proxy authentication, as in RFC 2617. This is currently the only form of HTTPS proxy authentication that Tor supports; feel free to submit a patch if you want it to support others.
+
+Socks4Proxy host[:port]
+Tor will make all OR connections through the SOCKS 4 proxy at host:port (or host:1080 if port is not specified).
+
+Socks5Proxy host[:port]
+Tor will make all OR connections through the SOCKS 5 proxy at host:port (or host:1080 if port is not specified).
+
+Socks5ProxyUsername username
+
+Socks5ProxyPassword password
+If defined, authenticate to the SOCKS 5 server using username and password in accordance to RFC 1929. Both username and password must be between 1 and 255 characters.
+*/
\ No newline at end of file
diff --git a/src/org/torproject/android/service/WhisperManager.java b/src/org/torproject/android/service/WhisperManager.java
new file mode 100644
index 0000000..d858af3
--- /dev/null
+++ b/src/org/torproject/android/service/WhisperManager.java
@@ -0,0 +1,93 @@
+package org.torproject.android.service;
+
+import android.content.ContentValues;
+import android.content.Context;
+import android.database.Cursor;
+import android.net.Uri;
+import android.util.Log;
+
+import com.whispersys.providers.Netfilter;
+
+/*
+ * Supports interaction with private APIs provided by WhisperSystems SDK
+ */
+public class WhisperManager {
+
+
+ Context context;
+
+
+ public boolean isWhisperCore ()
+ {
+ boolean result = false;
+
+ Cursor cursor = null;
+ Uri uri = Uri.withAppendedPath(Netfilter.Filter.CONTENT_URI, Netfilter.Filter.Chains.OUTPUT);
+
+ try {
+ cursor = context.getContentResolver().query(uri, null, null, null, null);
+ cursor.moveToFirst();
+ result = true;
+ }
+ catch (Exception e)
+ {
+ result = false;
+ }
+
+ return result;
+ }
+ /*
+ * Usage
+ The Netfilter provider allows you to query, update, insert, or delete rules from a chain of a table. Callers must provide a CONTENT_URI which specifies the chain of the table they would like to query or modify.
+
+ To query and print the INPUT rules for the filter table, for instance, would look like this:
+ */
+
+ public void query ()
+ {
+ Cursor cursor = null;
+ Uri uri = Uri.withAppendedPath(Netfilter.Filter.CONTENT_URI, Netfilter.Filter.Chains.OUTPUT);
+
+ try {
+ cursor = context.getContentResolver().query(uri, null, null, null, null);
+
+ while (cursor.moveToNext())
+ for (int i=0;i<cursor.getColumnCount();i++)
+ Log.w("TestApp", "Column: " + cursor.getColumnName(i) + " , value: " + cursor.getString(i));
+ } finally {
+ if (cursor != null)
+ cursor.close();
+ }
+ }
+
+ /*
+ To append a rule that dropped all UDP traffic to the end of the OUTPUT chain would look like this:
+ */
+
+ public void append ()
+ {
+ Uri uri = Uri.withAppendedPath(Netfilter.Filter.CONTENT_URI,
+ Netfilter.Filter.Chains.OUTPUT);
+ ContentValues values = new ContentValues();
+ values.put(Netfilter.Filter.TARGET, Netfilter.Targets.DROP);
+ values.put(Netfilter.Filter.PROTOCOL, Netfilter.Protocols.UDP);
+
+ context.getContentResolver().insert(uri, values);
+ }
+
+ /*
+ iptables rule indexes start at 1. To insert the same rule in the first position of the OUTPUT chain, rather than appending it to the end of the chain, would look like this:
+ */
+ public void insert ()
+ {
+ Uri uri = Uri.withAppendedPath(Netfilter.Filter.CONTENT_URI,
+ Netfilter.Filter.Chains.OUTPUT);
+ ContentValues values = new ContentValues();
+ values.put(Netfilter.Filter.TARGET, Netfilter.Targets.DROP);
+ values.put(Netfilter.Filter.PROTOCOL, Netfilter.Protocols.UDP);
+ values.put(Netfilter.Filter.ROW_ID, 1);
+
+ context.getContentResolver().insert(uri, values);
+ }
+}
+
diff --git a/src/org/torproject/android/settings/AppManager.java b/src/org/torproject/android/settings/AppManager.java
new file mode 100644
index 0000000..6874f2d
--- /dev/null
+++ b/src/org/torproject/android/settings/AppManager.java
@@ -0,0 +1,278 @@
+/* Copyright (c) 2009, Nathan Freitas, Orbot / The Guardian Project - http://openideals.com/guardian */
+/* See LICENSE for licensing information */
+
+package org.torproject.android.settings;
+
+import java.util.Arrays;
+import java.util.Comparator;
+import java.util.Iterator;
+import java.util.List;
+import java.util.StringTokenizer;
+
+import org.torproject.android.R;
+import org.torproject.android.TorConstants;
+import org.torproject.android.R.id;
+import org.torproject.android.R.layout;
+
+import android.app.Activity;
+import android.content.Context;
+import android.content.SharedPreferences;
+import android.content.SharedPreferences.Editor;
+import android.content.pm.ApplicationInfo;
+import android.content.pm.PackageManager;
+import android.graphics.drawable.Drawable;
+import android.os.Bundle;
+import android.preference.PreferenceManager;
+import android.view.LayoutInflater;
+import android.view.View;
+import android.view.View.OnClickListener;
+import android.view.ViewGroup;
+import android.widget.ArrayAdapter;
+import android.widget.CheckBox;
+import android.widget.CompoundButton;
+import android.widget.CompoundButton.OnCheckedChangeListener;
+import android.widget.ImageView;
+import android.widget.ListAdapter;
+import android.widget.ListView;
+import android.widget.TextView;
+
+
+public class AppManager extends Activity implements OnCheckedChangeListener, OnClickListener, TorConstants {
+
+ private static TorifiedApp[] apps = null;
+
+ private ListView listApps;
+
+ private AppManager mAppManager;
+
+
+ private boolean appsLoaded = false;
+
+ protected void onCreate(Bundle savedInstanceState) {
+ super.onCreate(savedInstanceState);
+
+ this.setContentView(R.layout.layout_apps);
+
+ mAppManager = this;
+
+
+
+ }
+
+
+
+ @Override
+ protected void onResume() {
+ super.onResume();
+ listApps = (ListView)findViewById(R.id.applistview);
+
+ if (!appsLoaded)
+ loadApps();
+ }
+
+
+
+ private void loadApps ()
+ {
+ resetApps(this);
+ final TorifiedApp[] apps = getApps(this);
+
+ Arrays.sort(apps, new Comparator<TorifiedApp>() {
+ public int compare(TorifiedApp o1, TorifiedApp o2) {
+ if (o1.isTorified() == o2.isTorified()) return o1.getName().compareTo(o2.getName());
+ if (o1.isTorified()) return -1;
+ return 1;
+ }
+ });
+
+ final LayoutInflater inflater = getLayoutInflater();
+
+ final ListAdapter adapter = new ArrayAdapter<TorifiedApp>(this,R.layout.layout_apps_item,R.id.itemtext,apps) {
+ public View getView(int position, View convertView, ViewGroup parent) {
+ ListEntry entry;
+ if (convertView == null) {
+ // Inflate a new view
+ convertView = inflater.inflate(R.layout.layout_apps_item, parent, false);
+ entry = new ListEntry();
+ entry.icon = (ImageView) convertView.findViewById(R.id.itemicon);
+ entry.box = (CheckBox) convertView.findViewById(R.id.itemcheck);
+ entry.text = (TextView) convertView.findViewById(R.id.itemtext);
+
+ entry.text.setOnClickListener(mAppManager);
+ entry.text.setOnClickListener(mAppManager);
+
+ convertView.setTag(entry);
+
+ entry.box.setOnCheckedChangeListener(mAppManager);
+ } else {
+ // Convert an existing view
+ entry = (ListEntry) convertView.getTag();
+ }
+
+
+ final TorifiedApp app = apps[position];
+
+
+ entry.icon.setImageDrawable(app.getIcon());
+ entry.text.setText(app.getName());
+
+ final CheckBox box = entry.box;
+ box.setTag(app);
+ box.setChecked(app.isTorified());
+
+ entry.text.setTag(box);
+ entry.icon.setTag(box);
+
+ return convertView;
+ }
+ };
+
+ listApps.setAdapter(adapter);
+
+ appsLoaded = true;
+
+ }
+
+ private static class ListEntry {
+ private CheckBox box;
+ private TextView text;
+ private ImageView icon;
+ }
+
+ /* (non-Javadoc)
+ * @see android.app.Activity#onStop()
+ */
+ @Override
+ protected void onStop() {
+ super.onStop();
+
+ }
+
+ public static TorifiedApp[] getApps (Context context)
+ {
+ if (apps == null)
+ resetApps(context);
+
+ return apps;
+ }
+
+ public static TorifiedApp[] resetApps (Context context)
+ {
+
+ SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);
+
+ String tordAppString = prefs.getString(PREFS_KEY_TORIFIED, "");
+ String[] tordApps;
+
+ StringTokenizer st = new StringTokenizer(tordAppString,"|");
+ tordApps = new String[st.countTokens()];
+ int tordIdx = 0;
+ while (st.hasMoreTokens())
+ {
+ tordApps[tordIdx++] = st.nextToken();
+ }
+
+ Arrays.sort(tordApps);
+
+ //else load the apps up
+ PackageManager pMgr = context.getPackageManager();
+
+ List<ApplicationInfo> lAppInfo = pMgr.getInstalledApplications(0);
+
+
+ Iterator<ApplicationInfo> itAppInfo = lAppInfo.iterator();
+
+ apps = new TorifiedApp[lAppInfo.size()];
+
+ ApplicationInfo aInfo = null;
+
+ int appIdx = 0;
+
+ while (itAppInfo.hasNext())
+ {
+ aInfo = itAppInfo.next();
+
+ apps[appIdx] = new TorifiedApp();
+
+ apps[appIdx].setEnabled(aInfo.enabled);
+ apps[appIdx].setUid(aInfo.uid);
+ apps[appIdx].setUsername(pMgr.getNameForUid(apps[appIdx].getUid()));
+ apps[appIdx].setProcname(aInfo.processName);
+ apps[appIdx].setName(pMgr.getApplicationLabel(aInfo).toString());
+ apps[appIdx].setIcon(pMgr.getApplicationIcon(aInfo));
+
+ // check if this application is allowed
+ if (Arrays.binarySearch(tordApps, apps[appIdx].getUsername()) >= 0) {
+ apps[appIdx].setTorified(true);
+ }
+ else
+ {
+ apps[appIdx].setTorified(false);
+ }
+
+ appIdx++;
+ }
+
+
+ return apps;
+ }
+
+
+ public void saveAppSettings (Context context)
+ {
+ if (apps == null)
+ return;
+
+ SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(this);
+
+ // final SharedPreferences prefs = context.getSharedPreferences(PREFS_KEY, 0);
+
+ StringBuilder tordApps = new StringBuilder();
+
+ for (int i = 0; i < apps.length; i++)
+ {
+ if (apps[i].isTorified())
+ {
+ tordApps.append(apps[i].getUsername());
+ tordApps.append("|");
+ }
+ }
+
+ Editor edit = prefs.edit();
+ edit.putString(PREFS_KEY_TORIFIED, tordApps.toString());
+ edit.commit();
+
+ }
+
+
+ /**
+ * Called an application is check/unchecked
+ */
+ public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
+ final TorifiedApp app = (TorifiedApp) buttonView.getTag();
+ if (app != null) {
+ app.setTorified(isChecked);
+ }
+
+ saveAppSettings(this);
+
+ }
+
+
+
+ @Override
+ public void onClick(View v) {
+
+ CheckBox cbox = (CheckBox)v.getTag();
+
+ final TorifiedApp app = (TorifiedApp)cbox.getTag();
+ if (app != null) {
+ app.setTorified(!app.isTorified());
+ cbox.setChecked(app.isTorified());
+ }
+
+ saveAppSettings(this);
+
+ }
+
+}
diff --git a/src/org/torproject/android/settings/ProcessSettingsAsyncTask.java b/src/org/torproject/android/settings/ProcessSettingsAsyncTask.java
new file mode 100644
index 0000000..5e14709
--- /dev/null
+++ b/src/org/torproject/android/settings/ProcessSettingsAsyncTask.java
@@ -0,0 +1,32 @@
+package org.torproject.android.settings;
+
+import org.torproject.android.service.ITorService;
+
+import android.os.AsyncTask;
+import android.os.RemoteException;
+
+public class ProcessSettingsAsyncTask extends AsyncTask<ITorService, Integer, Long>
+{
+
+
+ @Override
+ protected Long doInBackground(ITorService... torService) {
+
+ try {
+ torService[0].processSettings();
+ } catch (RemoteException e) {
+ e.printStackTrace();
+ }
+
+ return 100L;
+ }
+
+ protected void onProgressUpdate(Integer... progress) {
+
+ }
+
+ protected void onPostExecute(Long result) {
+
+ }
+
+}
diff --git a/src/org/torproject/android/settings/SettingsPreferences.java b/src/org/torproject/android/settings/SettingsPreferences.java
new file mode 100644
index 0000000..c3b5942
--- /dev/null
+++ b/src/org/torproject/android/settings/SettingsPreferences.java
@@ -0,0 +1,132 @@
+/* Copyright (c) 2009, Nathan Freitas, Orbot / The Guardian Project - http://openideals.com/guardian */
+/* See LICENSE for licensing information */
+
+package org.torproject.android.settings;
+
+import org.torproject.android.R;
+import org.torproject.android.R.xml;
+import org.torproject.android.service.TorServiceUtils;
+import org.torproject.android.service.TorTransProxy;
+
+import android.content.Intent;
+import android.content.SharedPreferences;
+import android.content.SharedPreferences.Editor;
+import android.os.Bundle;
+import android.preference.CheckBoxPreference;
+import android.preference.Preference;
+import android.preference.PreferenceManager;
+import android.preference.Preference.OnPreferenceClickListener;
+import android.preference.PreferenceActivity;
+import android.preference.PreferenceCategory;
+
+
+public class SettingsPreferences
+ extends PreferenceActivity implements OnPreferenceClickListener {
+
+ private CheckBoxPreference prefCBTransProxy = null;
+ private CheckBoxPreference prefcBTransProxyAll = null;
+ private Preference prefTransProxyApps = null;
+ private CheckBoxPreference prefHiddenServices = null;
+
+ private boolean hasRoot = false;
+
+
+ private final static int HIDDEN_SERVICE_PREF_IDX = 6;
+
+ protected void onCreate(Bundle savedInstanceState)
+ {
+ super.onCreate(savedInstanceState);
+ addPreferencesFromResource(R.xml.preferences);
+
+ SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(this);
+
+ hasRoot = prefs.getBoolean("has_root",false);
+
+ if (!hasRoot)
+ {
+ hasRoot = prefs.getBoolean("use_whispercore", false);
+
+ }
+ }
+
+
+ @Override
+ protected void onResume() {
+
+ super.onResume();
+
+
+ int transProxyGroupIdx = 1;
+
+ if (!hasRoot)
+ {
+ getPreferenceScreen().getPreference(transProxyGroupIdx).setEnabled(false);
+ }
+ else
+ {
+ prefCBTransProxy = ((CheckBoxPreference)((PreferenceCategory)this.getPreferenceScreen().getPreference(transProxyGroupIdx)).getPreference(0));
+ prefcBTransProxyAll = (CheckBoxPreference)((PreferenceCategory)this.getPreferenceScreen().getPreference(transProxyGroupIdx)).getPreference(1);
+ prefTransProxyApps = ((PreferenceCategory)this.getPreferenceScreen().getPreference(transProxyGroupIdx)).getPreference(2);
+
+ prefcBTransProxyAll.setEnabled(prefCBTransProxy.isChecked());
+
+ prefTransProxyApps.setEnabled(prefCBTransProxy.isChecked() && (!prefcBTransProxyAll.isChecked()));
+
+ prefCBTransProxy.setOnPreferenceClickListener(this);
+ prefcBTransProxyAll.setOnPreferenceClickListener(this);
+ prefTransProxyApps.setOnPreferenceClickListener(this);
+
+ }
+
+
+ prefHiddenServices = ((CheckBoxPreference)((PreferenceCategory)this.getPreferenceScreen().getPreference(HIDDEN_SERVICE_PREF_IDX)).getPreference(0));
+ prefHiddenServices.setOnPreferenceClickListener(this);
+ ((PreferenceCategory)this.getPreferenceScreen().getPreference(HIDDEN_SERVICE_PREF_IDX)).getPreference(1).setEnabled(prefHiddenServices.isChecked());
+ ((PreferenceCategory)this.getPreferenceScreen().getPreference(HIDDEN_SERVICE_PREF_IDX)).getPreference(2).setEnabled(prefHiddenServices.isChecked());
+
+
+ };
+
+
+
+
+ /* (non-Javadoc)
+ * @see android.app.Activity#onStop()
+ */
+ @Override
+ protected void onStop() {
+ super.onStop();
+
+ //Log.d(getClass().getName(),"Exiting Preferences");
+ }
+
+ @Override
+ public boolean onPreferenceClick(Preference preference) {
+
+ setResult(1010);
+
+ if (preference == prefTransProxyApps)
+ {
+ startActivity(new Intent(this, AppManager.class));
+
+ }
+ else if (preference == prefHiddenServices)
+ {
+
+ ((PreferenceCategory)this.getPreferenceScreen().getPreference(HIDDEN_SERVICE_PREF_IDX)).getPreference(1).setEnabled(prefHiddenServices.isChecked());
+ ((PreferenceCategory)this.getPreferenceScreen().getPreference(HIDDEN_SERVICE_PREF_IDX)).getPreference(2).setEnabled(prefHiddenServices.isChecked());
+
+ }
+ else
+ {
+ prefcBTransProxyAll.setEnabled(prefCBTransProxy.isChecked());
+ prefTransProxyApps.setEnabled(prefCBTransProxy.isChecked() && (!prefcBTransProxyAll.isChecked()));
+
+ }
+
+ return true;
+ }
+
+
+
+}
diff --git a/src/org/torproject/android/settings/TorifiedApp.java b/src/org/torproject/android/settings/TorifiedApp.java
new file mode 100644
index 0000000..4f7fb2d
--- /dev/null
+++ b/src/org/torproject/android/settings/TorifiedApp.java
@@ -0,0 +1,111 @@
+package org.torproject.android.settings;
+
+import android.graphics.drawable.Drawable;
+
+public class TorifiedApp {
+
+ private boolean enabled;
+ private int uid;
+ private String username;
+ private String procname;
+ private String name;
+ private Drawable icon;
+
+ private boolean torified = false;
+
+ /**
+ * @return the torified
+ */
+ public boolean isTorified() {
+ return torified;
+ }
+ /**
+ * @param torified the torified to set
+ */
+ public void setTorified(boolean torified) {
+ this.torified = torified;
+ }
+ private int[] enabledPorts;
+
+ /**
+ * @return the enabledPorts
+ */
+ public int[] getEnabledPorts() {
+ return enabledPorts;
+ }
+ /**
+ * @param enabledPorts the enabledPorts to set
+ */
+ public void setEnabledPorts(int[] enabledPorts) {
+ this.enabledPorts = enabledPorts;
+ }
+ /**
+ * @return the enabled
+ */
+ public boolean isEnabled() {
+ return enabled;
+ }
+ /**
+ * @param enabled the enabled to set
+ */
+ public void setEnabled(boolean enabled) {
+ this.enabled = enabled;
+ }
+ /**
+ * @return the uid
+ */
+ public int getUid() {
+ return uid;
+ }
+ /**
+ * @param uid the uid to set
+ */
+ public void setUid(int uid) {
+ this.uid = uid;
+ }
+ /**
+ * @return the username
+ */
+ public String getUsername() {
+ return username;
+ }
+ /**
+ * @param username the username to set
+ */
+ public void setUsername(String username) {
+ this.username = username;
+ }
+ /**
+ * @return the procname
+ */
+ public String getProcname() {
+ return procname;
+ }
+ /**
+ * @param procname the procname to set
+ */
+ public void setProcname(String procname) {
+ this.procname = procname;
+ }
+ /**
+ * @return the name
+ */
+ public String getName() {
+ return name;
+ }
+ /**
+ * @param name the name to set
+ */
+ public void setName(String name) {
+ this.name = name;
+ }
+
+
+ public Drawable getIcon() {
+ return icon;
+ }
+
+ public void setIcon(Drawable icon) {
+ this.icon = icon;
+ }
+}
diff --git a/src/org/torproject/android/wizard/ConfigureTransProxy.java b/src/org/torproject/android/wizard/ConfigureTransProxy.java
new file mode 100644
index 0000000..05e4e68
--- /dev/null
+++ b/src/org/torproject/android/wizard/ConfigureTransProxy.java
@@ -0,0 +1,192 @@
+package org.torproject.android.wizard;
+
+import org.torproject.android.Orbot;
+import org.torproject.android.R;
+import org.torproject.android.TorConstants;
+import org.torproject.android.R.drawable;
+import org.torproject.android.R.id;
+import org.torproject.android.R.layout;
+import org.torproject.android.R.string;
+import org.torproject.android.settings.AppManager;
+
+import android.app.Activity;
+import android.app.AlertDialog;
+import android.content.Context;
+import android.content.DialogInterface;
+import android.content.Intent;
+import android.content.SharedPreferences;
+import android.content.SharedPreferences.Editor;
+import android.net.Uri;
+import android.os.Bundle;
+import android.preference.PreferenceManager;
+import android.view.View;
+import android.view.View.OnClickListener;
+import android.widget.Button;
+import android.widget.CheckBox;
+import android.widget.CompoundButton;
+import android.widget.RadioButton;
+import android.widget.RadioGroup;
+import android.widget.TextView;
+import android.widget.CompoundButton.OnCheckedChangeListener;
+import android.widget.Toast;
+
+public class ConfigureTransProxy extends Activity implements TorConstants {
+
+ private Context context;
+ private int flag = 0;
+
+ protected void onCreate(Bundle savedInstanceState)
+ {
+ super.onCreate(savedInstanceState);
+ context = this;
+
+ }
+
+ @Override
+ protected void onStart() {
+
+ super.onStart();
+ setContentView(R.layout.layout_wizard_root);
+
+ stepSix();
+
+ }
+
+ @Override
+ protected void onResume() {
+ super.onResume();
+
+
+ }
+
+
+
+ private void stepSix(){
+
+ String title = context.getString(R.string.wizard_transproxy_title);
+ TextView txtTitle = ((TextView)findViewById(R.id.WizardTextTitle));
+ txtTitle.setText(title);
+
+ Button back = ((Button)findViewById(R.id.btnWizard1));
+ Button next = ((Button)findViewById(R.id.btnWizard2));
+ next.setEnabled(false);
+
+ back.setOnClickListener(new View.OnClickListener() {
+
+ @Override
+ public void onClick(View v) {
+
+ startActivityForResult(new Intent(getBaseContext(), Permissions.class), 1);
+ }
+ });
+
+ next.setOnClickListener(new View.OnClickListener() {
+
+ //Dirty flag variable - improve logic
+ @Override
+ public void onClick(View v) {
+ if( flag == 1 )
+ context.startActivity(new Intent(context, AppManager.class));
+
+ else
+ showWizardFinal();
+ }
+ });
+
+ RadioGroup mRadioGroup = (RadioGroup)findViewById(R.id.radioGroup);
+ mRadioGroup.setOnCheckedChangeListener(new RadioGroup.OnCheckedChangeListener (){
+
+
+ @Override
+ public void onCheckedChanged(RadioGroup group, int checkedId){
+ Button next = ((Button)findViewById(R.id.btnWizard2));
+ next.setEnabled(true);
+ next.setOnClickListener(new View.OnClickListener() {
+
+ @Override
+ public void onClick(View v) {
+
+ showWizardFinal();
+ }
+ });
+
+ RadioButton rb0 = (RadioButton)findViewById(R.id.radio0);
+ RadioButton rb1 = (RadioButton)findViewById(R.id.radio1);
+ RadioButton rb2 = (RadioButton)findViewById(R.id.radio2);
+
+ SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);
+
+ Editor pEdit = prefs.edit();
+ pEdit.putBoolean(PREF_TRANSPARENT, rb0.isChecked());
+ pEdit.putBoolean(PREF_TRANSPARENT_ALL, rb0.isChecked());
+ pEdit.commit();
+
+ if(rb0.isChecked())
+ {
+ pEdit.putString("radiobutton","rb0");
+ pEdit.commit();
+ }
+
+ else if(rb1.isChecked())
+ {
+ flag = 1;
+
+ pEdit.putBoolean(PREF_TRANSPARENT, true);
+ pEdit.putBoolean(PREF_TRANSPARENT_ALL, false);
+ pEdit.putString("radiobutton","rb1");
+ pEdit.commit();
+
+ next.setOnClickListener(new View.OnClickListener() {
+
+ @Override
+ public void onClick(View v) {
+
+ context.startActivity(new Intent(context, AppManager.class));
+
+
+ }
+ });
+ }
+ else if(rb2.isChecked())
+ {
+ pEdit.putString("radiobutton", "rb2");
+ pEdit.commit();
+ }
+
+ }
+ });
+
+
+ }
+
+ private void showWizardFinal ()
+ {
+ String title = null;
+ String msg = null;
+
+
+ title = context.getString(R.string.wizard_final);
+ msg = context.getString(R.string.wizard_final_msg);
+
+ DialogInterface.OnClickListener ocListener = new DialogInterface.OnClickListener() {
+
+ @Override
+ public void onClick(DialogInterface dialog, int which) {
+ context.startActivity(new Intent(context, Orbot.class));
+
+ }
+ };
+
+
+ new AlertDialog.Builder(context)
+ .setIcon(R.drawable.icon)
+ .setTitle(title)
+ .setPositiveButton(R.string.button_close, ocListener)
+ .setMessage(msg)
+ .show();
+
+
+
+
+ }
+}
\ No newline at end of file
diff --git a/src/org/torproject/android/wizard/LotsaText.java b/src/org/torproject/android/wizard/LotsaText.java
new file mode 100644
index 0000000..1470a4b
--- /dev/null
+++ b/src/org/torproject/android/wizard/LotsaText.java
@@ -0,0 +1,140 @@
+package org.torproject.android.wizard;
+
+import org.torproject.android.R;
+import org.torproject.android.TorConstants;
+import org.torproject.android.R.drawable;
+import org.torproject.android.R.id;
+import org.torproject.android.R.layout;
+import org.torproject.android.R.string;
+
+import android.app.Activity;
+import android.content.Context;
+import android.content.Intent;
+import android.content.SharedPreferences;
+import android.content.SharedPreferences.Editor;
+import android.os.Bundle;
+import android.preference.PreferenceManager;
+import android.view.View;
+import android.widget.Button;
+import android.widget.ImageView;
+import android.widget.TextView;
+
+public class LotsaText extends Activity implements TorConstants{
+
+ private Context context;
+
+ protected void onCreate(Bundle savedInstanceState)
+ {
+
+
+ super.onCreate(savedInstanceState);
+ context = this;
+
+
+ }
+
+ @Override
+ protected void onStart() {
+
+ super.onStart();
+ setContentView(R.layout.scrollingtext_buttons_view);
+
+ SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);
+
+ boolean wizardScreen1 = prefs.getBoolean("wizardscreen1",true);
+ if(wizardScreen1)
+ stepOne();
+ else
+ stepTwo();
+
+ }
+
+ @Override
+ protected void onResume() {
+ super.onResume();
+
+
+ }
+
+
+
+ private void stepOne() {
+
+ SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);
+
+ Editor pEdit = prefs.edit();
+ pEdit.putBoolean("wizardscreen1",true);
+ pEdit.commit();
+
+ String title = context.getString(R.string.wizard_title);
+ String msg = context.getString(R.string.wizard_title_msg);
+
+ TextView txtTitle = ((TextView)findViewById(R.id.WizardTextTitle));
+ txtTitle.setText(title);
+
+ TextView txtBody = ((TextView)findViewById(R.id.WizardTextBody));
+ txtBody.setText(msg);
+
+ Button btn1 = ((Button)findViewById(R.id.btnWizard1));
+ Button btn2 = ((Button)findViewById(R.id.btnWizard2));
+ ImageView img = (ImageView) findViewById(R.id.orbot_image);
+
+ btn1.setVisibility(Button.INVISIBLE);
+ img.setImageResource(R.drawable.tor);
+
+ btn2.setOnClickListener(new View.OnClickListener() {
+
+ @Override
+ public void onClick(View v) {
+ stepTwo();
+ }
+ });
+
+ }
+
+ private void stepTwo() {
+
+ SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);
+
+ Editor pEdit = prefs.edit();
+ pEdit.putBoolean("wizardscreen1",false);
+ pEdit.commit();
+
+ setContentView(R.layout.scrollingtext_buttons_view);
+ String title = context.getString(R.string.wizard_warning_title);
+ String msg = context.getString(R.string.wizard_warning_msg);
+
+ TextView txtTitle = ((TextView)findViewById(R.id.WizardTextTitle));
+ txtTitle.setText(title);
+
+ TextView txtBody = ((TextView)findViewById(R.id.WizardTextBody));
+ txtBody.setText(msg);
+
+ Button btn1 = ((Button)findViewById(R.id.btnWizard1));
+ Button btn2 = ((Button)findViewById(R.id.btnWizard2));
+ ImageView img = (ImageView) findViewById(R.id.orbot_image);
+
+ btn1.setVisibility(Button.VISIBLE);
+ img.setImageResource(R.drawable.warning);
+
+ btn1.setOnClickListener(new View.OnClickListener() {
+
+ @Override
+ public void onClick(View v) {
+
+ stepOne();
+ }
+ });
+
+ btn2.setOnClickListener(new View.OnClickListener() {
+
+ @Override
+ public void onClick(View v) {
+ startActivityForResult(new Intent(getBaseContext(), Permissions.class), 1);
+ }
+ });
+
+ }
+
+
+}
\ No newline at end of file
diff --git a/src/org/torproject/android/wizard/Permissions.java b/src/org/torproject/android/wizard/Permissions.java
new file mode 100644
index 0000000..ecb7b50
--- /dev/null
+++ b/src/org/torproject/android/wizard/Permissions.java
@@ -0,0 +1,235 @@
+package org.torproject.android.wizard;
+
+import org.torproject.android.R;
+import org.torproject.android.TorConstants;
+import org.torproject.android.R.drawable;
+import org.torproject.android.R.id;
+import org.torproject.android.R.layout;
+import org.torproject.android.R.string;
+import org.torproject.android.service.TorService;
+import org.torproject.android.service.TorServiceUtils;
+import org.torproject.android.service.TorTransProxy;
+
+import android.app.Activity;
+import android.content.Context;
+import android.content.Intent;
+import android.content.SharedPreferences;
+import android.content.SharedPreferences.Editor;
+import android.os.Bundle;
+import android.preference.PreferenceManager;
+import android.util.Log;
+import android.view.View;
+import android.widget.Button;
+import android.widget.CheckBox;
+import android.widget.CompoundButton;
+import android.widget.ImageView;
+import android.widget.CompoundButton.OnCheckedChangeListener;
+import android.widget.TextView;
+import android.widget.Toast;
+
+public class Permissions extends Activity implements TorConstants {
+
+ private Context context;
+
+ protected void onCreate(Bundle savedInstanceState)
+ {
+ super.onCreate(savedInstanceState);
+ context = this;
+
+ }
+
+ @Override
+ protected void onStart() {
+
+ super.onStart();
+ setContentView(R.layout.layout_wizard_permissions);
+
+ stepThree();
+
+ }
+
+ @Override
+ protected void onResume() {
+ super.onResume();
+
+
+ }
+
+ private void stepThree(){
+
+ boolean isRootPossible = TorServiceUtils.isRootPossible();
+
+ if (isRootPossible)
+ {
+ stepFourRoot();
+ }
+ else
+ {
+ stepFour();
+ }
+
+ }
+
+ private void stepFourRoot(){
+
+ String title = context.getString(R.string.wizard_permissions_title);
+ String msg1 = context.getString(R.string.wizard_permissions_root_msg1);
+ String msg2 = context.getString(R.string.wizard_permissions_root_msg2);
+
+ TextView txtTitle = ((TextView)findViewById(R.id.WizardTextTitle));
+ txtTitle.setText(title);
+
+ TextView txtBody1 = ((TextView)findViewById(R.id.WizardTextBody1));
+ txtBody1.setText(msg1);
+
+
+ TextView txtBody2 = ((TextView)findViewById(R.id.WizardTextBody2));
+ txtBody2.setText(msg2);
+ txtBody2.setVisibility(TextView.VISIBLE);
+
+ Button grantPermissions = ((Button)findViewById(R.id.grantPermissions));
+ grantPermissions.setVisibility(Button.VISIBLE);
+
+ Button back = ((Button)findViewById(R.id.btnWizard1));
+ Button next = ((Button)findViewById(R.id.btnWizard2));
+ next.setEnabled(false);
+
+ CheckBox consent = (CheckBox)findViewById(R.id.checkBox);
+ consent.setVisibility(CheckBox.VISIBLE);
+
+ consent.setOnCheckedChangeListener(new OnCheckedChangeListener (){
+
+ @Override
+ public void onCheckedChanged(CompoundButton buttonView,
+ boolean isChecked) {
+
+
+ SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);
+
+ Editor pEdit = prefs.edit();
+
+ pEdit.putBoolean(PREF_TRANSPARENT, !isChecked);
+ pEdit.putBoolean(PREF_TRANSPARENT_ALL, !isChecked);
+
+ pEdit.putBoolean(PREF_HAS_ROOT, !isChecked);
+
+
+ pEdit.commit();
+
+ Button next = ((Button)findViewById(R.id.btnWizard2));
+ if(isChecked)
+ next.setEnabled(true);
+ else
+ next.setEnabled(false);
+
+
+ }
+
+ });
+
+
+ grantPermissions.setOnClickListener(new View.OnClickListener() {
+
+ @Override
+ public void onClick(View v) {
+ //Check and Install iptables - TorTransProxy.testOwnerModule(this)
+
+ SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);
+ boolean hasRoot = prefs.getBoolean("has_root",false);
+
+ if (hasRoot)
+ {
+ try {
+ int resp = TorTransProxy.testOwnerModule(context);
+
+ if (resp < 0)
+ {
+ hasRoot = false;
+ Toast.makeText(context, "ERROR: IPTables OWNER module not available", Toast.LENGTH_LONG).show();
+
+ Log.i(TorService.TAG,"ERROR: IPTables OWNER module not available");
+ stepFour();
+ }
+
+ } catch (Exception e) {
+
+ hasRoot = false;
+ Log.d(TorService.TAG,"ERROR: IPTables OWNER module not available",e);
+ }
+ }
+
+ startActivityForResult(new Intent(getBaseContext(), ConfigureTransProxy.class), 1);
+
+
+ }
+ });
+
+ back.setOnClickListener(new View.OnClickListener() {
+
+ @Override
+ public void onClick(View v) {
+
+ startActivityForResult(new Intent(getBaseContext(), LotsaText.class), 1);
+ }
+ });
+
+
+ next.setOnClickListener(new View.OnClickListener() {
+
+
+ @Override
+ public void onClick(View v) {
+ startActivityForResult(new Intent(getBaseContext(), TipsAndTricks.class), 1);
+ }
+ });
+
+ }
+
+ private void stepFour(){
+
+ String title = context.getString(R.string.wizard_permissions_title);
+ String msg = context.getString(R.string.wizard_permissions_no_root_msg);
+
+ TextView txtTitle = ((TextView)findViewById(R.id.WizardTextTitle));
+ txtTitle.setText(title);
+
+ TextView txtBody = ((TextView)findViewById(R.id.WizardTextBody1));
+ txtBody.setText(msg);
+
+ Button btn1 = ((Button)findViewById(R.id.btnWizard1));
+ Button btn2 = ((Button)findViewById(R.id.btnWizard2));
+ btn2.setEnabled(true);
+
+ ImageView img = (ImageView) findViewById(R.id.orbot_image);
+ img.setImageResource(R.drawable.warning);
+
+ TextView txtBody2 = ((TextView)findViewById(R.id.WizardTextBody2));
+ txtBody2.setVisibility(TextView.GONE);
+
+ Button grantPermissions = ((Button)findViewById(R.id.grantPermissions));
+ grantPermissions.setVisibility(Button.GONE);
+
+
+ CheckBox consent = (CheckBox)findViewById(R.id.checkBox);
+ consent.setVisibility(CheckBox.GONE);
+
+ btn1.setOnClickListener(new View.OnClickListener() {
+
+ @Override
+ public void onClick(View v) {
+
+ startActivityForResult(new Intent(getBaseContext(), LotsaText.class), 1);
+ }
+ });
+
+ btn2.setOnClickListener(new View.OnClickListener() {
+
+ @Override
+ public void onClick(View v) {
+ startActivityForResult(new Intent(getBaseContext(), TipsAndTricks.class), 1);
+ }
+ });
+ }
+
+
+}
\ No newline at end of file
diff --git a/src/org/torproject/android/wizard/TipsAndTricks.java b/src/org/torproject/android/wizard/TipsAndTricks.java
new file mode 100644
index 0000000..c46f2e4
--- /dev/null
+++ b/src/org/torproject/android/wizard/TipsAndTricks.java
@@ -0,0 +1,180 @@
+package org.torproject.android.wizard;
+
+import org.torproject.android.Orbot;
+import org.torproject.android.R;
+import org.torproject.android.TorConstants;
+import org.torproject.android.R.drawable;
+import org.torproject.android.R.id;
+import org.torproject.android.R.layout;
+import org.torproject.android.R.string;
+
+import android.app.Activity;
+import android.app.AlertDialog;
+import android.content.Context;
+import android.content.DialogInterface;
+import android.content.Intent;
+import android.content.SharedPreferences;
+import android.content.SharedPreferences.Editor;
+import android.net.Uri;
+import android.os.Bundle;
+import android.preference.PreferenceManager;
+import android.view.View;
+import android.view.View.OnClickListener;
+import android.widget.Button;
+import android.widget.ImageView;
+import android.widget.TextView;
+
+public class TipsAndTricks extends Activity implements TorConstants {
+
+ protected void onCreate(Bundle savedInstanceState)
+ {
+ super.onCreate(savedInstanceState);
+
+ }
+
+ @Override
+ protected void onStart() {
+
+ super.onStart();
+ setContentView(R.layout.layout_wizard_tips);
+
+ stepFive();
+
+ }
+
+ @Override
+ protected void onResume() {
+ super.onResume();
+
+
+ }
+
+ void stepFive(){
+
+ String title = getString(R.string.wizard_tips_title);
+ TextView txtTitle = ((TextView)findViewById(R.id.WizardTextTitle));
+ txtTitle.setText(title);
+
+ ImageView img = (ImageView) findViewById(R.id.orbot_image);
+ img.setImageResource(R.drawable.icon);
+
+
+ Button btn1 = (Button)findViewById(R.id.WizardRootButtonInstallGibberbot);
+
+ btn1.setOnClickListener(new OnClickListener() {
+
+ @Override
+ public void onClick(View view) {
+
+ String url = getString(R.string.gibberbot_apk_url);
+ startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse(url)));
+
+ }
+ });
+
+ Button btn2 = (Button)findViewById(R.id.WizardRootButtonInstallOrweb);
+
+ btn2.setOnClickListener(new OnClickListener() {
+
+ @Override
+ public void onClick(View view) {
+
+ String url = getString(R.string.orweb_apk_url);
+ startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse(url)));
+
+ }
+ });
+
+
+ Button back = ((Button)findViewById(R.id.btnWizard1));
+ Button next = ((Button)findViewById(R.id.btnWizard2));
+
+ back.setOnClickListener(new View.OnClickListener() {
+
+ @Override
+ public void onClick(View v) {
+
+ startActivityForResult(new Intent(getBaseContext(), Permissions.class), 1);
+ }
+ });
+
+ next.setOnClickListener(new View.OnClickListener() {
+
+ @Override
+ public void onClick(View v) {
+ showWizardFinal();
+ }
+ });
+
+ }
+
+ private void showWizardFinal ()
+ {
+ setContentView(R.layout.scrollingtext_buttons_view);
+ String title = getString(R.string.wizard_final);
+ String msg = getString(R.string.wizard_final_msg);
+
+ TextView txtTitle = ((TextView)findViewById(R.id.WizardTextTitle));
+ txtTitle.setText(title);
+
+ TextView txtBody = ((TextView)findViewById(R.id.WizardTextBody));
+ txtBody.setText(msg);
+
+ Button btn1 = ((Button)findViewById(R.id.btnWizard1));
+ Button btn2 = ((Button)findViewById(R.id.btnWizard2));
+ ImageView img = (ImageView) findViewById(R.id.orbot_image);
+
+ btn2.setText(getString(R.string.btn_finish));
+ btn1.setVisibility(Button.VISIBLE);
+ img.setImageResource(R.drawable.icon);
+
+ btn1.setOnClickListener(new View.OnClickListener() {
+
+ @Override
+ public void onClick(View v) {
+ startActivityForResult(new Intent(getBaseContext(), Permissions.class), 1);
+
+ }
+ });
+
+ btn2.setOnClickListener(new View.OnClickListener() {
+
+ @Override
+ public void onClick(View v) {
+ startActivity(new Intent(getBaseContext(), Orbot.class));
+
+ }
+ });
+ }
+ /*
+ private void showWizardFinal ()
+ {
+ String title = null;
+ String msg = null;
+
+
+ title = context.getString(R.string.wizard_final);
+ msg = context.getString(R.string.wizard_final_msg);
+
+ DialogInterface.OnClickListener ocListener = new DialogInterface.OnClickListener() {
+
+ @Override
+ public void onClick(DialogInterface dialog, int which) {
+ context.startActivity(new Intent(context, Orbot.class));
+
+ }
+ };
+
+
+ new AlertDialog.Builder(context)
+ .setIcon(R.drawable.icon)
+ .setTitle(title)
+ .setPositiveButton(R.string.button_close, ocListener)
+ .setMessage(msg)
+ .show();
+
+
+
+
+ }*/
+}
\ No newline at end of file
diff --git a/src/org/torproject/android/wizard/WizardHelper.java b/src/org/torproject/android/wizard/WizardHelper.java
new file mode 100644
index 0000000..18be47f
--- /dev/null
+++ b/src/org/torproject/android/wizard/WizardHelper.java
@@ -0,0 +1,435 @@
+package org.torproject.android.wizard;
+
+import org.torproject.android.R;
+import org.torproject.android.TorConstants;
+import org.torproject.android.R.drawable;
+import org.torproject.android.R.id;
+import org.torproject.android.R.layout;
+import org.torproject.android.R.string;
+import org.torproject.android.service.TorService;
+import org.torproject.android.service.TorServiceUtils;
+import org.torproject.android.service.TorTransProxy;
+
+import android.app.AlertDialog;
+import android.app.Dialog;
+import android.content.Context;
+import android.content.DialogInterface;
+import android.content.Intent;
+import android.content.SharedPreferences;
+import android.content.SharedPreferences.Editor;
+import android.net.Uri;
+import android.preference.PreferenceManager;
+import android.util.Log;
+import android.view.LayoutInflater;
+import android.view.View;
+import android.view.View.OnClickListener;
+import android.widget.Button;
+import android.widget.CheckBox;
+import android.widget.CompoundButton;
+import android.widget.TextView;
+import android.widget.CompoundButton.OnCheckedChangeListener;
+import android.widget.Toast;
+
+public class WizardHelper implements TorConstants {
+
+ private Context context;
+ private AlertDialog currentDialog;
+
+ public WizardHelper (Context context)
+ {
+ this.context = context;
+ }
+
+
+ public void showWizard ()
+ {
+ showWizardStep1();
+ }
+
+ public void showWizardStep1()
+ {
+
+
+ String title = context.getString(R.string.wizard_title);
+
+ LayoutInflater li = LayoutInflater.from(context);
+ View view = li.inflate(R.layout.layout_wizard_welcome, null);
+
+
+ showCustomDialog(title, view,context.getString(R.string.btn_next),null,new DialogInterface.OnClickListener() {
+
+ @Override
+ public void onClick(DialogInterface dialog, int which) {
+ dialog.dismiss();
+
+ if (which == DialogInterface.BUTTON_NEUTRAL)
+ {
+
+ showWizardStep2();
+ }
+ /*
+ else if (which == DialogInterface.BUTTON_POSITIVE)
+ {
+ showAbout();
+ }*/
+
+ }
+ });
+ }
+
+ public void showWizardStep2()
+ {
+
+
+ String title = context.getString(R.string.wizard_permissions_stock);
+
+ LayoutInflater li = LayoutInflater.from(context);
+ View view = li.inflate(R.layout.layout_wizard_stock, null);
+
+ Button btn1 = (Button)view.findViewById(R.id.WizardRootButtonEnable);
+
+ btn1.setOnClickListener(new OnClickListener() {
+
+ @Override
+ public void onClick(View view) {
+
+
+ boolean isRootPossible = TorServiceUtils.isRootPossible();
+
+ if (isRootPossible)
+ {
+ try {
+ int resp = TorTransProxy.testOwnerModule(context);
+
+ if (resp < 0)
+ {
+ isRootPossible = false;
+ Toast.makeText(context, "ERROR: IPTables OWNER module not available", Toast.LENGTH_LONG).show();
+
+ Log.i(TorService.TAG,"ERROR: IPTables OWNER module not available");
+ }
+
+ } catch (Exception e) {
+
+ isRootPossible = false;
+ Log.d(TorService.TAG,"ERROR: IPTables OWNER module not available",e);
+ }
+ }
+
+ /*
+ * we shouldn't store root here, as this step is just chekcing to see if root is possible
+ SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);
+
+ Editor pEdit = prefs.edit();
+ pEdit.putBoolean("has_root",hasRoot);
+ pEdit.commit();
+ */
+
+ if (isRootPossible)
+ {
+ currentDialog.dismiss();
+ showWizardStep2Root();
+ }
+ else
+ {
+ Toast.makeText(context, "Unable to get root access", Toast.LENGTH_LONG).show();
+ view.setEnabled(false);
+ }
+ }
+ });
+
+ CheckBox cb1 = (CheckBox)view.findViewById(R.id.CheckBoxConsent);
+
+ cb1.setOnCheckedChangeListener(new OnCheckedChangeListener (){
+
+ @Override
+ public void onCheckedChanged(CompoundButton buttonView,
+ boolean isChecked) {
+
+ currentDialog.getButton(AlertDialog.BUTTON_NEUTRAL).setEnabled(isChecked);
+
+ SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);
+
+ Editor pEdit = prefs.edit();
+ pEdit.putBoolean("has_root",false);
+ pEdit.commit();
+
+ }
+
+ });
+
+
+ showCustomDialog(title, view,context.getString(R.string.btn_next),context.getString(R.string.btn_back),new DialogInterface.OnClickListener() {
+
+ @Override
+ public void onClick(DialogInterface dialog, int which) {
+ dialog.dismiss();
+
+ if (which == DialogInterface.BUTTON_NEUTRAL)
+ {
+ showWizardTipsAndTricks();
+ }
+ else if (which == DialogInterface.BUTTON_POSITIVE)
+ {
+ showWizardStep1();
+ }
+
+ }
+ });
+
+ currentDialog.getButton(AlertDialog.BUTTON_NEUTRAL).setEnabled(false);
+
+
+ }
+
+ public void showWizardStep2Root()
+ {
+
+ String title = null;
+ String msg = null;
+
+
+
+ title = context.getString(R.string.wizard_permissions_root);
+ msg = context.getString(R.string.wizard_premissions_msg_root);
+
+
+
+ showDialog(title, msg,context.getString(R.string.btn_next),context.getString(R.string.btn_back),new DialogInterface.OnClickListener() {
+
+ @Override
+ public void onClick(DialogInterface dialog, int which) {
+ dialog.dismiss();
+
+ if (which == DialogInterface.BUTTON_NEUTRAL)
+ {
+ showWizardRootConfigureTorification();
+ }
+ else if (which == DialogInterface.BUTTON_POSITIVE)
+ {
+ showWizardStep1();
+ }
+
+ }
+ });
+
+
+ }
+
+ public void showWizardTipsAndTricks()
+ {
+
+ String title = context.getString(R.string.wizard_tips_tricks);
+
+ LayoutInflater li = LayoutInflater.from(context);
+ View view = li.inflate(R.layout.layout_wizard_tips, null);
+
+ Button btn1 = (Button)view.findViewById(R.id.WizardRootButtonInstallGibberbot);
+
+ btn1.setOnClickListener(new OnClickListener() {
+
+ @Override
+ public void onClick(View view) {
+
+ String url = context.getString(R.string.otrchat_apk_url);
+ context.startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse(url)));
+
+ }
+ });
+
+ Button btn2 = (Button)view.findViewById(R.id.WizardRootButtonInstallOrweb);
+
+ btn2.setOnClickListener(new OnClickListener() {
+
+ @Override
+ public void onClick(View view) {
+
+ String url = context.getString(R.string.orweb_apk_url);
+ context.startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse(url)));
+
+ }
+ });
+
+ /*
+ Button btn3 = (Button)view.findViewById(R.id.WizardRootButtonInstallProxyMob);
+
+ btn3.setOnClickListener(new OnClickListener() {
+
+ @Override
+ public void onClick(View view) {
+
+ showProxyHelp();
+
+ }
+ });
+ */
+ showCustomDialog(title, view,context.getString(R.string.btn_next),context.getString(R.string.btn_back),new DialogInterface.OnClickListener() {
+
+
+
+ @Override
+ public void onClick(DialogInterface dialog, int which) {
+ dialog.dismiss();
+
+ if (which == DialogInterface.BUTTON_NEUTRAL)
+ {
+ showWizardFinal();
+
+ }
+ else if (which == DialogInterface.BUTTON_POSITIVE)
+ {
+ showWizardStep2();
+ }
+
+ }
+ });
+ }
+
+ public void showWizardRootConfigureTorification()
+ {
+ /*
+ LayoutInflater li = LayoutInflater.from(context);
+ View view = li.inflate(R.layout.layout_wizard_root, null);
+
+ CheckBox cb1 = (CheckBox)view.findViewById(R.id.WizardRootCheckBox01);
+ Button btn1 = (Button)view.findViewById(R.id.WizardRootButton01);
+
+ cb1.setOnCheckedChangeListener(new OnCheckedChangeListener (){
+
+ @Override
+ public void onCheckedChanged(CompoundButton buttonView,
+ boolean isChecked) {
+
+
+ SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);
+
+ Editor pEdit = prefs.edit();
+
+ pEdit.putBoolean(PREF_TRANSPARENT, isChecked);
+ pEdit.putBoolean(PREF_TRANSPARENT_ALL, isChecked);
+
+ pEdit.commit();
+
+ //Button btn1 = (Button)buttonView.getParent().findViewById(R.id.WizardRootButton01);
+ //btn1.setEnabled(!isChecked);
+
+ }
+
+ });
+
+
+
+ btn1.setOnClickListener(new OnClickListener() {
+
+ @Override
+ public void onClick(View view) {
+
+
+ SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);
+
+ Editor pEdit = prefs.edit();
+ pEdit.putBoolean(PREF_TRANSPARENT, true);
+ pEdit.putBoolean(PREF_TRANSPARENT_ALL, false);
+ pEdit.commit();
+
+ context.startActivity(new Intent(context, AppManager.class));
+
+ }
+ });
+
+ showCustomDialog(context.getString(R.string.wizard_configure),view,context.getString(R.string.btn_next),context.getString(R.string.btn_back),new DialogInterface.OnClickListener() {
+
+ @Override
+ public void onClick(DialogInterface dialog, int which) {
+
+ dialog.dismiss();
+
+ if (which == DialogInterface.BUTTON_NEUTRAL)
+ {
+ showWizardTipsAndTricks();
+
+ }
+ else if (which == DialogInterface.BUTTON_POSITIVE)
+ {
+ showWizardStep2();
+ }
+
+ }
+ });
+
+ */
+
+ }
+
+
+ private void showWizardFinal ()
+ {
+ String title = null;
+ String msg = null;
+
+
+ title = context.getString(R.string.wizard_final);
+ msg = context.getString(R.string.wizard_final_msg);
+
+ new AlertDialog.Builder(context)
+ .setIcon(R.drawable.icon)
+ .setTitle(title)
+ .setPositiveButton(R.string.button_close, null)
+ .setMessage(msg)
+ .show();
+
+
+
+
+
+ }
+
+ public void showDialog (String title, String msg, String button1, String button2, DialogInterface.OnClickListener ocListener)
+ {
+
+// dialog.setContentView(R.layout.custom_dialog);
+
+
+ AlertDialog.Builder builder = new AlertDialog.Builder(context)
+ .setIcon(R.drawable.icon)
+ .setTitle(title)
+ .setMessage(msg)
+ .setNeutralButton(button1, ocListener)
+ .setPositiveButton(button2, ocListener);
+
+
+ currentDialog = builder.show();
+
+
+ }
+
+ private void showCustomDialog (String title, View view, String button1, String button2, DialogInterface.OnClickListener ocListener)
+ {
+
+ currentDialog = new AlertDialog.Builder(context)
+ .setIcon(R.drawable.icon)
+ .setTitle(title)
+ .setView(view)
+ .setNeutralButton(button1, ocListener)
+ .setPositiveButton(button2, ocListener)
+ .show();
+
+
+ }
+
+
+
+ private void showProxyHelp ()
+ {
+
+ LayoutInflater li = LayoutInflater.from(context);
+ View view = li.inflate(R.layout.layout_wizard_proxy_help, null);
+
+ new AlertDialog.Builder(context)
+ .setTitle(context.getString(R.string.wizard_proxy_help_info))
+ .setView(view)
+ .show();
+ }
+
+}
+
1
0

[orbot/master] removed version string from resources; now dynamic
by n8fr8@torproject.org 28 Oct '11
by n8fr8@torproject.org 28 Oct '11
28 Oct '11
commit f74ebfc75af82255e7bf1ffcfde2a99af46f0880
Author: Nathan Freitas <nathan(a)freitas.net>
Date: Mon Jul 25 10:50:56 2011 -0400
removed version string from resources; now dynamic
---
res/values-ar/strings.xml | 1 -
res/values-ca/strings.xml | 1 -
res/values-de/strings.xml | 1 -
res/values-es/strings.xml | 1 -
res/values-fa/strings.xml | 1 -
res/values-mk/strings.xml | 1 -
res/values-nb/strings.xml | 1 -
res/values-nl/strings.xml | 1 -
res/values-pl/strings.xml | 1 -
res/values-pt/strings.xml | 1 -
res/values-ru/strings.xml | 1 -
res/values-sv/strings.xml | 1 -
res/values-zh/strings.xml | 1 -
res/values/strings.xml | 11 ++++++++++-
14 files changed, 10 insertions(+), 14 deletions(-)
diff --git a/res/values-ar/strings.xml b/res/values-ar/strings.xml
index 78f85f5..a4e22a2 100644
--- a/res/values-ar/strings.xml
+++ b/res/values-ar/strings.xml
@@ -1,7 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="app_name">اوربوت (Orbot)</string>
- <string name="app_version">1.0.5.2</string>
<string name="internal_web_url">http://orbot/</string>
<string name="default_web_url">http://check.torproject.org</string>
diff --git a/res/values-ca/strings.xml b/res/values-ca/strings.xml
index 56b9b15..c6d6321 100644
--- a/res/values-ca/strings.xml
+++ b/res/values-ca/strings.xml
@@ -1,7 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="app_name">Orbot</string>
- <string name="app_version">1.0.5.2</string>
<string name="internal_web_url">http://orbot/</string>
<string name="default_web_url">http://check.torproject.org</string>
diff --git a/res/values-de/strings.xml b/res/values-de/strings.xml
index 222b539..039062b 100644
--- a/res/values-de/strings.xml
+++ b/res/values-de/strings.xml
@@ -1,7 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="app_name">Orbot</string>
- <string name="app_version">1.0.5.2</string>
<string name="internal_web_url">http://orbot/</string>
<string name="default_web_url">http://check.torproject.org</string>
diff --git a/res/values-es/strings.xml b/res/values-es/strings.xml
index 85f829a..9b9768d 100644
--- a/res/values-es/strings.xml
+++ b/res/values-es/strings.xml
@@ -1,7 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="app_name">Orbot</string>
- <string name="app_version">1.0.5.2</string>
<string name="internal_web_url">http://orbot/</string>
<string name="default_web_url">http://check.torproject.org</string>
diff --git a/res/values-fa/strings.xml b/res/values-fa/strings.xml
index 57dc1fc..cd52e7d 100644
--- a/res/values-fa/strings.xml
+++ b/res/values-fa/strings.xml
@@ -1,7 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="app_name">اوربات</string>
- <string name="app_version">1.0.5.2</string>
<string name="internal_web_url">http://orbot/</string>
<string name="default_web_url">http://check.torproject.org</string>
diff --git a/res/values-mk/strings.xml b/res/values-mk/strings.xml
index 4b2e919..4d1454d 100644
--- a/res/values-mk/strings.xml
+++ b/res/values-mk/strings.xml
@@ -1,7 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="app_name">Орбот</string>
- <string name="app_version">1.0.5.2</string>
<string name="internal_web_url">http://orbot/</string>
<string name="default_web_url">http://check.torproject.org</string>
diff --git a/res/values-nb/strings.xml b/res/values-nb/strings.xml
index 02af5a4..1bc5d65 100644
--- a/res/values-nb/strings.xml
+++ b/res/values-nb/strings.xml
@@ -1,7 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="app_name">Orbot</string>
- <string name="app_version">1.0.5.2</string>
<string name="internal_web_url">http://orbot/</string>
<string name="default_web_url">http://check.torproject.org</string>
diff --git a/res/values-nl/strings.xml b/res/values-nl/strings.xml
index 3ab7265..1d4dfb4 100644
--- a/res/values-nl/strings.xml
+++ b/res/values-nl/strings.xml
@@ -1,7 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="app_name">Orbot</string>
- <string name="app_version">1.0.5.2</string>
<string name="internal_web_url">http://orbot/</string>
<string name="default_web_url">http://check.torproject.org</string>
diff --git a/res/values-pl/strings.xml b/res/values-pl/strings.xml
index 7b4c77b..7b42d3f 100644
--- a/res/values-pl/strings.xml
+++ b/res/values-pl/strings.xml
@@ -1,7 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="app_name">Orbot</string>
- <string name="app_version">1.0.5.2</string>
<string name="internal_web_url">http://orbot/</string>
<string name="default_web_url">http://check.torproject.org</string>
diff --git a/res/values-pt/strings.xml b/res/values-pt/strings.xml
index 915098b..7925730 100644
--- a/res/values-pt/strings.xml
+++ b/res/values-pt/strings.xml
@@ -1,7 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="app_name">Orbot</string>
- <string name="app_version">1.0.5.2</string>
<string name="internal_web_url">http://orbot/</string>
<string name="default_web_url">http://check.torproject.org</string>
<string name="secure_default_web_url">https://check.torproject.org</string>
diff --git a/res/values-ru/strings.xml b/res/values-ru/strings.xml
index d6a6b78..1b66df4 100644
--- a/res/values-ru/strings.xml
+++ b/res/values-ru/strings.xml
@@ -1,7 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="app_name">Orbot</string>
- <string name="app_version">1.0.5.2</string>
<string name="internal_web_url">http://orbot/</string>
<string name="default_web_url">http://check.torproject.org</string>
diff --git a/res/values-sv/strings.xml b/res/values-sv/strings.xml
index de49b99..5d5be5b 100644
--- a/res/values-sv/strings.xml
+++ b/res/values-sv/strings.xml
@@ -1,7 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="app_name">Orbot</string>
- <string name="app_version">1.0.5.2</string>
<string name="internal_web_url">http://orbot/</string>
<string name="default_web_url">http://check.torproject.org</string>
diff --git a/res/values-zh/strings.xml b/res/values-zh/strings.xml
index 08d43b3..0354e0d 100644
--- a/res/values-zh/strings.xml
+++ b/res/values-zh/strings.xml
@@ -1,7 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="app_name">Orbot</string>
- <string name="app_version">1.0.5.2</string>
<string name="internal_web_url">http://orbot/</string>
<string name="default_web_url">http://check.torproject.org</string>
diff --git a/res/values/strings.xml b/res/values/strings.xml
index 6a82430..d9befc4 100644
--- a/res/values/strings.xml
+++ b/res/values/strings.xml
@@ -1,7 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="app_name">Orbot</string>
- <string name="app_version">1.0.5.2</string>
<string name="internal_web_url">http://orbot/</string>
<string name="default_web_url">http://check.torproject.org</string>
@@ -158,4 +157,14 @@
<string name="pref_transparent_tethering_title">Tor Tethering</string>
<string name="pref_transparent_tethering_summary">Enable Tor Transparent Proxying for Wifi and USB Tethered Devices</string>
+
+<string name="pref_select_apps">Select Apps</string>
+<string name="pref_select_apps_summary">Choose Apps to Route Through Tor</string>
+
+<string name="pref_node_configuration">Node Configuration</string>
+<string name="pref_node_configuration_summary">These are advanced settings that can reduce your anonymity</string>
+
+<string name="pref_entrance_node">Entrance Nodes</string>
+<string name="pref_entrance_node_summary">Fingerprints, nicks, countries and addresses for the first hop</string>
+<string name="pref_entrance_node_dialog">Enter Entrance Nodes</string>
</resources>
1
0
commit 322284ef9b3b6af758ddab115685a7d688769c50
Author: Sathyanarayanan Gunasekaran <gsathya.ceg(a)gmail.com>
Date: Tue Jun 14 22:38:14 2011 +0530
Added warning icon to Warning screen
---
res/drawable/warning.png | Bin 0 -> 2922 bytes
res/layout/scrollingtext_buttons_view.xml | 8 +++++---
src/org/torproject/android/LotsaText.java | 6 +++---
3 files changed, 8 insertions(+), 6 deletions(-)
diff --git a/res/drawable/warning.png b/res/drawable/warning.png
new file mode 100644
index 0000000..42dc6d6
Binary files /dev/null and b/res/drawable/warning.png differ
diff --git a/res/layout/scrollingtext_buttons_view.xml b/res/layout/scrollingtext_buttons_view.xml
index 930bf72..ebecfad 100644
--- a/res/layout/scrollingtext_buttons_view.xml
+++ b/res/layout/scrollingtext_buttons_view.xml
@@ -14,12 +14,12 @@
android:background="#000000"
>
<ImageView
- android:src="@drawable/tor"
+ android:src="@drawable/warning"
android:id="@+id/orbot_image"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
- android:paddingLeft="20px" android:paddingRight="20px" >
+ android:paddingLeft="20px" android:layout_marginLeft="10dip" android:layout_marginTop="8dip">
</ImageView>
<TextView
android:textColor="#FFFFFF"
@@ -37,7 +37,9 @@
android:layout_centerInParent="true"
- android:padding="20px">
+ android:paddingLeft="5px"
+ android:padding="20px"
+ >
</TextView>
</RelativeLayout>
<TableLayout android:id="@+id/TableLayout01" android:stretchColumns="*" android:layout_height="fill_parent" android:layout_width="wrap_content" >
diff --git a/src/org/torproject/android/LotsaText.java b/src/org/torproject/android/LotsaText.java
index 43e6d16..9f845db 100644
--- a/src/org/torproject/android/LotsaText.java
+++ b/src/org/torproject/android/LotsaText.java
@@ -73,8 +73,8 @@ public class LotsaText extends Activity implements TorConstants{
ImageView img = (ImageView) findViewById(R.id.orbot_image);
btn1.setVisibility(Button.INVISIBLE);
- img.setVisibility(ImageView.VISIBLE);
-
+ img.setImageResource(R.drawable.tor);
+
btn2.setOnClickListener(new View.OnClickListener() {
@Override
@@ -108,7 +108,7 @@ public class LotsaText extends Activity implements TorConstants{
ImageView img = (ImageView) findViewById(R.id.orbot_image);
btn1.setVisibility(Button.VISIBLE);
- img.setVisibility(ImageView.INVISIBLE);
+ img.setImageResource(R.drawable.warning);
btn1.setOnClickListener(new View.OnClickListener() {
1
0
commit 457bd78a46e52fbeae804b67b6f55501414f2f0b
Author: Sathyanarayanan Gunasekaran <gsathya.ceg(a)gmail.com>
Date: Sat Jun 11 03:45:32 2011 +0530
Calls new wizard onResume
---
src/org/torproject/android/Orbot.java | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/src/org/torproject/android/Orbot.java b/src/org/torproject/android/Orbot.java
index 7f8af3b..f5f5f03 100644
--- a/src/org/torproject/android/Orbot.java
+++ b/src/org/torproject/android/Orbot.java
@@ -410,7 +410,7 @@ public class Orbot extends Activity implements OnLongClickListener, TorConstants
pEdit.commit();
- new WizardHelper(this).showWizard();
+ startActivityForResult(new Intent(getBaseContext(), LotsaText.class), 1);
}
1
0