Merge "Do not show a summary in Tail button preferences if no app found" into udc-qpr-dev

This commit is contained in:
Vania Januar
2023-07-19 14:57:54 +00:00
committed by Android (Google) Code Review
2 changed files with 15 additions and 1 deletions

View File

@@ -124,7 +124,7 @@ public class StylusDevicesController extends AbstractPreferenceController implem
try {
ApplicationInfo ai = pm.getApplicationInfo(packageName,
PackageManager.ApplicationInfoFlags.of(0));
appName = ai == null ? packageName : pm.getApplicationLabel(ai).toString();
appName = ai == null ? "" : pm.getApplicationLabel(ai).toString();
} catch (PackageManager.NameNotFoundException e) {
Log.e(TAG, "Notes role package not found.");
}