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

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

Snap for 12055462 from 93c94c54 to 24Q4-release

Change-Id: I4301a07762635da648374d1cb64cce9833d97f75
parents 5f6b504e 93c94c54
Loading
Loading
Loading
Loading
+12 −12
Original line number Diff line number Diff line
@@ -9,18 +9,18 @@ per-file *Lockscreen* = file:/services/core/java/com/android/server/locksettings
per-file *LockSettings* = file:/services/core/java/com/android/server/locksettings/OWNERS

# Notification related
per-file *Notification* = file:/services/core/java/com/android/server/notification/OWNERS
per-file *Messaging* = file:/services/core/java/com/android/server/notification/OWNERS
per-file *Message* = file:/services/core/java/com/android/server/notification/OWNERS
per-file *Conversation* = file:/services/core/java/com/android/server/notification/OWNERS
per-file *People* = file:/services/core/java/com/android/server/notification/OWNERS
per-file *ImageResolver* = file:/services/core/java/com/android/server/notification/OWNERS
per-file CallLayout.java = file:/services/core/java/com/android/server/notification/OWNERS
per-file CachingIconView.java = file:/services/core/java/com/android/server/notification/OWNERS
per-file ImageFloatingTextView.java = file:/services/core/java/com/android/server/notification/OWNERS
per-file ObservableTextView.java = file:/services/core/java/com/android/server/notification/OWNERS
per-file RemeasuringLinearLayout.java = file:/services/core/java/com/android/server/notification/OWNERS
per-file ViewClippingUtil.java = file:/services/core/java/com/android/server/notification/OWNERS
per-file *Notification* = file:/packages/SystemUI/src/com/android/systemui/statusbar/notification/OWNERS
per-file *Messaging* = file:/packages/SystemUI/src/com/android/systemui/statusbar/notification/OWNERS
per-file *Message* = file:/packages/SystemUI/src/com/android/systemui/statusbar/notification/OWNERS
per-file *Conversation* = file:/packages/SystemUI/src/com/android/systemui/statusbar/notification/OWNERS
per-file *People* = file:/packages/SystemUI/src/com/android/systemui/statusbar/notification/OWNERS
per-file *ImageResolver* = file:/packages/SystemUI/src/com/android/systemui/statusbar/notification/OWNERS
per-file CallLayout.java = file:/packages/SystemUI/src/com/android/systemui/statusbar/notification/OWNERS
per-file CachingIconView.java = file:/packages/SystemUI/src/com/android/systemui/statusbar/notification/OWNERS
per-file ImageFloatingTextView.java = file:/packages/SystemUI/src/com/android/systemui/statusbar/notification/OWNERS
per-file ObservableTextView.java = file:/packages/SystemUI/src/com/android/systemui/statusbar/notification/OWNERS
per-file RemeasuringLinearLayout.java = file:/packages/SystemUI/src/com/android/systemui/statusbar/notification/OWNERS
per-file ViewClippingUtil.java = file:/packages/SystemUI/src/com/android/systemui/statusbar/notification/OWNERS

# Appwidget related
per-file *RemoteViews* = file:/services/appwidget/java/com/android/server/appwidget/OWNERS
+82 −64
Original line number Diff line number Diff line
@@ -21,15 +21,16 @@ import android.tools.flicker.assertors.assertions.AppLayerIsInvisibleAtEnd
import android.tools.flicker.assertors.assertions.AppLayerIsVisibleAlways
import android.tools.flicker.assertors.assertions.AppLayerIsVisibleAtStart
import android.tools.flicker.assertors.assertions.AppWindowHasDesktopModeInitialBoundsAtTheEnd
import android.tools.flicker.assertors.assertions.AppWindowIsVisibleAlways
import android.tools.flicker.assertors.assertions.AppWindowHasSizeOfAtLeast
import android.tools.flicker.assertors.assertions.AppWindowIsInvisibleAtEnd
import android.tools.flicker.assertors.assertions.AppWindowOnTopAtEnd
import android.tools.flicker.assertors.assertions.AppWindowOnTopAtStart
import android.tools.flicker.assertors.assertions.AppWindowRemainInsideDisplayBounds
import android.tools.flicker.assertors.assertions.LauncherWindowMovesToTop
import android.tools.flicker.assertors.assertions.LauncherWindowReplacesAppAsTopWindow
import android.tools.flicker.config.AssertionTemplates
import android.tools.flicker.config.FlickerConfigEntry
import android.tools.flicker.config.ScenarioId
import android.tools.flicker.config.desktopmode.Components
import android.tools.flicker.config.desktopmode.Components.DESKTOP_WALLPAPER
import android.tools.flicker.extractors.ITransitionMatcher
import android.tools.flicker.extractors.ShellTransitionScenarioExtractor
import android.tools.flicker.extractors.TaggedCujTransitionMatcher
@@ -64,10 +65,11 @@ class DesktopModeFlickerScenarios {
                            AppWindowHasDesktopModeInitialBoundsAtTheEnd(
                                Components.DESKTOP_MODE_APP
                            )
                            )
                            .associateBy({ it }, { AssertionInvocationGroup.BLOCKING }),
                        ).associateBy({ it }, { AssertionInvocationGroup.BLOCKING }),
            )

        // Use this scenario for closing an app in desktop windowing, except the last app. For the
        // last app use CLOSE_LAST_APP scenario
        val CLOSE_APP =
            FlickerConfigEntry(
                scenarioId = ScenarioId("CLOSE_APP"),
@@ -78,7 +80,13 @@ class DesktopModeFlickerScenarios {
                        override fun findAll(
                            transitions: Collection<Transition>
                        ): Collection<Transition> {
                                    return transitions.filter { it.type == TransitionType.CLOSE }
                            // In case there are multiple windows closing, filter out the
                            // last window closing. It should use the CLOSE_LAST_APP
                            // scenario below.
                            return transitions
                                    .filter { it.type == TransitionType.CLOSE }
                                    .sortedByDescending { it.id }
                                    .drop(1)
                        }
                    }
                ),
