mirror of
https://github.com/jrpie/Launcher.git
synced 2025-06-07 17:59:54 +02:00
try to mitigate #172
This commit is contained in:
parent
5f847a8d40
commit
31a9049861
3 changed files with 18 additions and 3 deletions
|
@ -122,7 +122,12 @@ class HomeActivity : UIObject, Activity() {
|
|||
}
|
||||
|
||||
override fun onPause() {
|
||||
(application as Application).appWidgetHost.stopListening()
|
||||
try {
|
||||
(application as Application).appWidgetHost.stopListening()
|
||||
} catch (e: Exception) {
|
||||
// Throws a NullPointerException on Android 12 an earlier, see #172
|
||||
e.printStackTrace()
|
||||
}
|
||||
super.onPause()
|
||||
}
|
||||
|
||||
|
|
|
@ -62,7 +62,12 @@ class WidgetPanelActivity : Activity(), UIObject {
|
|||
}
|
||||
|
||||
override fun onPause() {
|
||||
(application as Application).appWidgetHost.stopListening()
|
||||
try {
|
||||
(application as Application).appWidgetHost.stopListening()
|
||||
} catch (e: Exception) {
|
||||
// Throws a NullPointerException on Android 12 an earlier, see #172
|
||||
e.printStackTrace()
|
||||
}
|
||||
super.onPause()
|
||||
}
|
||||
|
||||
|
|
|
@ -93,7 +93,12 @@ class ManageWidgetsActivity : UIObject, Activity() {
|
|||
}
|
||||
|
||||
override fun onPause() {
|
||||
(application as Application).appWidgetHost.stopListening()
|
||||
try {
|
||||
(application as Application).appWidgetHost.stopListening()
|
||||
} catch (e: Exception) {
|
||||
// Throws a NullPointerException on Android 12 an earlier, see #172
|
||||
e.printStackTrace()
|
||||
}
|
||||
super.onPause()
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue