Merge "Fix flaky test error"
diff --git a/src/com/android/settings/bluetooth/BluetoothDevicePreference.java b/src/com/android/settings/bluetooth/BluetoothDevicePreference.java
index c56c50e..a8b1c97 100644
--- a/src/com/android/settings/bluetooth/BluetoothDevicePreference.java
+++ b/src/com/android/settings/bluetooth/BluetoothDevicePreference.java
@@ -221,7 +221,7 @@
return mCachedDevice
.compareTo(((BluetoothDevicePreference) another).mCachedDevice);
case SortType.TYPE_FIFO:
- return (int)(mCurrentTime - ((BluetoothDevicePreference) another).mCurrentTime);
+ return mCurrentTime > ((BluetoothDevicePreference) another).mCurrentTime ? 1 : -1;
default:
return super.compareTo(another);
}