@@ -88,8 +96,7 @@ class DesktopModeFlickerScenarios {
                            AppWindowOnTopAtStart(Components.DESKTOP_MODE_APP),
                            AppLayerIsVisibleAtStart(Components.DESKTOP_MODE_APP),
                            AppLayerIsInvisibleAtEnd(Components.DESKTOP_MODE_APP),
                            )
                            .associateBy({ it }, { AssertionInvocationGroup.BLOCKING }),
                        ).associateBy({ it }, { AssertionInvocationGroup.BLOCKING }),
            )

        val CLOSE_LAST_APP =
@@ -103,37 +110,48 @@ class DesktopModeFlickerScenarios {
                            transitions: Collection<Transition>
                        ): Collection<Transition> {
                            val lastTransition =
                                        transitions.findLast { it.type == TransitionType.CLOSE }
                                    return if (lastTransition != null) listOf(lastTransition)
                                    else emptyList()
                                transitions
                                        .filter { it.type == TransitionType.CLOSE }
                                        .maxByOrNull { it.id }!!
                            return listOf(lastTransition)
                        }
                    }
                ),
                assertions =
                AssertionTemplates.COMMON_ASSERTIONS +
                        listOf(
                                AppWindowOnTopAtStart(Components.DESKTOP_MODE_APP),
                                AppLayerIsVisibleAtStart(Components.DESKTOP_MODE_APP),
                                AppLayerIsInvisibleAtEnd(Components.DESKTOP_MODE_APP),
                                LauncherWindowMovesToTop()
                            )
                            .associateBy({ it }, { AssertionInvocationGroup.BLOCKING }),
                            AppWindowIsInvisibleAtEnd(Components.DESKTOP_MODE_APP),
                            LauncherWindowReplacesAppAsTopWindow(Components.DESKTOP_MODE_APP),
                            AppWindowIsInvisibleAtEnd(DESKTOP_WALLPAPER)
                        ).associateBy({ it }, { AssertionInvocationGroup.BLOCKING }),
            )

        val CORNER_RESIZE =
            FlickerConfigEntry(
                scenarioId = ScenarioId("CORNER_RESIZE"),
                extractor =
                TaggedScenarioExtractorBuilder()
                        .setTargetTag(CujType.CUJ_DESKTOP_MODE_RESIZE_WINDOW)
                        .setTransitionMatcher(
                            TaggedCujTransitionMatcher(associatedTransitionRequired = false)
                        )
                        .build(),
                assertions = AssertionTemplates.DESKTOP_MODE_APP_VISIBILITY_ASSERTIONS
            )

        val CORNER_RESIZE_TO_MINIMUM_SIZE =
            FlickerConfigEntry(
                scenarioId = ScenarioId("CORNER_RESIZE_TO_MINIMUM_SIZE"),
                extractor =
                TaggedScenarioExtractorBuilder()
                        .setTargetTag(CujType.CUJ_DESKTOP_MODE_RESIZE_WINDOW)
                        .setTransitionMatcher(
                            TaggedCujTransitionMatcher(associatedTransitionRequired = false)
                        ).build(),
                assertions =
                AssertionTemplates.DESKTOP_MODE_APP_VISIBILITY_ASSERTIONS +
                        listOf(
                        AppWindowIsVisibleAlways(Components.DESKTOP_MODE_APP),
                        AppWindowOnTopAtEnd(Components.DESKTOP_MODE_APP),
                        AppWindowRemainInsideDisplayBounds(Components.DESKTOP_MODE_APP),
                            AppWindowHasSizeOfAtLeast(Components.DESKTOP_MODE_APP, 770, 700)
                        ).associateBy({ it }, { AssertionInvocationGroup.BLOCKING }),
            )
    }
