Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Add wifi jamming restart speech config and internationalization.

  • Loading branch information...
commit 79ba81939c24dd7276c0e698a246a59077374567 1 parent 6048cc4
@bobzilladev bobzilladev authored
View
1  TODO
@@ -31,6 +31,7 @@ output GPX (open street map)
--- done ---
* 1.54 (?)
Dutch language update (thanks Roestje!)
+Wifi jamming restart speech config
* 1.53 (09/16/2012)
Spanish translation update (thanks Axel!)
View
4 res/layout/settings.xml
@@ -7,7 +7,7 @@
android:id="@+id/linearlayout"
android:orientation="vertical"
android:layout_width="fill_parent"
- android:layout_height="fill_parent"
+ android:layout_height="wrap_content"
>
<TextView
@@ -266,7 +266,7 @@
<Button android:id="@+id/speech_button" android:layout_width="wrap_content" android:layout_height="wrap_content"
android:text="@string/speech_button" android:layout_weight="0"
- android:paddingTop="10px" android:paddingBottom="10px"/>
+ android:paddingTop="10dip" android:paddingBottom="10dip"/>
<LinearLayout
android:id="@+id/horizontalLine2"
View
6 res/layout/speech.xml
@@ -7,7 +7,7 @@
android:id="@+id/linearlayout"
android:orientation="vertical"
android:layout_width="fill_parent"
- android:layout_height="fill_parent"
+ android:layout_height="wrap_content"
>
<TextView android:id="@+id/speech_text"
android:layout_width="fill_parent"
@@ -43,6 +43,10 @@
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="@string/speech_battery" />
+<CheckBox android:id="@+id/speech_wifi_restart"
+ android:layout_width="fill_parent"
+ android:layout_height="wrap_content"
+ android:text="@string/speech_wifi_restart" />
<LinearLayout
android:id="@+id/horizontalLine"
android:layout_width="fill_parent"
View
3  res/values/strings.xml
@@ -241,4 +241,7 @@
<string name="donate_question">Donate data to WiGLE?</string>
<string name="donate_explain">Allow WiGLE to make an anonymized copy of data which WiGLE is authorized to license commercially to other parties.</string>
<string name="no_data_conn">No data connection, cannot connect to internet. \nDetail: </string>
+ <string name="speech_wifi_restart">Wifi restarts</string>
+ <string name="wifi_restart_1">Warning, latest wifi scan completed</string>
+ <string name="wifi_restart_2">seconds ago. Restarting wifi.</string>
</resources>
View
1  src/net/wigle/wigleandroid/ListActivity.java
@@ -169,6 +169,7 @@
public static final String PREF_SPEAK_TIME = "speakTime";
public static final String PREF_SPEAK_BATTERY = "speakBattery";
public static final String PREF_SPEAK_SSID = "speakSsid";
+ public static final String PREF_SPEAK_WIFI_RESTART = "speakWifiRestart";
// map ssid filter
public static final String PREF_MAPF_REGEX = "mapfRegex";
View
1  src/net/wigle/wigleandroid/SpeechActivity.java
@@ -38,6 +38,7 @@ public void onCreate( final Bundle savedInstanceState) {
doCheckbox( prefs, R.id.speech_time, ListActivity.PREF_SPEAK_TIME );
doCheckbox( prefs, R.id.speech_battery, ListActivity.PREF_SPEAK_BATTERY );
doCheckbox( prefs, R.id.speech_ssid, ListActivity.PREF_SPEAK_SSID, false );
+ doCheckbox( prefs, R.id.speech_wifi_restart, ListActivity.PREF_SPEAK_WIFI_RESTART );
}
public void onDestroy() {
View
6 src/net/wigle/wigleandroid/listener/WifiReceiver.java
@@ -756,8 +756,10 @@ else if (listActivity.isScanning()) {
wifiManager.setWifiEnabled(false);
wifiManager.setWifiEnabled(true);
lastWifiUnjamTime = now;
- listActivity.speak("Warning, latest wifi scan completed "
- + (sinceLastScan / 1000L) + " seconds ago. Restarting wifi.");
+ if (prefs.getBoolean(ListActivity.PREF_SPEAK_WIFI_RESTART, true)) {
+ listActivity.speak(listActivity.getString(R.string.wifi_restart_1) + " "
+ + (sinceLastScan / 1000L) + " " + listActivity.getString(R.string.wifi_restart_2));
+ }
}
}
}
Please sign in to comment.
Something went wrong with that request. Please try again.