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

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

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

Merge cherrypicks of ['googleplex-android-review.googlesource.com/26445676', 'googleplex-android-review.googlesource.com/26502386'] into 24Q2-release.

Change-Id: I12d5443fbe97b75eea2cf8e4bf8639ea3d3755a1
parents 9f54dcf9 aa5f525a
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -667,7 +667,8 @@ public class CallLog {
            @FlaggedApi(Flags.FLAG_BUSINESS_CALL_COMPOSER)
            public @NonNull AddCallParametersBuilder setAssertedDisplayName(
                    String assertedDisplayName) {
                if (assertedDisplayName.length() > MAX_NUMBER_OF_CHARACTERS) {
                if (assertedDisplayName != null
                        && assertedDisplayName.length() > MAX_NUMBER_OF_CHARACTERS) {
                    throw new IllegalArgumentException("assertedDisplayName exceeds the character"
                            + " limit of " + MAX_NUMBER_OF_CHARACTERS + ".");
                }
+1 −0
Original line number Diff line number Diff line
@@ -603,6 +603,7 @@ constructor(
                }
            }
            val cancelHandler = Runnable {
                statusBarStateController.setLeaveOpenOnKeyguardHide(false)
                draggedDownEntry?.apply {
                    setUserLocked(false)
                    notifyHeightChanged(
+14 −0
Original line number Diff line number Diff line
@@ -35,6 +35,8 @@ import com.android.systemui.statusbar.phone.ScrimController
import com.android.systemui.statusbar.policy.FakeConfigurationController
import com.android.systemui.statusbar.policy.ResourcesSplitShadeStateController
import com.android.systemui.user.domain.UserDomainLayerModule
import com.android.systemui.util.mockito.any
import com.android.systemui.util.mockito.argumentCaptor
import com.android.systemui.util.mockito.mock
import dagger.BindsInstance
import dagger.Component
@@ -55,6 +57,7 @@ import org.mockito.ArgumentMatchers.anyFloat
import org.mockito.ArgumentMatchers.anyInt
import org.mockito.ArgumentMatchers.anyLong
import org.mockito.ArgumentMatchers.eq
import org.mockito.ArgumentMatchers.isNull
import org.mockito.Mock
import org.mockito.Mockito
import org.mockito.Mockito.clearInvocations
@@ -309,6 +312,17 @@ class LockscreenShadeTransitionControllerTest : SysuiTestCase() {
        assertNotNull(transitionController.dragDownAnimator)
    }

    @Test
    fun testGoToLockedShadeCancelDoesntLeaveShadeOpenOnKeyguardHide() {
        whenever(lockScreenUserManager.shouldShowLockscreenNotifications()).thenReturn(false)
        whenever(lockScreenUserManager.isLockscreenPublicMode(any())).thenReturn(true)
        transitionController.goToLockedShade(null)
        val captor = argumentCaptor<Runnable>()
        verify(centralSurfaces).showBouncerWithDimissAndCancelIfKeyguard(isNull(), captor.capture())
        captor.value.run()
        verify(statusbarStateController).setLeaveOpenOnKeyguardHide(false)
    }

    @Test
    fun testDragDownAmountDoesntCallOutInLockedDownShade() {
        whenever(nsslController.isInLockedDownShade).thenReturn(true)