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

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

Merge cherrypicks of ['googleplex-android-review.googlesource.com/27873895',...

Merge cherrypicks of ['googleplex-android-review.googlesource.com/27873895', 'googleplex-android-review.googlesource.com/27891039', 'googleplex-android-review.googlesource.com/27846188', 'googleplex-android-review.googlesource.com/27896058', 'googleplex-android-review.googlesource.com/27906595'] into 24Q3-release.

Change-Id: I054a36fa570280a752d7df78c0f41420f903d689
parents 681ba872 6ffc1dc6
Loading
Loading
Loading
Loading
+8 −2
Original line number Diff line number Diff line
@@ -126,6 +126,7 @@ import static android.view.inputmethod.InputMethodEditorTraceProto.InputMethodCl
import static com.android.internal.annotations.VisibleForTesting.Visibility.PACKAGE;
import static com.android.window.flags.Flags.activityWindowInfoFlag;
import static com.android.window.flags.Flags.enableBufferTransformHintFromDisplay;
import static com.android.window.flags.Flags.insetsControlChangedItem;
import static com.android.window.flags.Flags.setScPropertiesInClient;
import static com.android.window.flags.Flags.windowSessionRelayoutInfo;
import static com.android.text.flags.Flags.disableHandwritingInitiatorForIme;
@@ -11417,8 +11418,13 @@ public final class ViewRootImpl implements ViewParent,
        @Override
        public void insetsControlChanged(InsetsState insetsState,
                InsetsSourceControl.Array activeControls) {
            final boolean isFromInsetsControlChangeItem = mIsFromTransactionItem;
            final boolean isFromInsetsControlChangeItem;
            if (insetsControlChangedItem()) {
                isFromInsetsControlChangeItem = mIsFromTransactionItem;
                mIsFromTransactionItem = false;
            } else {
                isFromInsetsControlChangeItem = false;
            }
            final ViewRootImpl viewAncestor = mViewAncestor.get();
            if (viewAncestor == null) {
                if (isFromInsetsControlChangeItem) {
+9 −0
Original line number Diff line number Diff line
@@ -224,6 +224,15 @@ class DeviceEntryIconViewModelTest : SysuiTestCase() {
            // interactive lock icon
            setUpState(isUdfpsSupported = true)

            assertThat(accessibilityDelegateHint)
                .isEqualTo(DeviceEntryIconView.AccessibilityHintType.BOUNCER)

            // udfps running
            setUpState(
                isUdfpsSupported = true,
                isUdfpsRunning = true,
            )

            assertThat(accessibilityDelegateHint)
                .isEqualTo(DeviceEntryIconView.AccessibilityHintType.BOUNCER)

+1 −1
Original line number Diff line number Diff line
@@ -284,9 +284,9 @@ constructor(
    private fun DeviceEntryIconView.IconType.toAccessibilityHintType():
        DeviceEntryIconView.AccessibilityHintType {
        return when (this) {
            DeviceEntryIconView.IconType.FINGERPRINT,
            DeviceEntryIconView.IconType.LOCK -> DeviceEntryIconView.AccessibilityHintType.BOUNCER
            DeviceEntryIconView.IconType.UNLOCK -> DeviceEntryIconView.AccessibilityHintType.ENTER
            DeviceEntryIconView.IconType.FINGERPRINT,
            DeviceEntryIconView.IconType.NONE -> DeviceEntryIconView.AccessibilityHintType.NONE
        }
    }
+2 −2
Original line number Diff line number Diff line
@@ -68,7 +68,7 @@ public final class StatusBarTouchableRegionManager implements Dumpable {
    private final UnlockedScreenOffAnimationController mUnlockedScreenOffAnimationController;

    private boolean mIsStatusBarExpanded = false;
    private boolean mIsIdleOnGone = false;
    private boolean mIsIdleOnGone = true;
    private boolean mShouldAdjustInsets = false;
    private View mNotificationShadeWindowView;
    private View mNotificationPanelView;
@@ -282,7 +282,7 @@ public final class StatusBarTouchableRegionManager implements Dumpable {
        // since we don't want stray touches to go through the light reveal scrim to whatever is
        // underneath.
        return mIsStatusBarExpanded
                || !mIsIdleOnGone
                || (SceneContainerFlag.isEnabled() && !mIsIdleOnGone)
                || mPrimaryBouncerInteractor.isShowing().getValue()
                || mAlternateBouncerInteractor.isVisibleState()
                || mUnlockedScreenOffAnimationController.isAnimationPlaying();
+54 −19
Original line number Diff line number Diff line
@@ -345,10 +345,16 @@ constructor(
                orElse = flowOf(false),
                retrySignal = telephonyProcessCrashedEvent,
            )
            .stateIn(scope, SharingStarted.WhileSubscribed(), false)
            .stateIn(scope, SharingStarted.Eagerly, false)

    private fun satelliteProvisioned(sm: SupportedSatelliteManager): Flow<Boolean> =
        conflatedCallbackFlow {
                // TODO(b/347992038): SatelliteManager should be sending the current provisioned
                // status when we register a callback. Until then, we have to manually query here.

                // First, check to see what the current status is, and send the result to the output
                trySend(queryIsSatelliteProvisioned(sm))

                val callback = SatelliteProvisionStateCallback { provisioned ->
                    logBuffer.i {
                        "onSatelliteProvisionStateChanged: " +
@@ -359,6 +365,7 @@ constructor(

                var registered = false
                try {
                    logBuffer.i { "registerForProvisionStateChanged" }
                    sm.registerForProvisionStateChanged(
                        bgDispatcher.asExecutor(),
                        callback,
@@ -374,6 +381,34 @@ constructor(
                    }
                }
            }
            .flowOn(bgDispatcher)

    /** Check the current satellite provisioning status. */
    private suspend fun queryIsSatelliteProvisioned(sm: SupportedSatelliteManager): Boolean =
        withContext(bgDispatcher) {
            suspendCancellableCoroutine { continuation ->
                val receiver =
                    object : OutcomeReceiver<Boolean, SatelliteManager.SatelliteException> {
                        override fun onResult(result: Boolean) {
                            logBuffer.i { "requestIsProvisioned.onResult: $result" }
                            continuation.resume(result)
                        }

                        override fun onError(exception: SatelliteManager.SatelliteException) {
                            logBuffer.e("requestIsProvisioned.onError:", exception)
                            continuation.resume(false)
                        }
                    }

                logBuffer.i { "Query for current satellite provisioned state." }
                try {
                    sm.requestIsProvisioned(bgDispatcher.asExecutor(), receiver)
                } catch (e: Exception) {
                    logBuffer.e("Exception while calling SatelliteManager.requestIsProvisioned:", e)
                    continuation.resume(false)
                }
            }
        }

    /**
     * Signal that we should start polling [checkIsSatelliteAllowed]. We only need to poll if there
Loading