commit | 7edf3d3f9ae83ac72ee73bc4ebb63aea18a2b7d7 | [log] [tgz] |
---|---|---|
author | Sunny Goyal <sunnygoyal@google.com> | Mon Jul 09 15:08:03 2018 -0700 |
committer | Sunny Goyal <sunnygoyal@google.com> | Mon Jul 09 15:09:43 2018 -0700 |
tree | 6a8f94686abc326c2632776daecb8c0a26b9e5b2 | |
parent | ce368154cebf4ab5da9976aa4897317abc55ab1d [diff] |
Only call requestUnbind if we are connected. Somethimes onSettingChanged can come after the connected has disconnected because of posting message on the different thread. Bug: 110929527 Change-Id: I09f503c2f2f437c8656d491a7fdec3ce4e82257b
diff --git a/src/com/android/launcher3/notification/NotificationListener.java b/src/com/android/launcher3/notification/NotificationListener.java index b527b6a..ac5aaf8 100644 --- a/src/com/android/launcher3/notification/NotificationListener.java +++ b/src/com/android/launcher3/notification/NotificationListener.java
@@ -197,7 +197,7 @@ mNotificationBadgingObserver = new SettingsObserver.Secure(getContentResolver()) { @Override public void onSettingChanged(boolean isNotificationBadgingEnabled) { - if (!isNotificationBadgingEnabled) { + if (!isNotificationBadgingEnabled && sIsConnected) { requestUnbind(); } }