Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ee95c315 authored by András Klöczl's avatar András Klöczl Committed by Automerger Merge Worker
Browse files

Merge "Fix keyguard and qs user switcher disabled state" into rvc-dev am: 31b2931b

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/11687318

Change-Id: Iba7a85df97d45c417d9900ca776525b60d1631e2
parents b4f4b9d7 31b2931b
Loading
Loading
Loading
Loading
+0 −22
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>

<!--
  ~ Copyright (C) 2016 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
  -->

<selector xmlns:android="http://schemas.android.com/apk/res/android">
    <item android:state_enabled="false" android:color="?android:attr/textColorPrimary" />
    <item android:color="@android:color/transparent" />
</selector>
+1 −1
Original line number Diff line number Diff line
@@ -27,13 +27,13 @@
        android:gravity="end|center_vertical"
        android:clickable="true"
        android:background="@drawable/kg_user_switcher_rounded_bg"
        sysui:activatedTextAppearance="@style/TextAppearance.StatusBar.Expanded.UserSwitcher"
        sysui:regularTextAppearance="@style/TextAppearance.StatusBar.Expanded.UserSwitcher">
    <TextView android:id="@+id/user_name"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginStart="25dp"
            android:layout_marginEnd="12dp"
            android:textAppearance="@style/TextAppearance.StatusBar.Expanded.UserSwitcher"
            />
    <com.android.systemui.statusbar.phone.UserAvatarView android:id="@+id/user_picture"
            android:layout_width="@dimen/kg_framed_avatar_size"
+0 −2
Original line number Diff line number Diff line
@@ -39,8 +39,6 @@
            android:layout_width="@dimen/kg_framed_avatar_size"
            android:layout_height="@dimen/kg_framed_avatar_size"
            android:contentDescription="@null"
            android:backgroundTint="@color/qs_user_detail_avatar_tint"
            android:backgroundTintMode="src_atop"
            sysui:frameWidth="@dimen/keyguard_user_switcher_border_thickness"
            sysui:framePadding="2.5dp"
            sysui:badgeDiameter="18dp"
+1 −2
Original line number Diff line number Diff line
@@ -30,6 +30,7 @@
        android:clipToPadding="false"
        android:focusable="true"
        android:background="@drawable/ripple_drawable"
        systemui:activatedTextAppearance="@style/TextAppearance.QS.UserSwitcher"
        systemui:regularTextAppearance="@style/TextAppearance.QS.UserSwitcher">

    <com.android.systemui.statusbar.phone.UserAvatarView
@@ -37,8 +38,6 @@
            android:layout_width="@dimen/qs_framed_avatar_size"
            android:layout_height="@dimen/qs_framed_avatar_size"
            android:layout_marginBottom="7dp"
            android:backgroundTint="@color/qs_user_detail_avatar_tint"
            android:backgroundTintMode="src_atop"
            systemui:frameWidth="6dp"
            systemui:badgeDiameter="18dp"
            systemui:badgeMargin="1dp"
+4 −7
Original line number Diff line number Diff line
@@ -95,14 +95,11 @@ public class UserDetailItemView extends LinearLayout {
        mAvatar.setDrawableWithBadge(picture, userId);
    }

    public void setAvatarEnabled(boolean enabled) {
        mAvatar.setEnabled(enabled);
    }

    public void setDisabledByAdmin(boolean disabled) {
        if (mRestrictedPadlock != null) {
            mRestrictedPadlock.setVisibility(disabled ? View.VISIBLE : View.GONE);
        mName.setEnabled(!disabled);
        mAvatar.setEnabled(!disabled);
        }
        setEnabled(!disabled);
    }

    public void setEnabled(boolean enabled) {
Loading