Closed Bug 696311 Opened 11 years ago Closed 11 years ago

Show current url in awesomebar when you tap it.

Categories

(Firefox for Android Graveyard :: General, defect)

ARM
Android
defect
Not set
normal

Tracking

(Not tracked)

VERIFIED FIXED

People

(Reporter: wesj, Unassigned)

References

Details

Attachments

(1 file)

Attached patch Patch v1Splinter Review
We're calling the wrong method when you tap the awesomebar, so the current url isn't being filled in. This fixes that, and abstracts things a little bit to combine some duplicate code.
Attachment #568597 - Flags: review?(lucasr.at.mozilla)
Attachment #568597 - Attachment is patch: true
Whiteboard: [QA+]
Comment on attachment 568597 [details] [diff] [review]
Patch v1

Review of attachment 568597 [details] [diff] [review]:
-----------------------------------------------------------------

::: embedding/android/GeckoApp.java
@@ +954,5 @@
>          intent.addFlags(Intent.FLAG_ACTIVITY_NO_ANIMATION | Intent.FLAG_ACTIVITY_NO_HISTORY);
> +        intent.putExtra(AwesomeBar.TYPE_KEY, aType.name());
> +        // if we're adding a new tab, we don't want to show the old url
> +        if (aType != AwesomeBar.Type.ADD) {
> +            Tab tab = Tabs.getInstance().getSelectedTab();

Shouldn't the comment about new tabs actually be here?

@@ +956,5 @@
> +        // if we're adding a new tab, we don't want to show the old url
> +        if (aType != AwesomeBar.Type.ADD) {
> +            Tab tab = Tabs.getInstance().getSelectedTab();
> +            if (!tab.getHistory().empty()) {
> +                intent.putExtra(AwesomeBar.CURRENT_URL_KEY, tab.getHistory().peek().mUri);

This is a lot of chained calls :-) No big deal though.

@@ +962,2 @@
>          }
>          startActivityForResult(intent, AWESOMEBAR_REQUEST);

Not on your patch but I wonder why showAwesomebar returns a boolean if it always returns true.
Attachment #568597 - Flags: review?(lucasr.at.mozilla) → review+
Duplicate of this bug: 696929
All this is not needed. There is already a function taking care of this. I'll upload a new patch.
Sorry. This is a better patch. :)
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Mozilla/5.0 (Android; Linux armv7l; rv:10.0a1) Gecko/20111025 Firefox/10.0a1 Fennec/10.0a1
Status: RESOLVED → VERIFIED
OS: All → Android
Hardware: All → ARM
Whiteboard: [QA+]
Depends on: 732818
Product: Firefox for Android → Firefox for Android Graveyard
You need to log in before you can comment on or make changes to this bug.