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

Commit 084e020f authored by Tyler Gunn's avatar Tyler Gunn
Browse files

Fix sorting issue during emergency call attempt.

Fix the integer overflow/underflow caused by sorting of duplicate
phoneaccounts during emergency call attempt.

Bug: 208267659
Test: Added unit test (see https://googleplex-android-review.git.corp.google.com/c/platform/packages/services/Telecomm/+/16372187)
Merged-In: I3529e4f86ba5690a8c2e72d6103a84c00bf3f358
Change-Id: I736edaa4dd26527f506ff1fa238c022894302db0
parent 094c1569
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -114,7 +114,7 @@ public final class TelephonyUtil {


                // Then by hashcode
                // Then by hashcode
                if (retval == 0) {
                if (retval == 0) {
                    retval = account1.hashCode() - account2.hashCode();
                    retval = Integer.compare(account1.hashCode(), account2.hashCode());
                }
                }
                return retval;
                return retval;
            }
            }