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

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

Merge cherrypicks of ['googleplex-android-review.googlesource.com/30960309'] into 25Q1-release.

Change-Id: I1e86c83fbdaf98758c4d014e79952d07b34e951c
parents 06195e27 0528b5e7
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -74,7 +74,7 @@ public class DragSession {
        mInitialDragData = data;
        mInitialDragFlags = dragFlags;
        displayLayout = dispLayout;
        hideDragSourceTaskId = data.getDescription().getExtras() != null
        hideDragSourceTaskId = data != null && data.getDescription().getExtras() != null
                ? data.getDescription().getExtras().getInt(EXTRA_HIDE_DRAG_SOURCE_TASK_ID, -1)
                : -1;
        ProtoLog.v(ShellProtoLogGroup.WM_SHELL_DRAG_AND_DROP,
+7 −0
Original line number Diff line number Diff line
@@ -58,6 +58,13 @@ class DragSessionTest : ShellTestCase() {
        MockitoAnnotations.initMocks(this)
    }

    @Test
    fun testNullClipData() {
        // Start a new drag session with null data
        val session = DragSession(activityTaskManager, displayLayout, null, 0)
        assertThat(session.hideDragSourceTaskId).isEqualTo(-1)
    }

    @Test
    fun testGetRunningTask() {
        // Set up running tasks