diff options
| author | 2019-08-23 12:35:34 -0400 | |
|---|---|---|
| committer | 2019-08-23 12:35:34 -0400 | |
| commit | baad236610c963c36f0608410c831c04224d0369 (patch) | |
| tree | 5a69fa106b91b6ec11369342a6126d89c850799b | |
| parent | 0d0bf428b972784868628142af9ef159853826d7 (diff) | |
Makes current user not clickable
When clicking on the current user, SystemUI will try to switch to the
current user and fail silently. There's no reason to go to that path, as
we could prevent the current user from being clickable.
The only times the current user should be clickable is if it's a Guest
(and we want to remove it).
By making the current user not clickable, TB will not announce it as
such and will not create confusion.
Fixes: 139920678
Test: manual, switching accounts and into Guest
Change-Id: I413f62c9e23249c92b192ed4fb4974d75c1543c5
| -rw-r--r-- | packages/SystemUI/src/com/android/systemui/qs/tiles/UserDetailView.java | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/qs/tiles/UserDetailView.java b/packages/SystemUI/src/com/android/systemui/qs/tiles/UserDetailView.java index 91d38bd075bf..d6dad687e5d4 100644 --- a/packages/SystemUI/src/com/android/systemui/qs/tiles/UserDetailView.java +++ b/packages/SystemUI/src/com/android/systemui/qs/tiles/UserDetailView.java @@ -76,8 +76,11 @@ public class UserDetailView extends PseudoGridView { UserSwitcherController.UserRecord item) { UserDetailItemView v = UserDetailItemView.convertOrInflate( mContext, convertView, parent); - if (v != convertView) { + if ((v != convertView && !item.isCurrent) || item.isGuest) { v.setOnClickListener(this); + } else { + v.setOnClickListener(null); + v.setClickable(false); } String name = getName(mContext, item); if (item.picture == null) { |