commit | 2b21582fd364dce9c10e52fb7b00771ee0e11e9d | [log] [tgz] |
---|---|---|
author | Yiyi Shen <yiyishen@google.com> | Thu Sep 21 01:41:26 2023 +0000 |
committer | Android (Google) Code Review <android-gerrit@google.com> | Thu Sep 21 01:41:26 2023 +0000 |
tree | e9346686242831ab2aa04a3331c81abe6600ec97 | |
parent | ab64754c7c3d298155b627ecf27a0c97d8b785be [diff] | |
parent | 9a05a180fa8e1251154eed7cd5a005ea18bd9441 [diff] |
Merge "Quick fix: fix bug when using binary search," into main
diff --git a/src/com/android/settings/connecteddevice/fastpair/FastPairDevicePreferenceController.java b/src/com/android/settings/connecteddevice/fastpair/FastPairDevicePreferenceController.java index 47b2dae..6a5b6b9 100644 --- a/src/com/android/settings/connecteddevice/fastpair/FastPairDevicePreferenceController.java +++ b/src/com/android/settings/connecteddevice/fastpair/FastPairDevicePreferenceController.java
@@ -142,7 +142,7 @@ // The insertion point is defined as the point at which the key would be inserted into the // list: the index of the first element greater than the key, or list.size() if all elements // in the list are less than the specified key. - if (idx > 0) { + if (idx >= 0) { if (DEBUG) { Log.d(TAG, "onDeviceAdd receives duplicate preference. Ignore."); }