mirror of
https://github.com/jrpie/Launcher.git
synced 2025-06-08 02:11:24 +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() {
|
override fun onPause() {
|
||||||
|
try {
|
||||||
(application as Application).appWidgetHost.stopListening()
|
(application as Application).appWidgetHost.stopListening()
|
||||||
|
} catch (e: Exception) {
|
||||||
|
// Throws a NullPointerException on Android 12 an earlier, see #172
|
||||||
|
e.printStackTrace()
|
||||||
|
}
|
||||||
super.onPause()
|
super.onPause()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -62,7 +62,12 @@ class WidgetPanelActivity : Activity(), UIObject {
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun onPause() {
|
override fun onPause() {
|
||||||
|
try {
|
||||||
(application as Application).appWidgetHost.stopListening()
|
(application as Application).appWidgetHost.stopListening()
|
||||||
|
} catch (e: Exception) {
|
||||||
|
// Throws a NullPointerException on Android 12 an earlier, see #172
|
||||||
|
e.printStackTrace()
|
||||||
|
}
|
||||||
super.onPause()
|
super.onPause()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -93,7 +93,12 @@ class ManageWidgetsActivity : UIObject, Activity() {
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun onPause() {
|
override fun onPause() {
|
||||||
|
try {
|
||||||
(application as Application).appWidgetHost.stopListening()
|
(application as Application).appWidgetHost.stopListening()
|
||||||
|
} catch (e: Exception) {
|
||||||
|
// Throws a NullPointerException on Android 12 an earlier, see #172
|
||||||
|
e.printStackTrace()
|
||||||
|
}
|
||||||
super.onPause()
|
super.onPause()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue