Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f08ea668c3 | ||
|
|
eca476b913 | ||
|
|
612c5fdabe |
No files matched your search
+2
-2
@@ -1,8 +1,8 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
package="org.xapek.andiodine"
|
||||
android:versionCode="2"
|
||||
android:versionName="1.1">
|
||||
android:versionCode="3"
|
||||
android:versionName="1.3">
|
||||
|
||||
<uses-sdk
|
||||
android:minSdkVersion="14"
|
||||
|
||||
@@ -16,6 +16,16 @@ LOCAL_PATH := $(call my-dir)
|
||||
|
||||
include $(CLEAR_VARS)
|
||||
|
||||
$(LOCAL_PATH)/iodine/src/base64u.c: $(LOCAL_PATH)/iodine/src/base64.c $(LOCAL_PATH)/iodine/src/base64u.h
|
||||
@echo Making $@
|
||||
@echo '/* No use in editing, produced by Makefile! */' > $@
|
||||
@sed -e 's/\([Bb][Aa][Ss][Ee]64\)/\1u/g ; s/0123456789+/0123456789_/' < $< >> $@
|
||||
|
||||
$(LOCAL_PATH)/iodine/src/base64u.h: $(LOCAL_PATH)/iodine/src/base64.h
|
||||
@echo Making $@
|
||||
@echo '/* No use in editing, produced by Makefile! */' > $@
|
||||
@sed -e 's/\([Bb][Aa][Ss][Ee]64\)/\1u/g ; s/0123456789+/0123456789_/' < $< >> $@
|
||||
|
||||
LOCAL_MODULE := iodine-client
|
||||
LOCAL_LDLIBS := -lz -llog
|
||||
LOCAL_CFLAGS := -Wall
|
||||
|
||||
@@ -46,7 +46,9 @@ public class FragmentStatus extends Fragment {
|
||||
} else if (IodineVpnService.ACTION_STATUS_CONNECT.equals(intent.getAction())) {
|
||||
mStatus.setText("Connect");
|
||||
} else if (IodineVpnService.ACTION_STATUS_CONNECTED.equals(intent.getAction())) {
|
||||
mStatus.setText("Connected");
|
||||
mStatus.setText("Connected: " + IodineClient.getIp() + '/'
|
||||
+ IodineClient.getNetbits() + " MTU: "
|
||||
+ IodineClient.getMtu() + '\n');
|
||||
} else if (IodineVpnService.ACTION_STATUS_DISCONNECT.equals(intent.getAction())) {
|
||||
mStatus.setText("Disconnect");
|
||||
}
|
||||
|
||||
@@ -39,7 +39,8 @@ public class IodineMain extends Activity {
|
||||
ft.replace(R.id.main_fragment_status, fragmentList);
|
||||
ft.setTransition(FragmentTransaction.TRANSIT_FRAGMENT_FADE);
|
||||
ft.commit();
|
||||
} else if (IodineVpnService.ACTION_STATUS_CONNECT.equals(intent.getAction())) {
|
||||
} else if (IodineVpnService.ACTION_STATUS_CONNECT.equals(intent.getAction())
|
||||
|| IodineVpnService.ACTION_STATUS_CONNECTED.equals(intent.getAction())) {
|
||||
// Switch to Status Fragment
|
||||
FragmentTransaction ft = getFragmentManager().beginTransaction();
|
||||
ft.replace(R.id.main_fragment_status, fragmentStatus);
|
||||
@@ -57,12 +58,6 @@ public class IodineMain extends Activity {
|
||||
|
||||
mConfigDatabase = new ConfigDatabase(this);
|
||||
|
||||
IntentFilter intentFilterStatusUpdates = new IntentFilter();
|
||||
intentFilterStatusUpdates.addAction(IodineVpnService.ACTION_STATUS_CONNECT);
|
||||
intentFilterStatusUpdates.addAction(IodineVpnService.ACTION_STATUS_ERROR);
|
||||
intentFilterStatusUpdates.addAction(IodineVpnService.ACTION_STATUS_IDLE);
|
||||
registerReceiver(broadcastReceiverStatusUpdates, intentFilterStatusUpdates);
|
||||
|
||||
startService(new Intent(this, IodineVpnService.class));
|
||||
}
|
||||
|
||||
@@ -73,8 +68,27 @@ public class IodineMain extends Activity {
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onDestroy() {
|
||||
protected void onResume() {
|
||||
super.onResume();
|
||||
IntentFilter intentFilterStatusUpdates = new IntentFilter();
|
||||
intentFilterStatusUpdates.addAction(IodineVpnService.ACTION_STATUS_CONNECT);
|
||||
intentFilterStatusUpdates.addAction(IodineVpnService.ACTION_STATUS_CONNECTED);
|
||||
intentFilterStatusUpdates.addAction(IodineVpnService.ACTION_STATUS_ERROR);
|
||||
intentFilterStatusUpdates.addAction(IodineVpnService.ACTION_STATUS_IDLE);
|
||||
registerReceiver(broadcastReceiverStatusUpdates, intentFilterStatusUpdates);
|
||||
|
||||
Log.d(TAG, "Request CONTROL_UPDATE");
|
||||
sendBroadcast(new Intent(IodineVpnService.ACTION_CONTROL_UPDATE));
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onPause() {
|
||||
unregisterReceiver(broadcastReceiverStatusUpdates);
|
||||
super.onPause();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onDestroy() {
|
||||
mConfigDatabase.close();
|
||||
super.onDestroy();
|
||||
}
|
||||
@@ -89,14 +103,10 @@ public class IodineMain extends Activity {
|
||||
.setCancelable(true)//
|
||||
.create() //
|
||||
.show();
|
||||
scanner.close();
|
||||
} else if (item.getItemId() == R.id.menu_main_add) {
|
||||
startActivity(new Intent(this, IodinePref.class));
|
||||
}
|
||||
return super.onOptionsItemSelected(item);
|
||||
}
|
||||
|
||||
|
||||
private void vpnServiceDisconnect() {
|
||||
sendBroadcast(new Intent(IodineVpnService.ACTION_CONTROL_DISCONNECT));
|
||||
}
|
||||
}
|
||||
@@ -188,6 +188,7 @@ public class IodineVpnService extends VpnService implements Runnable {
|
||||
}
|
||||
|
||||
private void sendStatus() {
|
||||
Log.d(TAG, "Send status: " + currentActionStatus);
|
||||
if (currentActionStatus != null) {
|
||||
Intent intent = new Intent(currentActionStatus);
|
||||
|
||||
|
||||
Reference in new issue
Block a user