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

Commit 07c00b75 authored by Rhed Jao's avatar Rhed Jao Committed by Android (Google) Code Review
Browse files

Merge "Apply a maximum char count to the load label api"

parents b5ea0204 b02bae5d
Loading
Loading
Loading
Loading
+3 −1
Original line number Original line Diff line number Diff line
@@ -207,7 +207,9 @@ public class PackageItemInfo {
            return loadSafeLabel(pm, DEFAULT_MAX_LABEL_SIZE_PX, SAFE_STRING_FLAG_TRIM
            return loadSafeLabel(pm, DEFAULT_MAX_LABEL_SIZE_PX, SAFE_STRING_FLAG_TRIM
                    | SAFE_STRING_FLAG_FIRST_LINE);
                    | SAFE_STRING_FLAG_FIRST_LINE);
        } else {
        } else {
            return loadUnsafeLabel(pm);
            // Trims the label string to the MAX_SAFE_LABEL_LENGTH. This is to prevent that the
            // system is overwhelmed by an enormous string returned by the application.
            return TextUtils.trimToSize(loadUnsafeLabel(pm), MAX_SAFE_LABEL_LENGTH);
        }
        }
    }
    }