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

Commit 57edcb76 authored by Android Build Coastguard Worker's avatar Android Build Coastguard Worker
Browse files

Snap for 9286161 from db45ef85 to tm-qpr2-release

Change-Id: Ifb7e397782efc1122c14247185e6de50bd7b2cf1
parents b474cafc db45ef85
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -18,6 +18,7 @@ package com.android.internal.widget;

import android.annotation.Nullable;
import android.content.Context;
import android.os.Trace;
import android.util.AttributeSet;
import android.view.View;
import android.widget.LinearLayout;
@@ -54,6 +55,7 @@ public class RemeasuringLinearLayout extends LinearLayout {

    @Override
    protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
        Trace.beginSection("RemeasuringLinearLayout#onMeasure");
        super.onMeasure(widthMeasureSpec, heightMeasureSpec);
        int count = getChildCount();
        int height = 0;
@@ -86,5 +88,6 @@ public class RemeasuringLinearLayout extends LinearLayout {
        }
        mMatchParentViews.clear();
        setMeasuredDimension(getMeasuredWidth(), height);
        Trace.endSection();
    }
}
+8 −0
Original line number Diff line number Diff line
@@ -17,6 +17,7 @@
package com.android.keyguard;

import android.content.Context;
import android.os.Trace;
import android.util.AttributeSet;
import android.view.View;
import android.view.ViewGroup;
@@ -112,4 +113,11 @@ public class KeyguardStatusView extends GridLayout {
            mKeyguardSlice.dump(pw, args);
        }
    }

    @Override
    protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
        Trace.beginSection("KeyguardStatusView#onMeasure");
        super.onMeasure(widthMeasureSpec, heightMeasureSpec);
        Trace.endSection();
    }
}
+10 −3
Original line number Diff line number Diff line
@@ -23,7 +23,10 @@ import com.android.systemui.keyguard.shared.model.BouncerShowMessageModel
import com.android.systemui.keyguard.shared.model.KeyguardBouncerModel
import com.android.systemui.statusbar.phone.KeyguardBouncer
import javax.inject.Inject
import kotlinx.coroutines.channels.BufferOverflow
import kotlinx.coroutines.flow.MutableSharedFlow
import kotlinx.coroutines.flow.MutableStateFlow
import kotlinx.coroutines.flow.asSharedFlow
import kotlinx.coroutines.flow.asStateFlow

/** Encapsulates app state for the lock screen primary and alternate bouncer. */
@@ -68,8 +71,12 @@ constructor(
    private val _keyguardAuthenticated = MutableStateFlow<Boolean?>(null)
    /** Determines if user is already unlocked */
    val keyguardAuthenticated = _keyguardAuthenticated.asStateFlow()
    private val _showMessage = MutableStateFlow<BouncerShowMessageModel?>(null)
    val showMessage = _showMessage.asStateFlow()
    private val _showMessage =
        MutableSharedFlow<BouncerShowMessageModel?>(
            replay = 1,
            onBufferOverflow = BufferOverflow.DROP_OLDEST
        )
    val showMessage = _showMessage.asSharedFlow()
    private val _resourceUpdateRequests = MutableStateFlow(false)
    val resourceUpdateRequests = _resourceUpdateRequests.asStateFlow()
    val bouncerPromptReason: Int
@@ -118,7 +125,7 @@ constructor(
    }

    fun setShowMessage(bouncerShowMessageModel: BouncerShowMessageModel?) {
        _showMessage.value = bouncerShowMessageModel
        _showMessage.tryEmit(bouncerShowMessageModel)
    }

    fun setKeyguardAuthenticated(keyguardAuthenticated: Boolean?) {
+0 −1
Original line number Diff line number Diff line
@@ -117,7 +117,6 @@ constructor(
    @JvmOverloads
    fun show(isScrimmed: Boolean) {
        // Reset some states as we show the bouncer.
        repository.setShowMessage(null)
        repository.setOnScreenTurnedOff(false)
        repository.setKeyguardAuthenticated(null)
        repository.setPrimaryHide(false)
+12 −0
Original line number Diff line number Diff line
@@ -25,6 +25,7 @@ import android.content.ComponentName;
import android.content.res.Configuration;
import android.content.res.Configuration.Orientation;
import android.metrics.LogMaker;
import android.util.Log;
import android.view.View;

import com.android.internal.annotations.VisibleForTesting;
@@ -38,6 +39,7 @@ import com.android.systemui.plugins.qs.QSTileView;
import com.android.systemui.qs.customize.QSCustomizerController;
import com.android.systemui.qs.external.CustomTile;
import com.android.systemui.qs.logging.QSLogger;
import com.android.systemui.qs.tileimpl.QSTileViewImpl;
import com.android.systemui.util.LargeScreenUtils;
import com.android.systemui.util.ViewController;
import com.android.systemui.util.animation.DisappearParameters;
@@ -237,6 +239,16 @@ public abstract class QSPanelControllerBase<T extends QSPanel> extends ViewContr
    private void addTile(final QSTile tile, boolean collapsedView) {
        final TileRecord r =
                new TileRecord(tile, mHost.createTileView(getContext(), tile, collapsedView));
        // TODO(b/250618218): Remove the QSLogger in QSTileViewImpl once we know the root cause of
        // b/250618218.
        try {
            QSTileViewImpl qsTileView = (QSTileViewImpl) (r.tileView);
            if (qsTileView != null) {
                qsTileView.setQsLogger(mQSLogger);
            }
        } catch (ClassCastException e) {
            Log.e(TAG, "Failed to cast QSTileView to QSTileViewImpl", e);
        }
        mView.addTile(r);
        mRecords.add(r);
        mCachedSpecs = getTilesSpecs();
Loading