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

Commit d1dea94f authored by Nate Myren's avatar Nate Myren
Browse files

Add null check to getAppContentDescription

Bug: 173798457
Test: atest LocationPermissionAppsFragmentTest
Change-Id: I547222211e99645443354bd262b6833990fc3792
parent d141faef
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -52,6 +52,9 @@ public class AppUtils {
    public static String getAppContentDescription(Context context, String packageName,
            int userId) {
        final CharSequence appLabel = getApplicationLabel(context.getPackageManager(), packageName);
        if (appLabel == null) {
            return "";
        }
        return context.getSystemService(UserManager.class).isManagedProfile(userId)
                ? context.getString(R.string.accessibility_work_profile_app_description, appLabel)
                : appLabel.toString();