From c8e2b6092c0fbf87e71f81fd2cffbb29ff8d9039 Mon Sep 17 00:00:00 2001 From: Felipe Leme Date: Fri, 29 Jan 2016 13:55:35 -0800 Subject: Fixed check for empty title. Otherwise, if user entered "Details" but not "Summary", the ACTION_SEND_MULTIPLE subject would be empty. BUG: 26768595 Change-Id: I955ab5e8f05eba9fbfa6fe65eabb6a8a8e28c5b4 --- packages/Shell/src/com/android/shell/BugreportProgressService.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'packages/Shell/src') diff --git a/packages/Shell/src/com/android/shell/BugreportProgressService.java b/packages/Shell/src/com/android/shell/BugreportProgressService.java index 5cebdc2859bf..a93caca735a2 100644 --- a/packages/Shell/src/com/android/shell/BugreportProgressService.java +++ b/packages/Shell/src/com/android/shell/BugreportProgressService.java @@ -786,7 +786,8 @@ public class BugreportProgressService extends Service { intent.addCategory(Intent.CATEGORY_DEFAULT); intent.setType(mimeType); - final String subject = info.title != null ? info.title : bugreportUri.getLastPathSegment(); + final String subject = !TextUtils.isEmpty(info.title) ? + info.title : bugreportUri.getLastPathSegment(); intent.putExtra(Intent.EXTRA_SUBJECT, subject); // EXTRA_TEXT should be an ArrayList, but some clients are expecting a single String. -- cgit v1.2.3-59-g8ed1b