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

Commit 7dd9c235 authored by Steve McKay's avatar Steve McKay Committed by android-build-merger
Browse files

Use writeStringList for selection parceling.

am: 4f89b6c

* commit '4f89b6c6b876a240ec5440f62c854c5ded214f05':
  Use writeStringList for selection parceling.

Change-Id: I79cefa11490a1c9667be4f7fb13608302f00675e
parents 8ac6df21 6231723d
Loading
Loading
Loading
Loading
+9 −6
Original line number Diff line number Diff line
@@ -672,9 +672,9 @@ public final class MultiSelectManager {
        /**
         * Used by CREATOR.
         */
        private Selection(String directoryKey, List<String> selection) {
        private Selection(String directoryKey, Set<String> selection) {
            mDirectoryKey = directoryKey;
            mSelection = new HashSet<String>(selection);
            mSelection = selection;
            mProvisionalSelection = new HashSet<String>();
        }

@@ -887,7 +887,7 @@ public final class MultiSelectManager {

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

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

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

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

            @Override