Bug 1234967 - Post: Explain in which circumstances URLS can uniquely identify a bookmark r?rnewman
MozReview-Commit-ID: 4ToKmASvwmS
--- a/mobile/android/base/java/org/mozilla/gecko/BrowserApp.java
+++ b/mobile/android/base/java/org/mozilla/gecko/BrowserApp.java
@@ -1202,16 +1202,19 @@ public class BrowserApp extends GeckoApp
return;
}
if (itemId == 0) {
final String extrasId = res.getResourceEntryName(R.string.contextmenu_edit_bookmark);
Telemetry.sendUIEvent(TelemetryContract.Event.ACTION,
TelemetryContract.Method.DIALOG, extrasId);
+ // In this case we're allowed to use the bookmark URL (as opposed to id). We know the
+ // URL uniquely identifies the bookmark as it's just been created (the UI only lets us create
+ // a new bookmark if a given URL isn't bookmarked anywhere).
new EditBookmarkDialog(BrowserApp.this).show(tab.getURL());
} else if (itemId == 1) {
final String extrasId = res.getResourceEntryName(R.string.contextmenu_add_to_launcher);
Telemetry.sendUIEvent(TelemetryContract.Event.ACTION,
TelemetryContract.Method.DIALOG, extrasId);
final String url = tab.getURL();
final String title = tab.getDisplayTitle();