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

Commit 13178edd authored by Aaron Liu's avatar Aaron Liu
Browse files

Override applyLayoutFeatures for ConstraintHelper

This method seems to set the visibility of the subviews based on the
visiblity of constraint helper; however we want to hide some views and
show some views. The method also adjusts the z order of the view, which
seems moot. This will prevent us from updating the visibility of the
enter button and the delete button upon screen rotation.

Fixes: 268589232
Test: Rotate the screen 90, and 180 degrees. Flip open and close the
device. Observer the visibility of the enter and delete button.

Change-Id: Id5d8c01e658aed4b06970b5475228f171848f3c4
parent 255c2994
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -82,7 +82,7 @@
            androidprv:layout_constraintGuide_percent="0"
            android:orientation="horizontal" />

        <androidx.constraintlayout.helper.widget.Flow
        <com.android.keyguard.KeyguardPinFlowView
            android:id="@+id/flow1"
            android:layout_width="0dp"
            android:layout_height="0dp"
+27 −0
Original line number Diff line number Diff line
/*
 * Copyright (C) 2023 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.
 */

package com.android.keyguard

import android.content.Context
import android.util.AttributeSet
import androidx.constraintlayout.helper.widget.Flow
import androidx.constraintlayout.widget.ConstraintLayout

class KeyguardPinFlowView(context: Context, attrs: AttributeSet?) : Flow(context, attrs) {
    // Overriding this so that visibilities of child views do not get updated.
    override fun applyLayoutFeatures(container: ConstraintLayout?) {}
}