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

Commit 5f755df0 authored by Aga Wronska's avatar Aga Wronska
Browse files

Add haptic feedback when entering ActionMode

Bug: 27357146
Change-Id: I3712a0b077dd8ac8d77a3ec561cc813a4c789cad
parent 952607ab
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -64,6 +64,7 @@ import android.util.TypedValue;
import android.view.ActionMode;
import android.view.DragEvent;
import android.view.GestureDetector;
import android.view.HapticFeedbackConstants;
import android.view.KeyEvent;
import android.view.LayoutInflater;
import android.view.Menu;
@@ -545,6 +546,8 @@ public class DirectoryFragment extends Fragment

        @Override
        public boolean onCreateActionMode(ActionMode mode, Menu menu) {
            mRecView.performHapticFeedback(HapticFeedbackConstants.LONG_PRESS);

            int size = mSelectionManager.getSelection().size();
            mode.getMenuInflater().inflate(R.menu.mode_directory, menu);
            mode.setTitle(TextUtils.formatSelectedCount(size));