From 94346f240bd364b55c784ac14f63fcb3008a415c Mon Sep 17 00:00:00 2001 From: Milos Kozak Date: Mon, 25 Apr 2022 16:46:19 +0200 Subject: [PATCH 1/6] WidgetConfigureActivity not exported --- app/src/main/AndroidManifest.xml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index a4c3f20972..eef9e4e46f 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -52,8 +52,7 @@ + android:theme="@android:style/Theme.Material.Dialog.NoActionBar" > From 1b230c191a2d56e30b8e05dca7e2c5d9d29191e7 Mon Sep 17 00:00:00 2001 From: Milos Kozak Date: Mon, 25 Apr 2022 16:51:14 +0200 Subject: [PATCH 2/6] DiaconnG8BLEScanActivity not exported --- diaconn/src/main/AndroidManifest.xml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/diaconn/src/main/AndroidManifest.xml b/diaconn/src/main/AndroidManifest.xml index 739266232d..830dfec9f2 100644 --- a/diaconn/src/main/AndroidManifest.xml +++ b/diaconn/src/main/AndroidManifest.xml @@ -16,7 +16,8 @@ android:theme="@style/AppTheme" /> + android:theme="@style/AppTheme" + android:exported="false"> From e956da034bdb67f55bacec3fa906a51a76b5f971 Mon Sep 17 00:00:00 2001 From: osodebailar Date: Mon, 25 Apr 2022 16:51:26 +0200 Subject: [PATCH 3/6] run aps calculation in thread to decouple from ui --- .../androidaps/plugins/aps/openAPSAMA/OpenAPSAMAFragment.kt | 4 ++-- .../androidaps/plugins/aps/openAPSSMB/OpenAPSSMBFragment.kt | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/aps/openAPSAMA/OpenAPSAMAFragment.kt b/app/src/main/java/info/nightscout/androidaps/plugins/aps/openAPSAMA/OpenAPSAMAFragment.kt index 57c33820e0..463f15981f 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/aps/openAPSAMA/OpenAPSAMAFragment.kt +++ b/app/src/main/java/info/nightscout/androidaps/plugins/aps/openAPSAMA/OpenAPSAMAFragment.kt @@ -59,7 +59,7 @@ class OpenAPSAMAFragment : DaggerFragment() { setColorSchemeColors(rh.gac(context, R.attr.colorPrimaryDark), rh.gac(context, R.attr.colorPrimary), rh.gac(context, R.attr.colorSecondary)) setOnRefreshListener { binding.lastrun.text = rh.gs(info.nightscout.androidaps.R.string.executing) - openAPSAMAPlugin.invoke("OpenAPSAMA swiperefresh", false) + Thread { openAPSAMAPlugin.invoke("OpenAPSAMA swiperefresh", false) }.start() } } @@ -76,7 +76,7 @@ class OpenAPSAMAFragment : DaggerFragment() { when (item.itemId) { ID_MENU_RUN -> { binding.lastrun.text = rh.gs(R.string.executing) - openAPSAMAPlugin.invoke("OpenAPSAMA menu", false) + Thread { openAPSAMAPlugin.invoke("OpenAPSAMA menu", false) }.start() true } diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/aps/openAPSSMB/OpenAPSSMBFragment.kt b/app/src/main/java/info/nightscout/androidaps/plugins/aps/openAPSSMB/OpenAPSSMBFragment.kt index 1d1e6d4f95..3cd8f8c6f0 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/aps/openAPSSMB/OpenAPSSMBFragment.kt +++ b/app/src/main/java/info/nightscout/androidaps/plugins/aps/openAPSSMB/OpenAPSSMBFragment.kt @@ -36,6 +36,7 @@ class OpenAPSSMBFragment : DaggerFragment() { @Inject lateinit var activePlugin: ActivePlugin @Inject lateinit var dateUtil: DateUtil @Inject lateinit var jsonFormatter: JSONFormatter + private lateinit var refreshDialog: Runnable private val ID_MENU_RUN = 1 @@ -58,10 +59,9 @@ class OpenAPSSMBFragment : DaggerFragment() { setColorSchemeColors(rh.gac(context, R.attr.colorPrimaryDark), rh.gac(context, R.attr.colorPrimary), rh.gac(context, R.attr.colorSecondary)) setOnRefreshListener { binding.lastrun.text = rh.gs(info.nightscout.androidaps.R.string.executing) - activePlugin.activeAPS.invoke("OpenAPSSMB swiperefresh", false) + Thread { activePlugin.activeAPS.invoke("OpenAPSSMB swiperefresh", false) }.start() } } - } override fun onCreateOptionsMenu(menu: Menu, inflater: MenuInflater) { @@ -75,7 +75,7 @@ class OpenAPSSMBFragment : DaggerFragment() { when (item.itemId) { ID_MENU_RUN -> { binding.lastrun.text = rh.gs(R.string.executing) - activePlugin.activeAPS.invoke("OpenAPSSMB menu", false) + Thread { activePlugin.activeAPS.invoke("OpenAPSSMB menu", false) }.start() true } From d51955f7391762895b99494cf24584aa46ea5f52 Mon Sep 17 00:00:00 2001 From: Milos Kozak Date: Mon, 25 Apr 2022 16:56:05 +0200 Subject: [PATCH 4/6] WidgetConfigureActivity not exported --- app/src/main/AndroidManifest.xml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index eef9e4e46f..e12816b735 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -52,7 +52,8 @@ + android:theme="@android:style/Theme.Material.Dialog.NoActionBar" + android:exported="false"> From 3f75e778bb1c6a85842f82e9c3ee2a0879658c78 Mon Sep 17 00:00:00 2001 From: osodebailar Date: Mon, 25 Apr 2022 17:14:14 +0200 Subject: [PATCH 5/6] adjust cardview background --- app/src/main/res/layout/actions_fragment.xml | 8 ++++---- app/src/main/res/layout/activity_stats.xml | 6 +++--- app/src/main/res/layout/bgsource_item.xml | 2 +- app/src/main/res/layout/objectives_item.xml | 2 +- app/src/main/res/layout/overview_quickwizardlist_item.xml | 2 +- core/src/main/res/layout/maintenance_import_list_item.xml | 2 +- dana/src/main/res/layout/danar_history_item.xml | 2 +- diaconn/src/main/res/layout/diaconn_g8_history_item.xml | 2 +- .../src/main/res/layout/rileylink_status_general.xml | 4 ++-- 9 files changed, 15 insertions(+), 15 deletions(-) diff --git a/app/src/main/res/layout/actions_fragment.xml b/app/src/main/res/layout/actions_fragment.xml index aff0d78e1b..62e8661ca8 100644 --- a/app/src/main/res/layout/actions_fragment.xml +++ b/app/src/main/res/layout/actions_fragment.xml @@ -22,7 +22,7 @@ android:layout_marginTop="4dp" app:cardCornerRadius="4dp" app:contentPadding="2dp" - app:cardElevation="4dp" + app:cardElevation="2dp" app:cardUseCompatPadding="false" android:layout_gravity="center"> @@ -147,7 +147,7 @@ android:layout_marginTop="4dp" app:cardCornerRadius="4dp" app:contentPadding="2dp" - app:cardElevation="4dp" + app:cardElevation="2dp" app:cardUseCompatPadding="false" android:layout_gravity="center"> @@ -170,7 +170,7 @@ android:layout_marginTop="4dp" app:cardCornerRadius="4dp" app:contentPadding="2dp" - app:cardElevation="4dp" + app:cardElevation="2dp" app:cardUseCompatPadding="false" android:layout_gravity="center"> @@ -323,7 +323,7 @@ android:layout_marginBottom="4dp" app:cardCornerRadius="4dp" app:contentPadding="2dp" - app:cardElevation="4dp" + app:cardElevation="2dp" app:cardUseCompatPadding="false" android:layout_gravity="center"> diff --git a/app/src/main/res/layout/activity_stats.xml b/app/src/main/res/layout/activity_stats.xml index e34d749e7b..cbcb970a8b 100644 --- a/app/src/main/res/layout/activity_stats.xml +++ b/app/src/main/res/layout/activity_stats.xml @@ -56,7 +56,7 @@ android:layout_marginStart="4dp" android:layout_marginEnd="4dp" app:cardCornerRadius="4dp" - app:cardElevation="4dp" + app:cardElevation="2dp" app:cardUseCompatPadding="false" app:contentPadding="2dp"> @@ -79,7 +79,7 @@ android:layout_marginTop="4dp" android:layout_marginEnd="4dp" app:cardCornerRadius="4dp" - app:cardElevation="4dp" + app:cardElevation="2dp" app:cardUseCompatPadding="false" app:contentPadding="2dp"> @@ -102,7 +102,7 @@ android:layout_marginTop="4dp" android:layout_marginEnd="4dp" app:cardCornerRadius="4dp" - app:cardElevation="4dp" + app:cardElevation="2dp" app:cardUseCompatPadding="false" app:contentPadding="2dp"> diff --git a/app/src/main/res/layout/bgsource_item.xml b/app/src/main/res/layout/bgsource_item.xml index 261b3c0475..463a2a2e35 100644 --- a/app/src/main/res/layout/bgsource_item.xml +++ b/app/src/main/res/layout/bgsource_item.xml @@ -11,7 +11,7 @@ android:layout_marginStart="4dp" app:cardCornerRadius="4dp" app:contentPadding="2dp" - app:cardElevation="4dp" + app:cardElevation="2dp" android:layout_gravity="center"> diff --git a/app/src/main/res/layout/overview_quickwizardlist_item.xml b/app/src/main/res/layout/overview_quickwizardlist_item.xml index 25301a3bb6..445f3a3fd9 100644 --- a/app/src/main/res/layout/overview_quickwizardlist_item.xml +++ b/app/src/main/res/layout/overview_quickwizardlist_item.xml @@ -10,7 +10,7 @@ android:layout_marginStart="4dp" app:cardCornerRadius="4dp" app:contentPadding="2dp" - app:cardElevation="4dp" + app:cardElevation="2dp" app:cardUseCompatPadding="true" android:layout_gravity="center"> diff --git a/core/src/main/res/layout/maintenance_import_list_item.xml b/core/src/main/res/layout/maintenance_import_list_item.xml index d7e8cd1f18..1b1341d8e2 100644 --- a/core/src/main/res/layout/maintenance_import_list_item.xml +++ b/core/src/main/res/layout/maintenance_import_list_item.xml @@ -12,7 +12,7 @@ android:layout_marginTop="4dp" app:cardCornerRadius="4dp" app:contentPadding="2dp" - app:cardElevation="4dp" + app:cardElevation="2dp" app:cardUseCompatPadding="false" android:layout_gravity="center"> diff --git a/dana/src/main/res/layout/danar_history_item.xml b/dana/src/main/res/layout/danar_history_item.xml index ddae424524..11f4e0594c 100644 --- a/dana/src/main/res/layout/danar_history_item.xml +++ b/dana/src/main/res/layout/danar_history_item.xml @@ -10,7 +10,7 @@ android:layout_marginStart="4dp" app:cardCornerRadius="4dp" app:contentPadding="2dp" - app:cardElevation="4dp" + app:cardElevation="2dp" app:cardUseCompatPadding="true" android:layout_gravity="center"> diff --git a/diaconn/src/main/res/layout/diaconn_g8_history_item.xml b/diaconn/src/main/res/layout/diaconn_g8_history_item.xml index a86ac98505..7cb0e6f322 100644 --- a/diaconn/src/main/res/layout/diaconn_g8_history_item.xml +++ b/diaconn/src/main/res/layout/diaconn_g8_history_item.xml @@ -9,7 +9,7 @@ android:layout_gravity="center" android:layout_marginStart="4dp" app:cardCornerRadius="4dp" - app:cardElevation="4dp" + app:cardElevation="2dp" app:cardUseCompatPadding="true" app:contentPadding="2dp"> diff --git a/rileylink/src/main/res/layout/rileylink_status_general.xml b/rileylink/src/main/res/layout/rileylink_status_general.xml index 3ef25590ff..14a83b5a11 100644 --- a/rileylink/src/main/res/layout/rileylink_status_general.xml +++ b/rileylink/src/main/res/layout/rileylink_status_general.xml @@ -21,7 +21,7 @@ android:layout_marginTop="4dp" android:layout_marginEnd="4dp" app:cardCornerRadius="4dp" - app:cardElevation="4dp" + app:cardElevation="2dp" app:cardUseCompatPadding="false" app:contentPadding="2dp"> @@ -228,7 +228,7 @@ android:layout_marginTop="4dp" android:layout_marginEnd="4dp" app:cardCornerRadius="4dp" - app:cardElevation="4dp" + app:cardElevation="2dp" app:cardUseCompatPadding="false" app:contentPadding="2dp"> From c38d5550e5ceca78fea002b678372e0b2411bb57 Mon Sep 17 00:00:00 2001 From: osodebailar Date: Mon, 25 Apr 2022 17:34:48 +0200 Subject: [PATCH 6/6] add group to option menu for static entries --- app/src/main/java/info/nightscout/androidaps/MainActivity.kt | 1 + app/src/main/res/menu/menu_main.xml | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/info/nightscout/androidaps/MainActivity.kt b/app/src/main/java/info/nightscout/androidaps/MainActivity.kt index 9a5d86db99..e4960d913f 100644 --- a/app/src/main/java/info/nightscout/androidaps/MainActivity.kt +++ b/app/src/main/java/info/nightscout/androidaps/MainActivity.kt @@ -296,6 +296,7 @@ class MainActivity : NoSplashAppCompatActivity() { } override fun onCreateOptionsMenu(menu: Menu): Boolean { + menu.setGroupDividerEnabled(true) this.menu = menu menuInflater.inflate(R.menu.menu_main, menu) pluginPreferencesMenuItem = menu.findItem(R.id.nav_plugin_preferences) diff --git a/app/src/main/res/menu/menu_main.xml b/app/src/main/res/menu/menu_main.xml index 42e55843f0..1cd9f44799 100644 --- a/app/src/main/res/menu/menu_main.xml +++ b/app/src/main/res/menu/menu_main.xml @@ -44,6 +44,7 @@ android:orderInCategory="1" app:showAsAction="never" android:title="@string/nav_profilehelper" /> + - +