OSDN Git Service

keyguard: Handle left icon visibility properly with wifi only devices
authorBrint E. Kriebel <github@bekit.net>
Mon, 2 Jul 2018 22:57:22 +0000 (15:57 -0700)
committerBrint E. Kriebel <github@bekit.net>
Mon, 2 Jul 2018 22:57:22 +0000 (15:57 -0700)
When telephony isn't available and the left icon has not yet been set to
a custom option, the left icon should be hidden.

This makes updateLeftAffordanceIcon and updateLeftButtonVisibility work
in a similar way to determine the icon visibility.

Change-Id: Ibb63ecef3c3cad73a19c04c85eccb93b423d5e80

packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardBottomAreaView.java

index b4402a4..1a05ab6 100644 (file)
@@ -362,8 +362,10 @@ public class KeyguardBottomAreaView extends FrameLayout implements View.OnClickL
         if (visible) {
             if (isTargetCustom(Shortcuts.LEFT_SHORTCUT)) {
                 visible = !mShortcutHelper.isTargetEmpty(Shortcuts.LEFT_SHORTCUT);
-            } else {
+            } else if (canLaunchVoiceAssist()) {
                 // Display left shortcut
+            } else {
+                visible = isPhoneVisible();
             }
         }
         mLeftAffordanceView.setVisibility(visible ? View.VISIBLE : View.GONE);