diff options
author | Roman Birg <roman@cyngn.com> | 2015-05-18 13:25:43 -0700 |
---|---|---|
committer | Danesh M <daneshm90@gmail.com> | 2015-11-05 17:33:48 -0800 |
commit | 08b2361e204bb9a315144babfdbb569cef59bb51 (patch) | |
tree | d365ae6cc04800f79af95d7c8d92a1354904553d /packages/SystemUI | |
parent | ab5cf35d923fd7e6ef89bf3d84f8f439914c5ff4 (diff) | |
download | frameworks_base-08b2361e204bb9a315144babfdbb569cef59bb51.zip frameworks_base-08b2361e204bb9a315144babfdbb569cef59bb51.tar.gz frameworks_base-08b2361e204bb9a315144babfdbb569cef59bb51.tar.bz2 |
SystemUI: improve dpad arrow key state logic
Switching between two keyboards had the possibility of messing up the
states and making the first button disappear. This patch addresses that
to make sure we only hide the buttons as needed.
Change-Id: Iaad23324dba7241674f6e5483b72300fd00b6cc6
Signed-off-by: Roman Birg <roman@cyngn.com>
Diffstat (limited to 'packages/SystemUI')
-rw-r--r-- | packages/SystemUI/src/com/android/systemui/statusbar/phone/NavigationBarView.java | 12 |
1 files changed, 8 insertions, 4 deletions
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 7e1d3ba..cddf015 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/NavigationBarView.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/NavigationBarView.java @@ -394,10 +394,14 @@ public class NavigationBarView extends LinearLayout { View one = getCurrentView().findViewById(mVertical ? R.id.six : R.id.one); View six = getCurrentView().findViewById(mVertical ? R.id.one : R.id.six); if (showingIme) { - mSlotOneVisibility = one.getVisibility(); - mSlotSixVisibility = six.getVisibility(); - setVisibleOrGone(one, false); - setVisibleOrGone(six, false); + if (mSlotOneVisibility == View.VISIBLE) { + mSlotOneVisibility = one.getVisibility(); + setVisibleOrGone(one, false); + } + if (mSlotSixVisibility == View.VISIBLE) { + mSlotSixVisibility = six.getVisibility(); + setVisibleOrGone(six, false); + } } else { if (mSlotOneVisibility != -1) { one.setVisibility(mSlotOneVisibility); |