Fixes bug in user switcher bouncer dropdown am: d544909970
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/20104924 Change-Id: Ife4d5dc14ab8057dd0c05b247e29ad032ec3c978 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
committed by
Automerger Merge Worker
commit
310f6c7f36
20
packages/SystemUI/res-keyguard/values/ids.xml
Normal file
20
packages/SystemUI/res-keyguard/values/ids.xml
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?><!--
|
||||||
|
~ Copyright (C) 2022 The Android Open Source Project
|
||||||
|
~
|
||||||
|
~ Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
~ you may not use this file except in compliance with the License.
|
||||||
|
~ You may obtain a copy of the License at
|
||||||
|
~
|
||||||
|
~ http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
~
|
||||||
|
~ Unless required by applicable law or agreed to in writing, software
|
||||||
|
~ distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
~ See the License for the specific language governing permissions and
|
||||||
|
~ limitations under the License.
|
||||||
|
~
|
||||||
|
-->
|
||||||
|
|
||||||
|
<resources>
|
||||||
|
<item type="id" name="header_footer_views_added_tag_key" />
|
||||||
|
</resources>
|
||||||
@@ -66,10 +66,13 @@ public class KeyguardUserSwitcherPopupMenu extends ListPopupWindow {
|
|||||||
listView.setDividerHeight(mContext.getResources().getDimensionPixelSize(
|
listView.setDividerHeight(mContext.getResources().getDimensionPixelSize(
|
||||||
R.dimen.bouncer_user_switcher_popup_divider_height));
|
R.dimen.bouncer_user_switcher_popup_divider_height));
|
||||||
|
|
||||||
int height = mContext.getResources().getDimensionPixelSize(
|
if (listView.getTag(R.id.header_footer_views_added_tag_key) == null) {
|
||||||
R.dimen.bouncer_user_switcher_popup_header_height);
|
int height = mContext.getResources().getDimensionPixelSize(
|
||||||
listView.addHeaderView(createSpacer(height), null, false);
|
R.dimen.bouncer_user_switcher_popup_header_height);
|
||||||
listView.addFooterView(createSpacer(height), null, false);
|
listView.addHeaderView(createSpacer(height), null, false);
|
||||||
|
listView.addFooterView(createSpacer(height), null, false);
|
||||||
|
listView.setTag(R.id.header_footer_views_added_tag_key, new Object());
|
||||||
|
}
|
||||||
|
|
||||||
listView.setOnTouchListener((v, ev) -> {
|
listView.setOnTouchListener((v, ev) -> {
|
||||||
if (ev.getActionMasked() == MotionEvent.ACTION_DOWN) {
|
if (ev.getActionMasked() == MotionEvent.ACTION_DOWN) {
|
||||||
|
|||||||
Reference in New Issue
Block a user