From 967f6199ba00e1064271f9019a96e21351641e26 Mon Sep 17 00:00:00 2001 From: Adrian Roos Date: Wed, 9 Mar 2016 12:47:26 -0800 Subject: [PATCH] Don't close RemoteInputView on window focus loss Fixes issues where the status bar would temporarily lose focus to things like the IME or auto correction popups. Bug: 27340422 Change-Id: I0af6e89179b78b147eee1091361da1f8a97f186b --- .../systemui/statusbar/policy/RemoteInputView.java | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/policy/RemoteInputView.java b/packages/SystemUI/src/com/android/systemui/statusbar/policy/RemoteInputView.java index c6659d1e7da2e..d9e8bd91cace9 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/policy/RemoteInputView.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/policy/RemoteInputView.java @@ -248,9 +248,11 @@ public class RemoteInputView extends LinearLayout implements View.OnClickListene } @Override - protected void onFocusLost() { - super.onFocusLost(); - defocusIfNeeded(); + protected void onFocusChanged(boolean focused, int direction, Rect previouslyFocusedRect) { + super.onFocusChanged(focused, direction, previouslyFocusedRect); + if (!focused) { + defocusIfNeeded(); + } } @Override