Loading packages/SystemUI/res/values/config.xml +4 −1 Original line number Original line Diff line number Diff line Loading @@ -76,8 +76,11 @@ <!-- Vibration duration for GlowPadView used in SearchPanelView --> <!-- Vibration duration for GlowPadView used in SearchPanelView --> <integer translatable="false" name="config_search_panel_view_vibration_duration">20</integer> <integer translatable="false" name="config_search_panel_view_vibration_duration">20</integer> <!-- Show mic or phone affordance on Keyguard --> <bool name="config_keyguardShowLeftAffordance">false</bool> <!-- Show camera affordance on Keyguard --> <!-- Show camera affordance on Keyguard --> <bool name="config_keyguardShowCameraAffordance">true</bool> <bool name="config_keyguardShowCameraAffordance">false</bool> <!-- Whether we should use SRC drawing mode when drawing the scrim behind. If this flag is set, <!-- Whether we should use SRC drawing mode when drawing the scrim behind. If this flag is set, we change the canvas opacity so libhwui doesn't call glClear on our surface, and then we we change the canvas opacity so libhwui doesn't call glClear on our surface, and then we Loading packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardAffordanceHelper.java +7 −0 Original line number Original line Diff line number Diff line Loading @@ -529,6 +529,13 @@ public class KeyguardAffordanceHelper { KeyguardAffordanceView targetView = left ? mLeftIcon : mRightIcon; KeyguardAffordanceView targetView = left ? mLeftIcon : mRightIcon; KeyguardAffordanceView otherView = left ? mRightIcon : mLeftIcon; KeyguardAffordanceView otherView = left ? mRightIcon : mLeftIcon; startSwiping(targetView); startSwiping(targetView); // Do not animate the circle expanding if the affordance isn't visible, // otherwise the circle will be meaningless. if (targetView.getVisibility() != View.VISIBLE) { animate = false; } if (animate) { if (animate) { fling(0, false, !left); fling(0, false, !left); updateIcon(otherView, 0.0f, 0, true, false, true, false); updateIcon(otherView, 0.0f, 0, true, false, true, false); Loading packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardBottomAreaView.java +4 −2 Original line number Original line Diff line number Diff line Loading @@ -822,8 +822,10 @@ public class KeyguardBottomAreaView extends FrameLayout implements View.OnClickL @Override @Override public IconState getIcon() { public IconState getIcon() { mLeftIsVoiceAssist = canLaunchVoiceAssist(); mLeftIsVoiceAssist = canLaunchVoiceAssist(); final boolean showAffordance = getResources().getBoolean(R.bool.config_keyguardShowLeftAffordance); if (mLeftIsVoiceAssist) { if (mLeftIsVoiceAssist) { mIconState.isVisible = mUserSetupComplete; mIconState.isVisible = mUserSetupComplete && showAffordance; if (mLeftAssistIcon == null) { if (mLeftAssistIcon == null) { mIconState.drawable = mContext.getDrawable(R.drawable.ic_mic_26dp); mIconState.drawable = mContext.getDrawable(R.drawable.ic_mic_26dp); } else { } else { Loading @@ -832,7 +834,7 @@ public class KeyguardBottomAreaView extends FrameLayout implements View.OnClickL mIconState.contentDescription = mContext.getString( mIconState.contentDescription = mContext.getString( R.string.accessibility_voice_assist_button); R.string.accessibility_voice_assist_button); } else { } else { mIconState.isVisible = mUserSetupComplete && isPhoneVisible(); mIconState.isVisible = mUserSetupComplete && showAffordance && isPhoneVisible(); mIconState.drawable = mContext.getDrawable(R.drawable.ic_phone_24dp); mIconState.drawable = mContext.getDrawable(R.drawable.ic_phone_24dp); mIconState.contentDescription = mContext.getString( mIconState.contentDescription = mContext.getString( R.string.accessibility_phone_button); R.string.accessibility_phone_button); Loading Loading
packages/SystemUI/res/values/config.xml +4 −1 Original line number Original line Diff line number Diff line Loading @@ -76,8 +76,11 @@ <!-- Vibration duration for GlowPadView used in SearchPanelView --> <!-- Vibration duration for GlowPadView used in SearchPanelView --> <integer translatable="false" name="config_search_panel_view_vibration_duration">20</integer> <integer translatable="false" name="config_search_panel_view_vibration_duration">20</integer> <!-- Show mic or phone affordance on Keyguard --> <bool name="config_keyguardShowLeftAffordance">false</bool> <!-- Show camera affordance on Keyguard --> <!-- Show camera affordance on Keyguard --> <bool name="config_keyguardShowCameraAffordance">true</bool> <bool name="config_keyguardShowCameraAffordance">false</bool> <!-- Whether we should use SRC drawing mode when drawing the scrim behind. If this flag is set, <!-- Whether we should use SRC drawing mode when drawing the scrim behind. If this flag is set, we change the canvas opacity so libhwui doesn't call glClear on our surface, and then we we change the canvas opacity so libhwui doesn't call glClear on our surface, and then we Loading
packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardAffordanceHelper.java +7 −0 Original line number Original line Diff line number Diff line Loading @@ -529,6 +529,13 @@ public class KeyguardAffordanceHelper { KeyguardAffordanceView targetView = left ? mLeftIcon : mRightIcon; KeyguardAffordanceView targetView = left ? mLeftIcon : mRightIcon; KeyguardAffordanceView otherView = left ? mRightIcon : mLeftIcon; KeyguardAffordanceView otherView = left ? mRightIcon : mLeftIcon; startSwiping(targetView); startSwiping(targetView); // Do not animate the circle expanding if the affordance isn't visible, // otherwise the circle will be meaningless. if (targetView.getVisibility() != View.VISIBLE) { animate = false; } if (animate) { if (animate) { fling(0, false, !left); fling(0, false, !left); updateIcon(otherView, 0.0f, 0, true, false, true, false); updateIcon(otherView, 0.0f, 0, true, false, true, false); Loading
packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardBottomAreaView.java +4 −2 Original line number Original line Diff line number Diff line Loading @@ -822,8 +822,10 @@ public class KeyguardBottomAreaView extends FrameLayout implements View.OnClickL @Override @Override public IconState getIcon() { public IconState getIcon() { mLeftIsVoiceAssist = canLaunchVoiceAssist(); mLeftIsVoiceAssist = canLaunchVoiceAssist(); final boolean showAffordance = getResources().getBoolean(R.bool.config_keyguardShowLeftAffordance); if (mLeftIsVoiceAssist) { if (mLeftIsVoiceAssist) { mIconState.isVisible = mUserSetupComplete; mIconState.isVisible = mUserSetupComplete && showAffordance; if (mLeftAssistIcon == null) { if (mLeftAssistIcon == null) { mIconState.drawable = mContext.getDrawable(R.drawable.ic_mic_26dp); mIconState.drawable = mContext.getDrawable(R.drawable.ic_mic_26dp); } else { } else { Loading @@ -832,7 +834,7 @@ public class KeyguardBottomAreaView extends FrameLayout implements View.OnClickL mIconState.contentDescription = mContext.getString( mIconState.contentDescription = mContext.getString( R.string.accessibility_voice_assist_button); R.string.accessibility_voice_assist_button); } else { } else { mIconState.isVisible = mUserSetupComplete && isPhoneVisible(); mIconState.isVisible = mUserSetupComplete && showAffordance && isPhoneVisible(); mIconState.drawable = mContext.getDrawable(R.drawable.ic_phone_24dp); mIconState.drawable = mContext.getDrawable(R.drawable.ic_phone_24dp); mIconState.contentDescription = mContext.getString( mIconState.contentDescription = mContext.getString( R.string.accessibility_phone_button); R.string.accessibility_phone_button); Loading