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
@@ -1106,7 +1106,7 @@ public class BubbleTextView extends TextView implements ItemInfoUpdateReceiver,
public void applyDotState(ItemInfo itemInfo, boolean animate) { public void applyDotState(ItemInfo itemInfo, boolean animate) {
if (mIcon instanceof FastBitmapDrawable) { if (mIcon != null) {
boolean wasDotted = mDotInfo != null; boolean wasDotted = mDotInfo != null;
mDotInfo = mActivity.getDotInfoForItem(itemInfo); mDotInfo = mActivity.getDotInfoForItem(itemInfo);
boolean isDotted = mDotInfo != null; boolean isDotted = mDotInfo != null;
+1 -1
View File
@@ -1750,7 +1750,7 @@ public class Workspace<T extends View & PageIndicator> extends PagedView<T>
} }
final DragView dv; final DragView dv;
if (contentView instanceof View) { if (contentView != null) {
dv = mDragController.startDrag( dv = mDragController.startDrag(
contentView, contentView,
draggableView, draggableView,
@@ -127,17 +127,17 @@ public class StringMatcherUtility {
if (query == null || target == null) { if (query == null || target == null) {
return false; return false;
} }
switch (mCollator.compare(query, target)) { int compare = mCollator.compare(query, target);
case 0: if (compare == 0) {
return true; return true;
case -1: } else if (compare < 0) {
// The target string can contain a modifier which would make it larger than // 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 // 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 // larger after appending a unicode character, it was originally a prefix of
// the target string and hence should match. // the target string and hence should match.
return mCollator.compare(query + MAX_UNICODE, target) > -1; return mCollator.compare(query + MAX_UNICODE, target) >= 0;
default: } else {
return false; return false;
} }
} }