Permalink
Browse files

[Mobile] Added FOREGROUND_SERVICE permission, required by newer Andro…

…id APIs.

[Mobile] Added Apache HTTP legacy library hack.
[Mobile] Fixed intermittent crash issue due to null Activity.
[Trivial] Bumped version numbers for release v0.126.
  • Loading branch information...
thecosmicfrog committed Jan 7, 2019
1 parent 66c1521 commit d2fd932496ab9af69ad0e24e725662704b044026
@@ -8,8 +8,8 @@ android {
applicationId "org.thecosmicfrog.luasataglance"
minSdkVersion 21
targetSdkVersion 28
versionCode 121
versionName "0.121"
versionCode 126
versionName "0.126"
}
buildTypes {
release {
@@ -4,6 +4,7 @@
package="org.thecosmicfrog.luasataglance">

<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.FOREGROUND_SERVICE" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
<uses-permission android:name="android.permission.VIBRATE" />
@@ -33,6 +34,14 @@
android:name="com.google.firebase.messaging.default_notification_color"
android:resource="@color/luas_purple" />

<!--
Official Google hack required since targeting API level >= 28 (Android 9.0).
https://developers.google.com/maps/documentation/android-sdk/config#specify_requirement_for_apache_http_legacy_library
-->
<uses-library
android:name="org.apache.http.legacy"
android:required="false" />

<activity
android:name=".activity.MainActivity"
android:label="@string/app_name">
@@ -394,8 +394,8 @@ public void onItemSelected(AdapterView<?> parent, View view, int position,
*/
if (isVisibleToUser) {
/*
* If the Spinner's selected item is "Select a stop...", we don't need to
* do anything. Just clear the stop forecast and get out of here.
* If the Spinner's selected item is "Select a stop...", we don't need
* to do anything. Just clear the stop forecast and get out of here.
*/
if (position == 0) {
shouldAutoReload = false;
@@ -775,7 +775,7 @@ public void run() {
if (shouldAutoReload) {
loadStopForecast(
Preferences.selectedStopName(
getContext(),
getActivity().getApplicationContext(),
line
),
false
@@ -869,10 +869,12 @@ public void failure(RetrofitError retrofitError) {
Log.e(LOG_TAG, "Response: " + retrofitError.getResponse().getUrl());
}

Log.e(LOG_TAG, "Status: " + Integer.toString(retrofitError.getResponse().getStatus()));
Log.e(LOG_TAG, "Status: " +
Integer.toString(retrofitError.getResponse().getStatus()));

if (retrofitError.getResponse().getHeaders() != null) {
Log.e(LOG_TAG, "Headers: " + retrofitError.getResponse().getHeaders().toString());
Log.e(LOG_TAG, "Headers: " +
retrofitError.getResponse().getHeaders().toString());
}

if (retrofitError.getResponse().getBody() != null) {
@@ -23,8 +23,8 @@
App
-->
<string name="app_name">Luas at a Glance</string>
<string name="version_code" translatable="false">121</string>
<string name="version_name" translatable="false">0.121</string>
<string name="version_code" translatable="false">126</string>
<string name="version_name" translatable="false">0.126</string>

<!--
Activities
@@ -166,16 +166,19 @@
<!--
What's New
-->
<string name="whatsnew_title_current" translatable="false">Version 0.116 (19th November 2018)
<string name="whatsnew_title_current" translatable="false">Version 0.126 (18th December 2018)
</string>
<string name="whatsnew_content_current" translatable="false">\u2022 Added link to privacy policy
in About dialog.
<string name="whatsnew_content_current" translatable="false">\u2022 [NEW] Swiping down to
refresh the stop forecast now displays when the times were generated by the Luas RTPI
system.\n\u2022 [FIXED] Fixed bug where <b>Alerts</b> button could turn red for an alert on
the wrong line.\n\u2022 [FIXED] Fixed intermittent crash on some devices. Thanks to everyone
who reported this.\n\u2022 [FIXED] Fixed widget crash affecting some users. Thanks to
everyone who reported this.
</string>
<string name="whatsnew_title_previous" translatable="false">Version 0.112 (10th October 2018)
<string name="whatsnew_title_previous" translatable="false">Version 0.116 (19th November 2018)
</string>
<string name="whatsnew_content_previous" translatable="false">\u2022 [FIXED] Fixed 404 error
which occurred when tapping the <b>Alerts</b> button for some users. Many thanks to the user
who reported this issue to my email!
<string name="whatsnew_content_previous" translatable="false">\u2022 Added link to privacy
policy in About dialog.
</string>

<!--
@@ -10,8 +10,8 @@ android {
applicationId "org.thecosmicfrog.luasataglance"
minSdkVersion 21
targetSdkVersion 28
versionCode 12100
versionName "0.121"
versionCode 12600
versionName "0.126"
}
buildTypes {
release {
@@ -23,7 +23,7 @@ android {
productFlavors {
wear2 {
minSdkVersion 25
versionCode 12101
versionCode 12601
}
}
}
@@ -23,8 +23,8 @@
App
-->
<string name="app_name">Luas at a Glance</string>
<string name="version_code" translatable="false">121</string>
<string name="version_name" translatable="false">0.121</string>
<string name="version_code" translatable="false">126</string>
<string name="version_name" translatable="false">0.126</string>

<!--
Activities

0 comments on commit d2fd932

Please sign in to comment.