From 9ef7307324f5e58d9a8dc0063110c1b1bd1e3d6d Mon Sep 17 00:00:00 2001 From: Jason Monk Date: Fri, 27 Jan 2017 13:32:51 -0500 Subject: [PATCH] Fix broken lock screen affordances The state change callback stopped getting added as part of the dependency injection refactor, which turns out has a pretty serious effect on how the buttons work. Change-Id: Ic2c412248373de80acc581d09e3073f541238e9a Fixes: 34739383 Test: Click on lock screen mic or camera --- .../systemui/statusbar/phone/KeyguardBottomAreaView.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardBottomAreaView.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardBottomAreaView.java index 6c71d7f9014ca..bfc0a80b31502 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardBottomAreaView.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardBottomAreaView.java @@ -256,6 +256,7 @@ public class KeyguardBottomAreaView extends FrameLayout implements View.OnClickL @Override protected void onAttachedToWindow() { super.onAttachedToWindow(); + mAccessibilityController.addStateChangedCallback(this); PluginManager.getInstance(getContext()).addPluginListener(RIGHT_BUTTON_PLUGIN, mRightListener, IntentButtonProvider.VERSION, false /* Only allow one */); PluginManager.getInstance(getContext()).addPluginListener(LEFT_BUTTON_PLUGIN, @@ -267,6 +268,7 @@ public class KeyguardBottomAreaView extends FrameLayout implements View.OnClickL @Override protected void onDetachedFromWindow() { super.onDetachedFromWindow(); + mAccessibilityController.removeStateChangedCallback(this); PluginManager.getInstance(getContext()).removePluginListener(mRightListener); PluginManager.getInstance(getContext()).removePluginListener(mLeftListener); TunerService.get(getContext()).removeTunable(this);