summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Fabian Kozynski <kozynski@google.com> 2019-08-23 12:35:34 -0400
committer Fabian Kozynski <kozynski@google.com> 2019-08-23 12:35:34 -0400
commitbaad236610c963c36f0608410c831c04224d0369 (patch)
tree5a69fa106b91b6ec11369342a6126d89c850799b
parent0d0bf428b972784868628142af9ef159853826d7 (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.java5
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) {