onLocaleReady incorrectly elides onConfigurationChange call if urlBar doesn't exist

RESOLVED FIXED in Firefox 31

Status

()

RESOLVED FIXED
5 years ago
5 years ago

People

(Reporter: rnewman, Assigned: rnewman)

Tracking

(Blocks: 1 bug)

Trunk
Firefox 31
All
Android
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Assignee)

Description

5 years ago
// The URL bar hint needs to be populated.
       TextView urlBar = (TextView) findViewById(R.id.url_bar_title);
       if (urlBar == null) {
           return;
       }
       final String hint = getResources().getString(R.string.url_bar_default_text);
       urlBar.setHint(hint);

       // Allow onConfigurationChanged to take care of the rest.
       onConfigurationChanged(getResources().getConfiguration());

That early return is probably a little over-zealous.
(Assignee)

Updated

5 years ago
Blocks: 935025
(Assignee)

Comment 1

5 years ago
Created attachment 8407219 [details] [diff] [review]
onLocaleReady incorrectly elides onConfigurationChange call if urlBar doesn't exist. v1
Attachment #8407219 - Flags: review?(nalexander)
(Assignee)

Updated

5 years ago
Assignee: nobody → rnewman
Status: NEW → ASSIGNED
Comment on attachment 8407219 [details] [diff] [review]
onLocaleReady incorrectly elides onConfigurationChange call if urlBar doesn't exist. v1

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

A comment explaining that |onLocaleReady| is for strings, whilst |onConfigurationChanged| is for device changes (that might not require strings) in the method comments of each would be good.

Also, a log if urlBar doesn't exist?  I'm not sure how scared I should be that having urlBar in GeckoApp is not a hard requirement...
Attachment #8407219 - Flags: review?(nalexander) → review+
(Assignee)

Comment 3

5 years ago
https://hg.mozilla.org/integration/fx-team/rev/358d667d091b
Target Milestone: --- → Firefox 31
https://hg.mozilla.org/mozilla-central/rev/358d667d091b
Status: ASSIGNED → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.