diff options
author | Parménides GV <parmegv@sdf.org> | 2013-12-19 21:11:22 +0100 |
---|---|---|
committer | Parménides GV <parmegv@sdf.org> | 2013-12-19 21:11:22 +0100 |
commit | 3f5d756fa1a37dba00c400ca2a6197af5af1071e (patch) | |
tree | 3abe8236fe9789b0aebcf50b4cf3c7ebfe0605e1 | |
parent | 0669d0bb7c3c50d5ed042564fb3218bdb8237b19 (diff) | |
parent | 4d9b896481594297421a157a5906b5a8ead48ab6 (diff) |
Merge branch 'feature/UI_improvements' into develop
-rw-r--r-- | res/menu/client_dashboard.xml | 3 | ||||
-rwxr-xr-x | res/values-cs/strings.xml | 2 | ||||
-rwxr-xr-x | res/values-de/strings.xml | 2 | ||||
-rwxr-xr-x | res/values-id/strings.xml | 2 | ||||
-rwxr-xr-x | res/values-ja/strings.xml | 2 | ||||
-rwxr-xr-x | res/values-ru/strings.xml | 2 | ||||
-rwxr-xr-x | res/values-uk/strings.xml | 2 | ||||
-rwxr-xr-x | res/values/strings.xml | 2 | ||||
-rw-r--r-- | src/se/leap/bitmaskclient/EIP.java | 14 | ||||
-rw-r--r-- | src/se/leap/bitmaskclient/EipServiceFragment.java | 5 | ||||
-rw-r--r-- | src/se/leap/openvpn/OpenVpnService.java | 4 |
11 files changed, 25 insertions, 15 deletions
diff --git a/res/menu/client_dashboard.xml b/res/menu/client_dashboard.xml index 2ce8b87c..8f4a7ba8 100644 --- a/res/menu/client_dashboard.xml +++ b/res/menu/client_dashboard.xml @@ -17,11 +17,10 @@ <item android:id="@+id/switch_provider" android:orderInCategory="501" - android:title="@string/switch_provider_menu_option"/> + android:title="@string/switch_provider_menu_option"/> <item android:id="@+id/login_button" android:showAsAction="ifRoom" - android:icon="@drawable/ic_menu_login" android:title="@string/login_button" android:visible="false"> </item> diff --git a/res/values-cs/strings.xml b/res/values-cs/strings.xml index 85a4f8a2..3bb898d6 100755 --- a/res/values-cs/strings.xml +++ b/res/values-cs/strings.xml @@ -234,7 +234,7 @@ <string name="minidump_generated">OpenVPN neočekávaně havarovalo. Zvaž možnost použití volby poslat Minidump z hlavního menu</string> <string name="send_minidump">Poslat Minidump vývojáři</string> <string name="send_minidump_summary">Poslat ladící informace o poslední havárii vývojáři</string> - <string name="notifcation_title">OpenVPN - %s</string> + <string name="notifcation_title">Bitmask - %s</string> <string name="session_ipv4string">%1$s - %2$s</string> <string name="session_ipv6string">%1$s - %3$s, %2$s</string> <string name="state_connecting">Připojuji se</string> diff --git a/res/values-de/strings.xml b/res/values-de/strings.xml index fdad6103..46a7322e 100755 --- a/res/values-de/strings.xml +++ b/res/values-de/strings.xml @@ -234,7 +234,7 @@ <string name="minidump_generated">Der OpenVPN Prozess ist unerwartet abgestürzt. Bitte erwägen Sie die Option \"Minidump senden\" im Hauptmenü</string> <string name="send_minidump">Minidump an Entwickler senden</string> <string name="send_minidump_summary">Sendet Debugging Informationen des letzten Absturzes an den Entwickler</string> - <string name="notifcation_title">OpenVPN - %s</string> + <string name="notifcation_title">Bitmask - %s</string> <string name="session_ipv4string">%1$s - %2$s</string> <string name="session_ipv6string">%1$s - %3$s, %2$s</string> <string name="state_connecting">Verbinde</string> diff --git a/res/values-id/strings.xml b/res/values-id/strings.xml index f4e49938..43b36768 100755 --- a/res/values-id/strings.xml +++ b/res/values-id/strings.xml @@ -234,7 +234,7 @@ <string name="minidump_generated">OpenVPN crash tak terduga. Silakan mempertimbangkan mengirim menggunakan pilihan Minidump di Menu Utama</string> <string name="send_minidump">Mengirim MiniDump untuk pengembang</string> <string name="send_minidump_summary">Kirim informasi kesalahan tentang kegagalan aplikasi yang terakhir ke pengembang</string> - <string name="notifcation_title">OpenVPN - %s</string> + <string name="notifcation_title">Bitmask - %s</string> <string name="session_ipv4string">%1$ s - %2$ s</string> <string name="session_ipv6string">%1$ s - %3$ s, %2$ s</string> <string name="state_connecting">Menghubungkan</string> diff --git a/res/values-ja/strings.xml b/res/values-ja/strings.xml index 00831c68..a85dc726 100755 --- a/res/values-ja/strings.xml +++ b/res/values-ja/strings.xml @@ -273,7 +273,7 @@ TCP keepaliveと長いタイムアウト時間は動作しますが、TCP over T <string name="minidump_generated">OpenVPN は予期せず終了しました。メイン メニューでミニダンプの送信オプションを検討してください。</string> <string name="send_minidump">ミニダンプを開発者に送信</string> <string name="send_minidump_summary">最後にクラッシュした時のデバッグ情報を作者に送信します。</string> - <string name="notifcation_title">OpenVPN - %s</string> + <string name="notifcation_title">Bitmask - %s</string> <string name="session_ipv4string">%1$s - %2$s</string> <string name="session_ipv6string">%1$s - %3$s, %2$s</string> <string name="state_connecting">接続中</string> diff --git a/res/values-ru/strings.xml b/res/values-ru/strings.xml index 009e090d..596bd913 100755 --- a/res/values-ru/strings.xml +++ b/res/values-ru/strings.xml @@ -233,7 +233,7 @@ <string name="minidump_generated">OpenVPN завершилась неожиданно. Пожалуйста, посмотрите опцию \"Отправить Minidump\" в главном меню</string> <string name="send_minidump">Отправить Minidump разработчику</string> <string name="send_minidump_summary">Отправка отладочной информации разработчику о последнем неудачном завершении</string> - <string name="notifcation_title">OpenVPN - %s</string> + <string name="notifcation_title">Bitmask - %s</string> <string name="session_ipv4string">%1$s - %2$s</string> <string name="session_ipv6string">%1$s - %3$s, %2$s</string> <string name="state_connecting">Подключение</string> diff --git a/res/values-uk/strings.xml b/res/values-uk/strings.xml index 5b08be94..0a668bf9 100755 --- a/res/values-uk/strings.xml +++ b/res/values-uk/strings.xml @@ -234,7 +234,7 @@ <string name="minidump_generated">OpenVPN впав несподівано. Будь ласка, розгляньте використання параметру \"Надіслати Мінідамп\" в головному меню</string> <string name="send_minidump">Надіслати мінідамп розробнику</string> <string name="send_minidump_summary">Надіслати налагоджувальну інформацію про останній збій розробнику</string> - <string name="notifcation_title">OpenVPN - %s</string> + <string name="notifcation_title">Bitmask - %s</string> <string name="session_ipv4string">%1$s - %2$s</string> <string name="session_ipv6string">%1$s - %3$s, %2$s</string> <string name="state_connecting">Підключення</string> diff --git a/res/values/strings.xml b/res/values/strings.xml index 01eab8fe..8a5bb49f 100755 --- a/res/values/strings.xml +++ b/res/values/strings.xml @@ -237,7 +237,7 @@ <string name="minidump_generated">OpenVPN crashed unexpectedly. Please consider using the send Minidump option in the main menu</string> <string name="send_minidump">Send Minidump to developer</string> <string name="send_minidump_summary">Send debugging information about last crash to developer</string> - <string name="notifcation_title">OpenVPN - %s</string> + <string name="notifcation_title">Bitmask - %s</string> <string name="session_ipv4string">%1$s - %2$s</string> <string name="session_ipv6string">%1$s - %3$s, %2$s</string> <string name="state_connecting">Connecting</string> diff --git a/src/se/leap/bitmaskclient/EIP.java b/src/se/leap/bitmaskclient/EIP.java index ec2f6972..edd73e83 100644 --- a/src/se/leap/bitmaskclient/EIP.java +++ b/src/se/leap/bitmaskclient/EIP.java @@ -439,7 +439,8 @@ public final class EIP extends IntentService { String ports = "ports"; String protos = "protocols"; String capabilities = "capabilities"; - String location = "location"; + String location_key = "location"; + String locations = "locations"; Vector<String> arg = new Vector<String>(); Vector<Vector<String>> args = new Vector<Vector<String>>(); @@ -456,7 +457,6 @@ public final class EIP extends IntentService { arg.add(word); value.add( (Vector<String>) arg.clone() ); options.put(key, (Vector<Vector<String>>) value.clone()); - value.clear(); arg.clear(); } @@ -477,16 +477,22 @@ public final class EIP extends IntentService { arg.clear(); args.clear(); + try { - arg.add(location); - arg.add(mGateway.getString(location)); + + arg.add(location_key); + String locationText = ""; + locationText = eipDefinition.getJSONObject(locations).getJSONObject(mGateway.getString(location_key)).getString("name"); + arg.add(locationText); + } catch (JSONException e) { // TODO Auto-generated catch block e.printStackTrace(); } args.add((Vector<String>) arg.clone()); options.put("location", (Vector<Vector<String>>) args.clone() ); + arg.clear(); args.clear(); JSONArray protocolsJSON = null; diff --git a/src/se/leap/bitmaskclient/EipServiceFragment.java b/src/se/leap/bitmaskclient/EipServiceFragment.java index e182b3fd..b409394b 100644 --- a/src/se/leap/bitmaskclient/EipServiceFragment.java +++ b/src/se/leap/bitmaskclient/EipServiceFragment.java @@ -202,7 +202,10 @@ public class EipServiceFragment extends Fragment implements StateListener, OnCli switchState = false; } else if (state.equals("NOPROCESS")){ statusMessage = logmessage; - } else { + } else if (state.equals("ASSIGN_IP")){ //don't show assigning message in eipStatus + statusMessage = (String) eipStatus.getText(); + } + else { statusMessage = prefix + " " + logmessage; } diff --git a/src/se/leap/openvpn/OpenVpnService.java b/src/se/leap/openvpn/OpenVpnService.java index 69dd56f4..b5c9c798 100644 --- a/src/se/leap/openvpn/OpenVpnService.java +++ b/src/se/leap/openvpn/OpenVpnService.java @@ -114,7 +114,7 @@ public class OpenVpnService extends VpnService implements StateListener, Callbac android.app.Notification.Builder nbuilder = new Notification.Builder(this); - nbuilder.setContentTitle(getString(R.string.notifcation_title,mProfile.mName)); + nbuilder.setContentTitle(getString(R.string.notifcation_title,mProfile.mLocation)); nbuilder.setContentText(msg); nbuilder.setOnlyAlertOnce(true); nbuilder.setOngoing(persistant); @@ -482,6 +482,8 @@ public class OpenVpnService extends VpnService implements StateListener, Callbac if (("NOPROCESS".equals(state) ) || ("EXITING").equals(state)){ showNotification(state, getString(R.string.eip_state_not_connected), ticker, false, 0, persist); } + else if (state.equals("GET_CONFIG") || state.equals("ASSIGN_IP")){ //don't show them in the notification message + } else{ persist = true; showNotification(state, getString(resid) +" " + logmessage,ticker,false,0,persist); |