Skip to content

Commit

Permalink
Merge pull request #347 from mstevetodd/master
Browse files Browse the repository at this point in the history
released to Store as 2.22.67 (Beta for now)
  • Loading branch information
mstevetodd authored Sep 4, 2018
2 parents a472563 + a1398da commit 128f968
Show file tree
Hide file tree
Showing 7 changed files with 33 additions and 24 deletions.
11 changes: 6 additions & 5 deletions EngineDriver/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
package="jmri.enginedriver"
android:versionCode="66"
android:versionName="2.22.66" android:installLocation="auto">
android:versionCode="67"
android:versionName="2.22.67" android:installLocation="auto">
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
Expand All @@ -18,9 +18,10 @@
android:smallScreens="true" />
<!-- Orig.Min = 7 Orig.Target = 10 -->
<!-- 20180601: Min=7, Target=19 -->
<uses-sdk
android:minSdkVersion="7"
android:targetSdkVersion="22" />
<!-- uses-sdk now coming from gradle settings
<uses-sdk
android:minSdkVersion="15"
android:targetSdkVersion="22" /> -->
<uses-permission android:name="android.permission.READ_LOGS" tools:ignore="ProtectedPermissions"/>
<uses-feature android:name="android.hardware.sensor.accelerometer" android:required="false" />
<uses-permission android:name="android.permission.CAMERA" />
Expand Down
1 change: 0 additions & 1 deletion EngineDriver/src/main/assets/about_page.html
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ <h1>Engine Driver Throttle for Android</h1>
<li>update project to Gradle build tools</li>
<li>bump MinSDKVersion to 15 (from 7)</li>
<li>replace JmDNS source with jar file.</li>
<li>Move to Gradle</li>
<li>Spanish and Catalan translations by Luis Zamora.</li>
</ul>
<p><em><a
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ public void onCreate(Bundle savedInstanceState) {

result = RESULT_OK;

if (mainapp.connectedHostName.equals("")) { // option is only available when there is no curent connection
if (mainapp.connectedHostName.equals("")) { // option is only available when there is no current connection
getConnectionsList();
preference = (ListPreference) findPreference("prefHostImportExport");
preference.setEntries(prefHostImportExportEntriesFound);
Expand Down Expand Up @@ -260,6 +260,12 @@ public void onSharedPreferenceChanged(SharedPreferences sharedPreferences, Strin
case "prefScreenBrightnessDim":
limitIntPrefValue(sharedPreferences, key, 1, 100, "5");
break;
case "prefConnectTimeoutMs":
limitIntPrefValue(sharedPreferences, key, 100, 99999, getResources().getString(R.string.prefConnectTimeoutMsDefaultValue));
break;
case "prefSocketTimeoutMs":
limitIntPrefValue(sharedPreferences, key, 100, 9999, getResources().getString(R.string.prefSocketTimeoutMsDefaultValue));
break;
case "WebViewLocation":
mainapp.alert_activities(message_type.WEBVIEW_LOC, "");
break;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,8 @@
import java.io.IOException;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collection;
import java.util.Collections;
import java.util.Comparator;
import java.util.HashMap;
Expand Down Expand Up @@ -136,7 +138,7 @@ public void refresh_roster_list() {

//put roster entries into screen list
if (mainapp.roster_entries != null) {
Set<String> rns = mainapp.roster_entries.keySet(); //copy to prevent concurrentmodification
ArrayList<String> rns = new ArrayList<>(mainapp.roster_entries.keySet()); //copy to prevent concurrentmodification
for (String rostername : rns) {
if ((prefRosterFilter.length() == 0) || (rostername.toUpperCase().contains(prefRosterFilter.toUpperCase()))) {
// put key and values into temp hashmap
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1861,11 +1861,13 @@ public void set_default_function_labels(boolean getAll) {
while (settings_reader.ready()) {
String line = settings_reader.readLine();
String temp[] = line.split(":");
if (i <= numberOfDefaultFunctionLabels) {
function_labels_default.put(Integer.parseInt(temp[1]), temp[0]); //put funcs and labels into global default
}
if (i <= numberOfDefaultFunctionLabelsForRoster) {
function_labels_default_for_roster.put(Integer.parseInt(temp[1]), temp[0]); //put funcs and labels into global default
if (temp.length == 2) {
if (i <= numberOfDefaultFunctionLabels) {
function_labels_default.put(Integer.parseInt(temp[1]), temp[0]); //put funcs and labels into global default
}
if (i <= numberOfDefaultFunctionLabelsForRoster) {
function_labels_default_for_roster.put(Integer.parseInt(temp[1]), temp[0]); //put funcs and labels into global default
}
}
i++;
}
Expand Down
2 changes: 1 addition & 1 deletion EngineDriver/src/main/java/jmri/enginedriver/throttle.java
Original file line number Diff line number Diff line change
Expand Up @@ -4118,7 +4118,7 @@ void set_function_labels_and_listeners_for_view(int whichThrottle) {
&& mainapp.function_labels[whichThrottle].size() > 0) {
function_labels_temp = new LinkedHashMap<>(mainapp.function_labels[whichThrottle]);
} else {
if (!mainapp.consists[whichThrottle].isLeadFromRoster()) {
if (mainapp.consists[whichThrottle]!=null && !mainapp.consists[whichThrottle].isLeadFromRoster()) {
function_labels_temp = mainapp.function_labels_default;
} else {
function_labels_temp = mainapp.function_labels_default_for_roster;
Expand Down
19 changes: 9 additions & 10 deletions changelog-and-todo-list.txt
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
**Version 2.22
* New 'Big Button' throttle screen option. (Only one throttle with no slider.)
* Option to always treat F1 & F2 as sound for the Selective Lead Sounds option
* prevent crash reported to Play Store
* update project to Gradle build tools
* bump MinSDKVersion to 14 (from 7)
* replace JmDNS source with jar file
* New Colourful/Colorful theme
* Option to always treat F1 & F2 as sound for the Selective Lead Sounds option
* update project to Gradle build tools
* bump MinSDKVersion to 14 (from 7)
* replace JmDNS source with jar file
* prevent crashes reported to Play Store
* Spanish and Catalan translations by Luis Zamora
**Version 2.21
* remove turnout hardware list, WiThrottle Server changed to also handle numeric-only
* changes to EngineDriver icon
Expand Down Expand Up @@ -422,7 +424,6 @@
* TODO: if user enters ":" into address input, jump to port input
* TODO: allow user to delete individual recents (long-press?)
* threaded_application
* TODO: limit/throttle message traffic via queue to avoid overloading hardware, esp. after acquire/release
* TODO: remember consist details
* TODO: when MT+ received, if the loco is in a consist, request the consist address also
* TODO: rewrite readTimer logic, to start back up rather than creating a new one
Expand All @@ -440,17 +441,15 @@
* TODO: add more info to Exit dialog, e.g. "2 locos will be stopped and released"
* TODO: advise user if layout power is off (need to check behavior to see if this should be warning or error)
* TODO: add preference to disable other hardware buttons in throttle screen
* TODO: add graphics (slider, stop, directions, functions?) add colors
* TODO: unset all states when loco not selected
* select_loco:
* TODO: disconnect connections made by roster stuff
* TODO: add close button and roster image to details dialog
* TODO: simplify select_loco by removing handler
* TODO: for "auto" handle the Digitrax numbering, i.e. 1-128 is short
* TODO: allow user to delete individual recents (long-press?)
* preferences:
* TODO: Reset should restart
* TODO: show error if invalid entry
* log_viewer:
* TODO: option to save as file
*
* These require changes to WiThrottle
* resend turnout and routes when items are added or removed, by adding listeners to WiT
Expand Down

0 comments on commit 128f968

Please sign in to comment.