Loading packages/Shell/res/values-watch/strings.xml 0 → 100644 +20 −0 Original line number Diff line number Diff line <?xml version="1.0" encoding="utf-8"?> <!-- Copyright (C) 2021 The Android Open Source Project Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. --> <resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> <!-- Title for Bug report notification indicating the number of the bug report and the percentage complete. Example: "Bug report #3 is 20% complete" [CHAR LIMIT=50] --> <string name="bugreport_in_progress_title">Bug report <xliff:g id="id" example="#3">#%1$d</xliff:g> is <xliff:g id="percentage" example="20%">%2$s</xliff:g> complete</string> </resources> packages/Shell/src/com/android/shell/BugreportProgressService.java +6 −4 Original line number Diff line number Diff line Loading @@ -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 = Loading Loading
packages/Shell/res/values-watch/strings.xml 0 → 100644 +20 −0 Original line number Diff line number Diff line <?xml version="1.0" encoding="utf-8"?> <!-- Copyright (C) 2021 The Android Open Source Project Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. --> <resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> <!-- Title for Bug report notification indicating the number of the bug report and the percentage complete. Example: "Bug report #3 is 20% complete" [CHAR LIMIT=50] --> <string name="bugreport_in_progress_title">Bug report <xliff:g id="id" example="#3">#%1$d</xliff:g> is <xliff:g id="percentage" example="20%">%2$s</xliff:g> complete</string> </resources>
packages/Shell/src/com/android/shell/BugreportProgressService.java +6 −4 Original line number Diff line number Diff line Loading @@ -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 = Loading