Add null check to getAppContentDescription
Bug: 173798457 Test: atest LocationPermissionAppsFragmentTest Change-Id: I547222211e99645443354bd262b6833990fc3792
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user