Refactor CollectionUtils.contains for short

Keep the consistent style as CollectionUtils.contains for int because
the compiler already does the optimization.

Test: atest NetworkStaticLibTests
Change-Id: Ide49c3761c552e8e184889a2f8d9f1aa8a130d60
diff --git a/staticlibs/framework/com/android/net/module/util/CollectionUtils.java b/staticlibs/framework/com/android/net/module/util/CollectionUtils.java
index 9eb2c22..6e1af55 100644
--- a/staticlibs/framework/com/android/net/module/util/CollectionUtils.java
+++ b/staticlibs/framework/com/android/net/module/util/CollectionUtils.java
@@ -125,8 +125,8 @@
      */
     public static boolean contains(@Nullable short[] array, short value) {
         if (array == null) return false;
-        for (int i = 0; i < array.length; i++) {
-            if (array[i] == value) {
+        for (int element : array) {
+            if (element == value) {
                 return true;
             }
         }