+52 −0
Original line number Diff line number Diff line
/*
 * Copyright (C) 2024 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.wm.shell.flicker.service.desktopmode.flicker

import android.tools.Rotation
import android.tools.flicker.FlickerConfig
import android.tools.flicker.annotation.ExpectedScenarios
import android.tools.flicker.annotation.FlickerConfigProvider
import android.tools.flicker.config.FlickerConfig
import android.tools.flicker.config.FlickerServiceConfig
import android.tools.flicker.junit.FlickerServiceJUnit4ClassRunner
import com.android.wm.shell.flicker.service.desktopmode.flicker.DesktopModeFlickerScenarios.Companion.CORNER_RESIZE_TO_MINIMUM_SIZE
import com.android.wm.shell.flicker.service.desktopmode.scenarios.ResizeAppWithCornerResize
import org.junit.Test
import org.junit.runner.RunWith

/**
 * Resize app window using corner resize to the smallest possible height and width in
 * landscape mode.
 *
 * Assert that the minimum window size constraint is maintained.
 */
@RunWith(FlickerServiceJUnit4ClassRunner::class)
class ResizeAppToMinimumWindowSizeLandscape : ResizeAppWithCornerResize(
    rotation = Rotation.ROTATION_90,
    horizontalChange = -1500,
    verticalChange = 1500) {
    @ExpectedScenarios(["CORNER_RESIZE_TO_MINIMUM_SIZE"])
    @Test
    override fun resizeAppWithCornerResize() = super.resizeAppWithCornerResize()

    companion object {
        @JvmStatic
        @FlickerConfigProvider
        fun flickerConfigProvider(): FlickerConfig =
            FlickerConfig().use(FlickerServiceConfig.DEFAULT).use(CORNER_RESIZE_TO_MINIMUM_SIZE)
    }
}
+48 −0
Original line number Diff line number Diff line
/*
 * Copyright (C) 2024 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.wm.shell.flicker.service.desktopmode.flicker

import android.tools.flicker.FlickerConfig
import android.tools.flicker.annotation.ExpectedScenarios
import android.tools.flicker.annotation.FlickerConfigProvider
import android.tools.flicker.config.FlickerConfig
import android.tools.flicker.config.FlickerServiceConfig
import android.tools.flicker.junit.FlickerServiceJUnit4ClassRunner
import com.android.wm.shell.flicker.service.desktopmode.flicker.DesktopModeFlickerScenarios.Companion.CORNER_RESIZE_TO_MINIMUM_SIZE
import com.android.wm.shell.flicker.service.desktopmode.scenarios.ResizeAppWithCornerResize
import org.junit.Test
import org.junit.runner.RunWith

/**
 * Resize app window using corner resize to the smallest possible height and width in portrait mode.
 *
 * Assert that the minimum window size constraint is maintained.
 */
@RunWith(FlickerServiceJUnit4ClassRunner::class)
class ResizeAppToMinimumWindowSizePortrait : ResizeAppWithCornerResize(horizontalChange = -1500,
    verticalChange = 1500) {
    @ExpectedScenarios(["CORNER_RESIZE_TO_MINIMUM_SIZE"])
    @Test
    override fun resizeAppWithCornerResize() = super.resizeAppWithCornerResize()

    companion object {
        @JvmStatic
        @FlickerConfigProvider
        fun flickerConfigProvider(): FlickerConfig =
            FlickerConfig().use(FlickerServiceConfig.DEFAULT).use(CORNER_RESIZE_TO_MINIMUM_SIZE)
    }
}
+11 −3
Original line number Diff line number Diff line
@@ -38,7 +38,9 @@ import org.junit.Test
@Ignore("Base Test Class")
abstract class ResizeAppWithCornerResize
@JvmOverloads
constructor(val rotation: Rotation = Rotation.ROTATION_0) {
constructor(val rotation: Rotation = Rotation.ROTATION_0,
    val horizontalChange: Int = 50,
    val verticalChange: Int = -50) {

    private val instrumentation: Instrumentation = InstrumentationRegistry.getInstrumentation()
    private val tapl = LauncherInstrumentation()
@@ -46,7 +48,9 @@ constructor(val rotation: Rotation = Rotation.ROTATION_0) {
    private val device = UiDevice.getInstance(instrumentation)
    private val testApp = DesktopModeAppHelper(SimpleAppHelper(instrumentation))

    @Rule @JvmField val testSetupRule = Utils.testSetupRule(NavBar.MODE_GESTURAL, rotation)
    @Rule
    @JvmField
    val testSetupRule = Utils.testSetupRule(NavBar.MODE_GESTURAL, rotation)

    @Before
    fun setup() {
@@ -58,7 +62,11 @@ constructor(val rotation: Rotation = Rotation.ROTATION_0) {

    @Test
    open fun resizeAppWithCornerResize() {
        testApp.cornerResize(wmHelper, device, DesktopModeAppHelper.Corners.RIGHT_TOP, 50, -50)
        testApp.cornerResize(wmHelper,
            device,
            DesktopModeAppHelper.Corners.RIGHT_TOP,
            horizontalChange,
            verticalChange)
    }

    @After
Loading