Merge "Fix errorprone warnings" into main

This commit is contained in:
Treehugger Robot
2025-01-28 18:56:53 -08:00
committed by Gerrit Code Review
3 changed files with 13 additions and 13 deletions

View File

@@ -1106,7 +1106,7 @@ public class BubbleTextView extends TextView implements ItemInfoUpdateReceiver,
public void applyDotState(ItemInfo itemInfo, boolean animate) {
if (mIcon instanceof FastBitmapDrawable) {
if (mIcon != null) {
boolean wasDotted = mDotInfo != null;
mDotInfo = mActivity.getDotInfoForItem(itemInfo);
boolean isDotted = mDotInfo != null;

View File

@@ -1750,7 +1750,7 @@ public class Workspace<T extends View & PageIndicator> extends PagedView<T>
}
final DragView dv;
if (contentView instanceof View) {
if (contentView != null) {
dv = mDragController.startDrag(
contentView,
draggableView,

View File

@@ -127,17 +127,17 @@ public class StringMatcherUtility {
if (query == null || target == null) {
return false;
}
switch (mCollator.compare(query, target)) {
case 0:
return true;
case -1:
// The target string can contain a modifier which would make it larger than
// the query string (even though the length is same). If the query becomes
// larger after appending a unicode character, it was originally a prefix of
// the target string and hence should match.
return mCollator.compare(query + MAX_UNICODE, target) > -1;
default:
return false;
int compare = mCollator.compare(query, target);
if (compare == 0) {
return true;
} else if (compare < 0) {
// The target string can contain a modifier which would make it larger than
// the query string (even though the length is same). If the query becomes
// larger after appending a unicode character, it was originally a prefix of
// the target string and hence should match.
return mCollator.compare(query + MAX_UNICODE, target) >= 0;
} else {
return false;
}
}