From 17495e8858938164e78741a4441d1f96e728688f Mon Sep 17 00:00:00 2001 From: Jean Luis Urena Date: Tue, 28 Aug 2018 13:18:06 -0400 Subject: [PATCH] Update settings in app widget as needed --- ritscheduler/build.gradle | 4 ++-- ritscheduler/release/output.json | 2 +- .../ritscheduler/homescreen/WidgetRemoteViewsFactory.java | 4 +--- 3 files changed, 4 insertions(+), 6 deletions(-) diff --git a/ritscheduler/build.gradle b/ritscheduler/build.gradle index 99dbc1f..c726b80 100644 --- a/ritscheduler/build.gradle +++ b/ritscheduler/build.gradle @@ -6,8 +6,8 @@ android { applicationId "me.jlurena.ritscheduler" minSdkVersion 22 targetSdkVersion 27 - versionCode 1 - versionName "1.0" + versionCode 2 + versionName "2" testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" renderscriptTargetApi 18 renderscriptSupportModeEnabled true diff --git a/ritscheduler/release/output.json b/ritscheduler/release/output.json index 4507469..9089c2f 100644 --- a/ritscheduler/release/output.json +++ b/ritscheduler/release/output.json @@ -1 +1 @@ -[{"outputType":{"type":"APK"},"apkInfo":{"type":"MAIN","splits":[],"versionCode":1,"versionName":"1.0","enabled":true,"outputFile":"ritscheduler-release.apk","fullName":"release","baseName":"release"},"path":"ritscheduler-release.apk","properties":{}}] \ No newline at end of file +[{"outputType":{"type":"APK"},"apkInfo":{"type":"MAIN","splits":[],"versionCode":2,"versionName":"2","enabled":true,"outputFile":"ritscheduler-release.apk","fullName":"release","baseName":"release"},"path":"ritscheduler-release.apk","properties":{}}] \ No newline at end of file diff --git a/ritscheduler/src/main/java/me/jlurena/ritscheduler/homescreen/WidgetRemoteViewsFactory.java b/ritscheduler/src/main/java/me/jlurena/ritscheduler/homescreen/WidgetRemoteViewsFactory.java index 275746c..2296735 100644 --- a/ritscheduler/src/main/java/me/jlurena/ritscheduler/homescreen/WidgetRemoteViewsFactory.java +++ b/ritscheduler/src/main/java/me/jlurena/ritscheduler/homescreen/WidgetRemoteViewsFactory.java @@ -36,7 +36,6 @@ public class WidgetRemoteViewsFactory extends BroadcastReceiver implements Remot private final Context context; private final DataManager dataManager; - private final SettingsManager settings; private List courses; private WeekView weekView; private Calendar currentDay; @@ -53,7 +52,6 @@ public class WidgetRemoteViewsFactory extends BroadcastReceiver implements Remot filter.addAction(WidgetProvider.ACTION_NEXT); filter.addAction(WidgetProvider.ACTION_REFRESH); context.registerReceiver(this, filter); - this.settings = SettingsManager.getInstance(context); updateCourseList(null); } @@ -123,7 +121,7 @@ public String interpretTime(int hour, int minutes) { break; } } - + SettingsManager settings = SettingsManager.getInstance(context); int height = (weekView.getMaxTime() - weekView.getMinTime()) * Util.dp2px(50); int day = currentDay.get(Calendar.DAY_OF_WEEK); day = day == 1 ? 7 : day - 1;