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

Commit f33d0d7a authored by Tony Huang's avatar Tony Huang
Browse files

Only clear selection if select size larger than 0

Many crash bug is occured while clearSelection onDestroyActionMode.
By log pattern, selection change to 0 so it call action mode finish.
In this case, selection size is 0 so we should not call clearSelection
again.

Fix: 143999752
Fix: 144862372
Test: atest DocumentsUIGoogleTests
Change-Id: Ib50912e00dce62535e455dee431e142021ec7cba
parent e62906a3
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -122,7 +122,9 @@ public class ActionModeController extends SelectionObserver<String>
        mActionMode = null;
        mMenu = null;

        if (mSelected.size() > 0) {
            mSelectionMgr.clearSelection();
        }

        // Reset window title back to activity title, i.e. Root name
        mActivity.getWindow().setTitle(mActivity.getTitle());