summaryrefslogtreecommitdiff
path: root/packages/Shell/src
diff options
context:
space:
mode:
author Josh Yang <yzj@google.com> 2022-01-11 17:37:40 +0000
committer Android (Google) Code Review <android-gerrit@google.com> 2022-01-11 17:37:40 +0000
commit2e6243d9000e0e9ce47b1036a51e796a5f81240c (patch)
tree4a8feb254eac302c6c2c749f9c6b32d84e2a7368 /packages/Shell/src
parentf9965004c05e7018fd232d0e53b24b702bb3eaba (diff)
parentf55cffb820ad6fd88a9c05d81c56f0f3f335e187 (diff)
Merge "update bug report notification title"
Diffstat (limited to 'packages/Shell/src')
-rw-r--r--packages/Shell/src/com/android/shell/BugreportProgressService.java10
1 files changed, 6 insertions, 4 deletions
diff --git a/packages/Shell/src/com/android/shell/BugreportProgressService.java b/packages/Shell/src/com/android/shell/BugreportProgressService.java
index a08997f36530..c5a01a1c2b93 100644
--- a/packages/Shell/src/com/android/shell/BugreportProgressService.java
+++ b/packages/Shell/src/com/android/shell/BugreportProgressService.java
@@ -733,14 +733,16 @@ public class BugreportProgressService extends Service {
nf.setMaximumFractionDigits(2);
final String percentageText = nf.format((double) info.progress.intValue() / 100);
- String title = mContext.getString(R.string.bugreport_in_progress_title, info.id);
-
- // TODO: Remove this workaround when notification progress is implemented on Wear.
+ final String title;
if (mIsWatch) {
+ // TODO: Remove this workaround when notification progress is implemented on Wear.
nf.setMinimumFractionDigits(0);
nf.setMaximumFractionDigits(0);
final String watchPercentageText = nf.format((double) info.progress.intValue() / 100);
- title = title + "\n" + watchPercentageText;
+ title = mContext.getString(
+ R.string.bugreport_in_progress_title, info.id, watchPercentageText);
+ } else {
+ title = mContext.getString(R.string.bugreport_in_progress_title, info.id);
}
final String name =