summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Fabian Kozynski <kozynski@google.com> 2019-11-04 16:20:42 -0500
committer Fabian Kozynski <kozynski@google.com> 2019-11-05 03:20:32 +0000
commit11f41221c5536a7e0993539e853036b74a031ceb (patch)
tree7a5d989a70a9c7255081744007196096f61f9af2
parent50351f43868f1eca9378a210d3826a3e6d1808d1 (diff)
Fix crash due to unregistered receiver
Unregisters the receiver from BroadcastDispatcher (where it was registered) and not from Context (where it wasn't). Fixes: 143896273 Test: manual switch out of Gesture nav and it doesn't crash Change-Id: I7bb5a35835a8140beb495c59981f3e62669a235a
-rw-r--r--packages/SystemUI/src/com/android/systemui/assist/AssistHandleReminderExpBehavior.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/assist/AssistHandleReminderExpBehavior.java b/packages/SystemUI/src/com/android/systemui/assist/AssistHandleReminderExpBehavior.java
index 9a277e8fa77c..46ae84a95fad 100644
--- a/packages/SystemUI/src/com/android/systemui/assist/AssistHandleReminderExpBehavior.java
+++ b/packages/SystemUI/src/com/android/systemui/assist/AssistHandleReminderExpBehavior.java
@@ -249,7 +249,7 @@ final class AssistHandleReminderExpBehavior implements BehaviorController {
public void onModeDeactivated() {
mAssistHandleCallbacks = null;
if (mContext != null) {
- mContext.unregisterReceiver(mDefaultHomeBroadcastReceiver);
+ mBroadcastDispatcher.get().unregisterReceiver(mDefaultHomeBroadcastReceiver);
Settings.Secure.putLong(mContext.getContentResolver(), LEARNING_TIME_ELAPSED_KEY, 0);
Settings.Secure.putInt(mContext.getContentResolver(), LEARNING_EVENT_COUNT_KEY, 0);
Settings.Secure.putLong(mContext.getContentResolver(), LEARNED_HINT_LAST_SHOWN_KEY, 0);