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

Commit 3ce996f2 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Parameter to hide bottom affordances"

parents b3c096d9 f78c540c
Loading
Loading
Loading
Loading
+4 −1
Original line number Original line Diff line number Diff line
@@ -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
+7 −0
Original line number Original line Diff line number Diff line
@@ -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);
+4 −2
Original line number Original line Diff line number Diff line
@@ -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 {
@@ -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);