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

Commit fcff0b0a authored by Steve McKay's avatar Steve McKay
Browse files

Rename BandController. Make GridModel top level.

Renaming for consistency with GestureSelector.
Move GridModel to own file since it's a fairly large class.
No content changes save moving NOT_SET constant to GridModel.

Bug: 64847011
Test: Passing.
Change-Id: I9f5900ba65a61800c6c26ffe1fd0aded65e9f957
parent 12394524
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -133,7 +133,7 @@ public class Injector<T extends ActionHandler> {
     * Obtains action handler and resets it if necessary.
     *
     * @param contentLock the lock held by
     *            {@link com.android.documentsui.selection.addons.BandController} and
     *            {@link com.android.documentsui.selection.addons.BandSelector} and
     *            {@link com.android.documentsui.selection.addons.GestureSelector} to prevent loader
     *            from updating result during band/gesture selection. May be {@code null} if called
     *            from {@link com.android.documentsui.sidebar.RootsFragment}.
+3 −3
Original line number Diff line number Diff line
@@ -92,7 +92,7 @@ import com.android.documentsui.picker.PickActivity;
import com.android.documentsui.selection.Selection;
import com.android.documentsui.selection.SelectionManager;
import com.android.documentsui.selection.SelectionManager.SelectionPredicate;
import com.android.documentsui.selection.addons.BandController;
import com.android.documentsui.selection.addons.BandSelector;
import com.android.documentsui.selection.addons.ContentLock;
import com.android.documentsui.selection.addons.GestureSelector;
import com.android.documentsui.services.FileOperation;
@@ -159,7 +159,7 @@ public class DirectoryFragment extends Fragment implements SwipeRefreshLayout.On

    private SelectionMetadata mSelectionMetadata;
    private UserInputHandler<InputEvent> mInputHandler;
    private @Nullable BandController mBandController;
    private @Nullable BandSelector mBandController;
    private @Nullable DragHoverListener mDragHoverListener;
    private IconHelper mIconHelper;
    private SwipeRefreshLayout mRefreshLayout;
@@ -358,7 +358,7 @@ public class DirectoryFragment extends Fragment implements SwipeRefreshLayout.On
                GestureSelector.create(mSelectionMgr, mRecView, mContentLock);

        if (mState.allowMultiple) {
            mBandController = new BandController(
            mBandController = new BandSelector(
                    mRecView,
                    mAdapter,  // stableIds provider.
                    mSelectionMgr,
+3 −3
Original line number Diff line number Diff line
@@ -33,7 +33,7 @@ import com.android.documentsui.base.EventHandler;
import com.android.documentsui.base.Events;
import com.android.documentsui.base.Events.InputEvent;
import com.android.documentsui.base.Events.MotionInputEvent;
import com.android.documentsui.selection.addons.BandController;
import com.android.documentsui.selection.addons.BandSelector;
import com.android.documentsui.selection.addons.GestureSelector;
import com.android.documentsui.base.Features;

@@ -50,7 +50,7 @@ final class ListeningGestureDetector extends GestureDetector implements OnItemTo
    private final GestureSelector mGestureSelector;
    private final EventHandler<InputEvent> mMouseDragListener;
    private final BooleanConsumer mRefreshLayoutEnabler;
    private final BandController mBandController;
    private final BandSelector mBandController;
    private final MouseDelegate mMouseDelegate = new MouseDelegate();
    private final TouchDelegate mTouchDelegate = new TouchDelegate();

@@ -65,7 +65,7 @@ final class ListeningGestureDetector extends GestureDetector implements OnItemTo
            BooleanConsumer refreshLayoutEnabler,
            GestureSelector gestureSelector,
            UserInputHandler<? extends InputEvent> handler,
            @Nullable BandController bandController,
            @Nullable BandSelector bandController,
            Consumer<Float> scaleHandler) {

        super(context, handler);
+2 −2
Original line number Diff line number Diff line
@@ -24,7 +24,7 @@ import android.support.v7.widget.RecyclerView;
import android.support.v7.widget.RecyclerView.Adapter;
import android.util.Log;

import com.android.documentsui.selection.addons.BandController;
import com.android.documentsui.selection.addons.BandSelector;

import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
@@ -59,7 +59,7 @@ public final class DefaultSelectionManager implements SelectionManager {
     *  <p>E.g. BandController creates a provisional selection while a user is actively
     *  selecting items with the band. Provisionally selected items are considered to be
     *  selected in {@link Selection#contains(String)} and related methods. A provisional
     *  may be abandoned or applied by selection components (like {@link BandController}).
     *  may be abandoned or applied by selection components (like {@link BandSelector}).
     *
     *  <p>A provisional selection may intersect the primary selection, however clearing
     *  the provisional selection will not affect the primary selection where the two may
+493 −0

File changed and moved.

Preview size limit exceeded, changes collapsed.

Loading