Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 9ac4b580 authored by jayaprakashs's avatar jayaprakashs
Browse files

null check in showLableSuggestion().

It throws NPE when the data is missing for all the packages and all the suggestions are null.

Change-Id: I4aa36969e1aee00bcfc577a839d6da01d4e67a75
parent 6eebaab5
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -487,9 +487,9 @@ public class Folder extends AbstractFloatingView implements ClipPathView, DragSo
                nameInfos[0].getLabel())
                || nameInfos.length > 1 && nameInfos[1] != null && !isEmpty(
                nameInfos[1].getLabel());
        CharSequence firstLabel = nameInfos[0].getLabel();

        if (shouldOpen) {
            CharSequence firstLabel = nameInfos[0] == null ? "" : nameInfos[0].getLabel();
            if (!isEmpty(firstLabel)) {
                mFolderName.setHint("");
                mFolderName.setText(firstLabel);
+6 −0
Original line number Diff line number Diff line
@@ -80,4 +80,10 @@ public final class FolderNameInfo implements Parcelable {
    public int describeContents() {
        return 0;
    }

    @Override
    @NonNull
    public String toString() {
        return mLabel.toString() + ":" + mScore;
    }
}