mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-03-03 01:16:49 +00:00
Utilities.trim never returns null.
This fixes a crash loop I was seeing on my device and also
preemptively fixes similar NullPointerExceptions.
Bug: 213931730
Test: Manually verified crash loop stopped with this change.
Change-Id: I8d2fc8475d42ac60b7fdc9219421a8c9733c7b9f
(cherry picked from commit 56be73be80)
This commit is contained in:
@@ -35,6 +35,7 @@ import android.graphics.drawable.ColorDrawable;
|
||||
import android.graphics.drawable.Drawable;
|
||||
import android.icu.text.MessageFormat;
|
||||
import android.text.TextPaint;
|
||||
import android.text.TextUtils;
|
||||
import android.text.TextUtils.TruncateAt;
|
||||
import android.util.AttributeSet;
|
||||
import android.util.Property;
|
||||
@@ -785,7 +786,7 @@ public class BubbleTextView extends TextView implements ItemInfoUpdateReceiver,
|
||||
invalidate();
|
||||
}
|
||||
}
|
||||
if (itemInfo.contentDescription != null) {
|
||||
if (!TextUtils.isEmpty(itemInfo.contentDescription)) {
|
||||
if (itemInfo.isDisabled()) {
|
||||
setContentDescription(getContext().getString(R.string.disabled_app_label,
|
||||
itemInfo.contentDescription));
|
||||
|
||||
Reference in New Issue
Block a user