diff options
-rw-r--r-- | AndroidManifest.xml | 21 | ||||
-rw-r--r-- | res/layout/faq.xml | 8 | ||||
-rw-r--r-- | res/values/strings.xml | 4 | ||||
-rw-r--r-- | src/de/blinkt/openvpn/FaqFragment.java | 18 |
4 files changed, 31 insertions, 20 deletions
diff --git a/AndroidManifest.xml b/AndroidManifest.xml index 6677201..ad16b0a 100644 --- a/AndroidManifest.xml +++ b/AndroidManifest.xml @@ -17,16 +17,14 @@ <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="de.blinkt.openvpn" - android:versionCode="51" - android:versionName="0.5.24" > + android:versionCode="52" + android:versionName="0.5.25" > <uses-permission android:name="android.permission.INTERNET" /> <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" /> <uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" /> - <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/> - - - + <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" /> + <!-- <uses-permission android:name="com.android.vending.BILLING" /> --> <uses-sdk android:minSdkVersion="14" /> @@ -40,7 +38,7 @@ android:windowSoftInputMode="stateHidden" /> <activity android:name=".LogWindow" - android:label="OpenVPN Log" /> + android:label="@string/openvpn_log" /> <activity android:name=".FileSelect" /> <activity android:name=".MainActivity" > <intent-filter> @@ -58,6 +56,7 @@ <action android:name="android.net.VpnService" /> </intent-filter> </service> + <receiver android:name=".OnBootReceiver" > <intent-filter> <action android:name="android.intent.action.BOOT_COMPLETED" /> @@ -67,7 +66,7 @@ <activity android:name=".ConfigConverter" android:label="Convert Config File" > - <intent-filter android:label="Import OpenVPN Config" > + <intent-filter android:label="@string/import_config" > <action android:name="android.intent.action.VIEW" /> <category android:name="android.intent.category.DEFAULT" /> @@ -75,7 +74,7 @@ <data android:mimeType="application/x-openvpn-profile" /> </intent-filter> - <intent-filter android:label="Import OpenVPN Config" > + <intent-filter android:label="@string/import_config" > <action android:name="android.intent.action.VIEW" /> <category android:name="android.intent.category.DEFAULT" /> @@ -83,7 +82,7 @@ <data android:mimeType="application/ovpn" /> </intent-filter> - <intent-filter android:label="Import OpenVPN Config" > + <intent-filter android:label="@string/import_config" > <action android:name="android.intent.action.VIEW" /> <category android:name="android.intent.category.BROWSABLE" /> @@ -116,4 +115,4 @@ </activity-alias> </application> -</manifest> +</manifest>
\ No newline at end of file diff --git a/res/layout/faq.xml b/res/layout/faq.xml index dc59131..c4fd57f 100644 --- a/res/layout/faq.xml +++ b/res/layout/faq.xml @@ -34,6 +34,14 @@ <TextView style="@style/faqhead" + android:text="@string/battery_consumption_title" /> + + <TextView + android:id="@+id/faq_battery" + style="@style/faqitem" /> + + <TextView + style="@style/faqhead" android:text="@string/tap_mode" /> <TextView diff --git a/res/values/strings.xml b/res/values/strings.xml index 2625a02..a0d1a4f 100644 --- a/res/values/strings.xml +++ b/res/values/strings.xml @@ -225,4 +225,8 @@ <string name="persisttun_summary">Do not fallback to no VPN connection when OpenVPN is reconnecting.</string> <string name="persistent_tun_title">Persistent tun</string> <string name="translation">Translation</string> + <string name="openvpn_log">OpenVPN Log</string> + <string name="import_config">Import OpenVPN configuration</string> + <string name="battery_consumption_title">Battery consumption</string> + <string name="baterry_consumption">In my personal tests the main reason for high battery consumption of OpenVPN are the keepalive packets. Most OpenVPN servers have a configuration directive like \'keepalive 10 60\' which translates to a keepalive packet from client to server and server to client every ten seconds. <p> While these packets are small and do not use much traffic, they keep the mobile radio network busy and increase the energy consumption. <p> This keepalive setting cannot be changed on the client. Only the system administrator of the OpenVPN can change the setting. <p> Unfortunatly using a keepalive larger than 60 seconds with udp has problems with some NAT gateways which terminate the state for a connnection after a short timeout (60s in my tests). Using TCP with long keepalive timeout works but has the TCP over TCP problem. (See <a href=\"http://sites.inka.de/bigred/devel/tcp-tcp.html\">Why TCP Over TCP Is A Bad Ide</a>)</string> </resources> diff --git a/src/de/blinkt/openvpn/FaqFragment.java b/src/de/blinkt/openvpn/FaqFragment.java index c4d1913..7902975 100644 --- a/src/de/blinkt/openvpn/FaqFragment.java +++ b/src/de/blinkt/openvpn/FaqFragment.java @@ -3,7 +3,6 @@ package de.blinkt.openvpn; import android.app.Fragment; import android.os.Bundle; import android.text.Html; -import android.text.Spanned; import android.text.method.LinkMovementMethod; import android.view.LayoutInflater; import android.view.View; @@ -23,14 +22,9 @@ public class FaqFragment extends Fragment { Bundle savedInstanceState) { View v= inflater.inflate(R.layout.faq, container, false); - TextView bImages = (TextView) v.findViewById(R.id.brokenimages); - bImages.setText(Html.fromHtml(getActivity().getString(R.string.broken_images_faq))); - bImages.setMovementMethod(LinkMovementMethod.getInstance()); - - TextView quickstart = (TextView) v.findViewById(R.id.faq_howto); - Spanned htmltext = Html.fromHtml(getActivity().getString(R.string.faq_howto)); - quickstart.setText(htmltext); - quickstart.setMovementMethod(LinkMovementMethod.getInstance()); + insertHtmlEntry(v,R.id.brokenimages,R.string.broken_images_faq); + insertHtmlEntry(v,R.id.faq_howto,R.string.faq_howto); + insertHtmlEntry(v, R.id.faq_battery, R.string.baterry_consumption); return v; @@ -38,4 +32,10 @@ public class FaqFragment extends Fragment { } + private void insertHtmlEntry (View v, int viewId, int stringId) { + TextView faqitem = (TextView) v.findViewById(viewId); + faqitem.setText(Html.fromHtml(getActivity().getString(stringId))); + faqitem.setMovementMethod(LinkMovementMethod.getInstance()); + } + } |