PersistentNotification unregister workaround.
This commit is contained in:
parent
9442c56eb8
commit
d202976251
1 changed files with 7 additions and 2 deletions
|
@ -191,11 +191,16 @@ public class PersistentNotificationPlugin implements PluginBase {
|
|||
|
||||
private void checkBusRegistration() {
|
||||
if (fragmentEnabled) {
|
||||
MainApp.bus().register(this);
|
||||
try {
|
||||
MainApp.bus().register(this);
|
||||
} catch (IllegalArgumentException e) {
|
||||
// already registered
|
||||
}
|
||||
} else {
|
||||
try {
|
||||
MainApp.bus().unregister(this);
|
||||
} catch (Exception e) {
|
||||
} catch (IllegalArgumentException e) {
|
||||
// already unregistered
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue