Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(747)

Unified Diff: chrome/android/java/src/org/chromium/chrome/browser/ItemChooserDialog.java

Issue 1710443002: bluetooth: Add URLs for Web Bluetooth help links. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@my-origin
Patch Set: Moar comments Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/android/java/src/org/chromium/chrome/browser/ItemChooserDialog.java
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/ItemChooserDialog.java b/chrome/android/java/src/org/chromium/chrome/browser/ItemChooserDialog.java
index 9b54d371258947ccb3ceea81837c93ecc701b9a6..9857bf8bbc5ea4ebe16949273d2e7b3a450d1c46 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/ItemChooserDialog.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/ItemChooserDialog.java
@@ -75,25 +75,31 @@ public class ItemChooserDialog {
// The title at the top of the dialog.
public final SpannableString mTitle;
Ted C 2016/02/19 17:54:01 fwiw since these are all public, they shouldn't st
ortuno 2016/02/19 18:26:28 Thanks for pointing that out. I opened crbug.com/5
// The message to show while there are no results.
- public final String mSearching;
+ public final SpannableString mSearching;
// The message to show when no results were produced.
public final SpannableString mNoneFound;
// A status message to show above the button row after an item has
// been added and discovery is still ongoing.
public final SpannableString mStatusActive;
+ // A status message to show above the button row after discovery has
+ // stopped and no devices have been found.
+ public final SpannableString mStatusIdleNoneFound;
// A status message to show above the button row after an item has
// been added and discovery has stopped.
- public final SpannableString mStatusIdle;
+ public final SpannableString mStatusIdleSomeFound;
// The label for the positive button (e.g. Select/Pair).
public final String mPositiveButton;
- public ItemChooserLabels(SpannableString title, String searching, SpannableString noneFound,
- SpannableString statusActive, SpannableString statusIdle, String positiveButton) {
+ public ItemChooserLabels(SpannableString title, SpannableString searching,
+ SpannableString noneFound, SpannableString statusActive,
+ SpannableString statusIdleNoneFound, SpannableString statusIdleSomeFound,
+ String positiveButton) {
mTitle = title;
mSearching = searching;
mNoneFound = noneFound;
mStatusActive = statusActive;
- mStatusIdle = statusIdle;
+ mStatusIdleNoneFound = statusIdleNoneFound;
+ mStatusIdleSomeFound = statusIdleSomeFound;
mPositiveButton = positiveButton;
}
}
@@ -411,8 +417,9 @@ public class ItemChooserDialog {
mListView.setVisibility(View.VISIBLE);
break;
case DISCOVERY_IDLE:
- mStatus.setText(mLabels.mStatusIdle);
boolean showEmptyMessage = mItemAdapter.isEmpty();
+ mStatus.setText(showEmptyMessage ? mLabels.mStatusIdleNoneFound
+ : mLabels.mStatusIdleSomeFound);
Ted C 2016/02/19 17:54:01 should be 8 spaces from the start of the line. Pr
ortuno 2016/02/19 18:26:28 Done. I think. Can you check I got it right?
Ted C 2016/02/19 18:39:30 looks good
mEmptyMessage.setText(mLabels.mNoneFound);
mEmptyMessage.setVisibility(showEmptyMessage ? View.VISIBLE : View.GONE);
break;

Powered by Google App Engine
This is Rietveld 408576698