Skip to content

Commit

Permalink
Fix of pair of NPEs
Browse files Browse the repository at this point in the history
  • Loading branch information
thuryn committed Apr 10, 2020
1 parent 45143ab commit 694b11c
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 4 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
v5.5.1
Fixis handling of exceptions when updated weather

v5.5.0
Remove getting of location from Mozilla Location Service, weather downloader rewritten, fix voice output, many small fixies, translations

Expand Down
4 changes: 2 additions & 2 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ android {
applicationId "org.thosp.yourlocalweather"
minSdkVersion 14
targetSdkVersion 28
versionCode 132
versionName "5.5.0"
versionCode 133
versionName "5.5.1"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
vectorDrawables.useSupportLibrary = true
playAccountConfig = playAccountConfigs.defaultAccountConfig
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -400,7 +400,7 @@ private void startLocationAndWeatherUpdate(Intent intent) {
this.updateSource = intent.getStringExtra("updateSource");
this.forceUpdate = intent.getBooleanExtra("forceUpdate", false);

if (updateSource.equals("MAIN")) {
if ("MAIN".equals(updateSource)) {
startForeground(1, NotificationUtils.getNotificationForActivity(getBaseContext()));
}
processLocationAndWeatherUpdate(intent);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -445,7 +445,7 @@ public void onSuccess(int statusCode, Header[] headers, byte[] response) {
resendTheIntentInSeveralSeconds(70);
sendResult(ACTION_WEATHER_UPDATE_FAIL, context, updateType);
} catch (LicenseNotValidException lnve) {
if (!license.equals(ApiKeys.getInitialLicenseKey(getBaseContext()))) {
if ((license == null) || !license.equals(ApiKeys.getInitialLicenseKey(getBaseContext()))) {
timerHandler.removeCallbacksAndMessages(null);
sendResult(ACTION_WEATHER_UPDATE_FAIL, context, updateType);
} else {
Expand Down

0 comments on commit 694b11c

Please sign in to comment.