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

Commit 47e0d9e3 authored by Treehugger Robot's avatar Treehugger Robot Committed by Gerrit Code Review
Browse files

Merge "Keystore 2.0 SPI: Add forEach for int arrays to ArrayUtils"

parents b04ef452 cbab0d13
Loading
Loading
Loading
Loading
+14 −0
Original line number Original line Diff line number Diff line
@@ -18,6 +18,8 @@ package android.security.keystore;


import libcore.util.EmptyArray;
import libcore.util.EmptyArray;


import java.util.function.Consumer;

/**
/**
 * @hide
 * @hide
 */
 */
@@ -107,4 +109,16 @@ public abstract class ArrayUtils {
            return result;
            return result;
        }
        }
    }
    }

    /**
     * Runs {@code consumer.accept()} for each element of {@code array}.
     * @param array
     * @param consumer
     * @hide
     */
    public static void forEach(int[] array, Consumer<Integer> consumer) {
        for (int i : array) {
            consumer.accept(i);
        }
    }
}
}