Merge branch 'master' into hidden_services

# Conflicts:
#	app/src/main/java/org/torproject/android/OrbotMainActivity.java
This commit is contained in:
Juan Ezquerro LLanes 2016-11-29 11:09:49 +01:00
commit 3ba1d395ea
4 changed files with 834 additions and 727 deletions

File diff suppressed because it is too large Load Diff

View File

@ -78,7 +78,20 @@
</LinearLayout> </LinearLayout>
<TextView
android:id="@+id/lblStatus"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textSize="14sp"
android:fontFamily="sans-serif-light"
android:text=""
android:lines="1"
android:maxLines="1"
android:layout_margin="12dp"
android:layout_alignParentBottom="true"
android:gravity="center"
android:ellipsize="end"
/>
</RelativeLayout> </RelativeLayout>

View File

@ -107,17 +107,7 @@
/> />
</RelativeLayout> </RelativeLayout>
<TextView
android:id="@+id/lblStatus"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textSize="14sp"
android:fontFamily="sans-serif-light"
android:text=""
android:lines="2"
android:maxLines="2"
android:layout_margin="12dp"
/>
</LinearLayout> </LinearLayout>

View File

@ -543,14 +543,13 @@ public class TorService extends Service implements TorServiceConstants, OrbotCon
if (mNotificationManager == null) if (mNotificationManager == null)
{ {
IntentFilter mNetworkStateFilter = new IntentFilter(ConnectivityManager.CONNECTIVITY_ACTION);
registerReceiver(mNetworkStateReceiver , mNetworkStateFilter);
mNotificationManager = (NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE); mNotificationManager = (NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE);
} }
IntentFilter mNetworkStateFilter = new IntentFilter(ConnectivityManager.CONNECTIVITY_ACTION);
registerReceiver(mNetworkStateReceiver , mNetworkStateFilter);
new Thread(new Runnable () new Thread(new Runnable ()
{ {
public void run () public void run ()
@ -735,7 +734,8 @@ public class TorService extends Service implements TorServiceConstants, OrbotCon
} else if (mCurrentStatus == STATUS_ON) { } else if (mCurrentStatus == STATUS_ON) {
sendCallbackLogMessage("Ignoring start request, already started."); sendCallbackLogMessage("Ignoring start request, already started.");
setTorNetworkEnabled (true);
return; return;
} }
@ -1525,7 +1525,7 @@ public class TorService extends Service implements TorServiceConstants, OrbotCon
mNetworkType = newNetType; mNetworkType = newNetType;
mConnectivity = newConnectivityState; mConnectivity = newConnectivityState;
if (doNetworKSleep) if (doNetworKSleep && mCurrentStatus != STATUS_OFF)
{ {
setTorNetworkEnabled (mConnectivity); setTorNetworkEnabled (mConnectivity);
@ -1543,18 +1543,15 @@ public class TorService extends Service implements TorServiceConstants, OrbotCon
try { try {
if (mCurrentStatus != STATUS_OFF) if (mConnectivity)
{ {
if (mConnectivity) if (Prefs.useRoot() && Prefs.useTransparentProxying() && Prefs.transProxyNetworkRefresh())
{ {
if (Prefs.useRoot() && Prefs.useTransparentProxying() && Prefs.transProxyNetworkRefresh())
{
disableTransparentProxy(); disableTransparentProxy();
enableTransparentProxy(); enableTransparentProxy();
}
} }
} }