Phone rebooted when trying to select problematic WiFi network

b/24515222

Change-Id: Id18dcbdae97ad6a5fb22dfd8e9cf7c117a3bffa9
diff --git a/service/java/com/android/server/wifi/WifiConfigStore.java b/service/java/com/android/server/wifi/WifiConfigStore.java
index 652899e..6a7075e 100644
--- a/service/java/com/android/server/wifi/WifiConfigStore.java
+++ b/service/java/com/android/server/wifi/WifiConfigStore.java
@@ -1311,7 +1311,7 @@
             // Sort by descending priority
             Collections.sort(sortedWifiConfigurations, new Comparator<WifiConfiguration>() {
                 public int compare(WifiConfiguration a, WifiConfiguration b) {
-                    return a.priority >= b.priority ? 1 : -1;
+                    return a.priority - b.priority;
                 }
             });
         }