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

Commit f3438492 authored by Aditya's avatar Aditya
Browse files

Make `canInteractWith` return true for context user.

This behavior had changed on setting the private space true, causing
several Ui test to fail.

Bug: 339100785
Test: atest DocumentsUIGoogleTests
Change-Id: I55e79bf8ac052d13fd60fd12f2385c2620c09ffb
parent b9401d01
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -108,6 +108,9 @@ public class State implements android.os.Parcelable {
     */
    public boolean canInteractWith(UserId userId) {
        if (configStore.isPrivateSpaceInDocsUIEnabled()) {
            if (canForwardToProfileIdMap.isEmpty() && UserId.CURRENT_USER.equals(userId)) {
                return true;
            }
            return canForwardToProfileIdMap.getOrDefault(userId, false);
        }
        return canShareAcrossProfile || UserId.CURRENT_USER.equals(userId);
+1 −0
Original line number Diff line number Diff line
@@ -461,6 +461,7 @@ public class UserItemsCombinerTest {
            rootListAllUsers.add(PRIVATE_ITEMS);
        }
        mCombiner = new UserItemsCombiner(mResources, mDpm, mState)
                .overrideCurrentUserForTest(WORK_USER)
                .setRootListForAllUsers(rootListAllUsers);

        assertThat(mCombiner.createPresentableListForAllUsers(mUserIds, mUserIdToLabelMap))