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

Commit df2c5854 authored by Ben Reich's avatar Ben Reich
Browse files

Fix crash when pasting on a root in the sidebar

When the right click menu "Paste into folder" is clicked from a root
in the sidebar, it causes a crash. This is due to the DocumentStack
being artificially created and the root and stack containing the same
information. When the paste happens a new DocumentInfo is attempted
to be merged with the existing one and these are identical which is
what causes the crash.

Fortunately this is not a truly necessary operation and is causing
an extra copy of the DocumentStack to be created. Let's optimise and
avoid recreating if we don't truly have to. Furthermore this adds a
test that fails without the patch and succeeds with the patch.

Fix: 403641008
Test: atest com.android.documentsui.SidebarUiTest
Flag: EXEMPT bug fix

Change-Id: If4e49b4dd1e118b9e3a1fdaa590e663f41b05941
parent 0aa96f91
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment