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

Commit 2aac7dab authored by Steve McKay's avatar Steve McKay
Browse files

Remove vestigial directorKey code.

No longer used. Selection is now persisted in DirectoryFragment.

Change-Id: I0802bc5b7c07c44eba40cf4c0a8299c87946a32a
parent cfbc7abe
Loading
Loading
Loading
Loading
+2 −25
Original line number Diff line number Diff line
@@ -544,7 +544,6 @@ public final class MultiSelectManager {
        // selection must be tracked separately.
        private final Set<String> mSelection;
        private final Set<String> mProvisionalSelection;
        private String mDirectoryKey;

        public Selection() {
            mSelection = new HashSet<String>();
@@ -554,8 +553,7 @@ public final class MultiSelectManager {
        /**
         * Used by CREATOR.
         */
        private Selection(String directoryKey, Set<String> selection) {
            mDirectoryKey = directoryKey;
        private Selection(Set<String> selection) {
            mSelection = selection;
            mProvisionalSelection = new HashSet<String>();
        }
@@ -738,24 +736,6 @@ public final class MultiSelectManager {
                  mProvisionalSelection.equals(((Selection) that).mProvisionalSelection);
        }

        /**
         * Sets the state key for this selection, which allows us to match selections
         * to particular states (of DirectoryFragment). Basically this lets us avoid
         * loading a persisted selection in the wrong directory.
         */
        public void setDirectoryKey(String key) {
            mDirectoryKey = key;
        }

        /**
         * Sets the state key for this selection, which allows us to match selections
         * to particular states (of DirectoryFragment). Basically this lets us avoid
         * loading a persisted selection in the wrong directory.
         */
        public boolean hasDirectoryKey(String key) {
            return key.equals(mDirectoryKey);
        }

        @Override
        public int describeContents() {
            return 0;
@@ -763,7 +743,6 @@ public final class MultiSelectManager {

        @Override
        public void writeToParcel(Parcel dest, int flags) {
            dest.writeString(mDirectoryKey);
            dest.writeStringList(new ArrayList<>(mSelection));
            // We don't include provisional selection since it is
            // typically coupled to some other runtime state (like a band).
@@ -778,12 +757,10 @@ public final class MultiSelectManager {

            @Override
            public Selection createFromParcel(Parcel in, ClassLoader loader) {
                String directoryKey = in.readString();

                ArrayList<String> selected = new ArrayList<>();
                in.readStringList(selected);

                return new Selection(directoryKey, new HashSet<String>(selected));
                return new Selection(new HashSet<String>(selected));
            }

            @Override