From 5462e88c0272d08773ac6cd16cce435c32d2d9bf Mon Sep 17 00:00:00 2001 From: "Philip P. Moltmann" Date: Wed, 20 Jan 2016 13:55:38 -0800 Subject: [PATCH] Treat empty strings similar to null-strings when composing the subtitle in the SelectPrinterActivity. Change-Id: Ia0ee353df56b2f835f1ac291dc69eb3747425e6b --- .../com/android/printspooler/ui/SelectPrinterActivity.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/PrintSpooler/src/com/android/printspooler/ui/SelectPrinterActivity.java b/packages/PrintSpooler/src/com/android/printspooler/ui/SelectPrinterActivity.java index 13105aa2eba0f..1aec2531e2ca0 100644 --- a/packages/PrintSpooler/src/com/android/printspooler/ui/SelectPrinterActivity.java +++ b/packages/PrintSpooler/src/com/android/printspooler/ui/SelectPrinterActivity.java @@ -635,9 +635,9 @@ public final class SelectPrinterActivity extends Activity { CharSequence description = printer.getDescription(); CharSequence subtitle; - if (printServiceLabel == null) { + if (TextUtils.isEmpty(printServiceLabel)) { subtitle = description; - } else if (description == null) { + } else if (TextUtils.isEmpty(description)) { subtitle = printServiceLabel; } else { subtitle = getString(R.string.printer_extended_description_template,