Skip to content
Permalink
Browse files

[Mobile] Fixed bug where WidgetListenerService notification could get…

… stuck in a user's notification area. Added ability to skip showing the What's New dialog when running in Firebase Test Lab.
  • Loading branch information...
thecosmicfrog committed Jun 2, 2019
1 parent e3cd330 commit d555cb72112c3ad0ba97ba3b90252a0513ce0f5d
@@ -8,8 +8,8 @@ android {
applicationId "org.thecosmicfrog.luasataglance"
minSdkVersion 21
targetSdkVersion 28
versionCode 133
versionName "0.133"
versionCode 135
versionName "0.135"
}
buildTypes {
release {
@@ -79,11 +79,6 @@
<action android:name="org.thecosmicfrog.luasataglance.activity.NotifyTimeActivity" />
</intent-filter>
</receiver>
<receiver android:name=".receiver.StartServiceAtBootReceiver">
<intent-filter>
<action android:name="android.intent.action.BOOT_COMPLETED" />
</intent-filter>
</receiver>
<receiver android:name=".widget.StopForecastWidget">
<intent-filter>
<action android:name="android.appwidget.action.APPWIDGET_UPDATE" />
@@ -24,6 +24,7 @@
import android.content.Intent;
import android.os.Build;
import android.os.Bundle;
import android.provider.Settings;
import android.support.design.widget.TabLayout;
import android.support.v4.content.ContextCompat;
import android.support.v4.view.ViewPager;
@@ -333,6 +334,15 @@ private void setTabIndicatorColor(TabLayout tabLayout) {
* Show What's New dialog to user if they have recently updated the app.
*/
private void showWhatsNewDialog() {
/* Don't show the What's New dialog if we're running in Firebase Test Lab. */
String settingFirebaseTestLab =
Settings.System.getString(getContentResolver(), "firebase.test.lab");
if (settingFirebaseTestLab != null && settingFirebaseTestLab.equals("true")) {
Log.i(LOG_TAG, "Running in Firebase Test Lab.");

return;
}

/*
* Load two values for the current app version. One comes from strings.xml and the other
* comes from shared preferences. The value from strings.xml should be considered the

This file was deleted.

@@ -159,6 +159,7 @@ public int onStartCommand(Intent intent, int flags, int startId) {
}
} else {
Log.e(LOG_TAG, "No widget IDs received.");
stopService(intent);
}
}

@@ -23,8 +23,8 @@
App
-->
<string name="app_name">Luas at a Glance</string>
<string name="version_code" translatable="false">133</string>
<string name="version_name" translatable="false">0.133</string>
<string name="version_code" translatable="false">135</string>
<string name="version_name" translatable="false">0.135</string>

<!--
Activities
@@ -167,23 +167,20 @@
<!--
What's New
-->
<string name="whatsnew_title_current" translatable="false">Version 0.133 (17th May 2019)
<string name="whatsnew_title_current" translatable="false">Version 0.135 (2nd June 2019)
</string>
<string name="whatsnew_content_current" translatable="false">\u2022 [NEW] You can now see your
<string name="whatsnew_content_current" translatable="false">\u2022 [FIXED] Fixed issue where
a widget notification occasionally got stuck for some users. Thanks to everyone who reported
this!
</string>
<string name="whatsnew_title_previous" translatable="false">Version 0.133 (17th May 2019)
</string>
<string name="whatsnew_content_previous" translatable="false">\u2022 [NEW] You can now see your
Luas times without having to open the app! The homescreen widget is now considered stable,
with major crashes and bugs now fixed. To try it out, tap and hold on your device\'s
wallpaper and add the <b>Luas at a Glance</b> widget.\nPlease report any and all issues and
I\'ll be happy to fix them.
</string>
<string name="whatsnew_title_previous" translatable="false">Version 0.126 (18th December 2018)
</string>
<string name="whatsnew_content_previous" 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>

<!--
Widget
@@ -10,8 +10,8 @@ android {
applicationId "org.thecosmicfrog.luasataglance"
minSdkVersion 21
targetSdkVersion 28
versionCode 13300
versionName "0.133"
versionCode 13500
versionName "0.135"
}
buildTypes {
release {
@@ -23,7 +23,7 @@ android {
productFlavors {
wear2 {
minSdkVersion 25
versionCode 13301
versionCode 13501
}
}
}
@@ -23,8 +23,8 @@
App
-->
<string name="app_name">Luas at a Glance</string>
<string name="version_code" translatable="false">133</string>
<string name="version_name" translatable="false">0.133</string>
<string name="version_code" translatable="false">135</string>
<string name="version_name" translatable="false">0.135</string>

<!--
Activities

0 comments on commit d555cb7

Please sign in to comment.
You can’t perform that action at this time.