From 2aaa91aa69f2fcdc23c3226c3ddc87e4432af681 Mon Sep 17 00:00:00 2001 From: Jeff Chang Date: Thu, 8 Nov 2018 18:04:16 +0800 Subject: Hide the recents button on the secondary display The recent only support on the default display now. If users launch the recent on the secondary display,the recent will show on the default display.Hide the recents button of the navigation bar on the secondary display to prevent the weird behavior first. Bug: 117749252 Test: atest SystemUITests Test: atest NavigationBarButtonTest Test: manual - Create a virtual display with system decoration and check if the recents button on the navigation bar. Change-Id: I6f6111d0043046c192cdc6ad2b1fd7d075cb9d26 --- .../statusbar/phone/NavigationBarView.java | 24 +++-- .../com/android/systemui/SysuiTestableContext.java | 12 +++ .../statusbar/phone/NavigationBarButtonTest.java | 101 +++++++++++++++++++++ 3 files changed, 129 insertions(+), 8 deletions(-) create mode 100644 packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/NavigationBarButtonTest.java diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/NavigationBarView.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/NavigationBarView.java index cd6e1d794428..c2fac142f5f0 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/NavigationBarView.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/NavigationBarView.java @@ -63,6 +63,7 @@ import android.view.accessibility.AccessibilityNodeInfo.AccessibilityAction; import android.view.inputmethod.InputMethodManager; import android.widget.FrameLayout; +import com.android.internal.annotations.VisibleForTesting; import com.android.systemui.Dependency; import com.android.systemui.DockedStackExistsListener; import com.android.systemui.Interpolators; @@ -96,7 +97,6 @@ public class NavigationBarView extends FrameLayout implements PluginListener