Closed Bug 1027137 Opened 10 years ago Closed 10 years ago

PageActionLayout cleanup

Categories

(Firefox for Android Graveyard :: General, defect)

All
Android
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
Firefox 33

People

(Reporter: bnicholson, Assigned: bnicholson)

References

Details

Attachments

(1 file)

      No description provided.
Lots of miscellaneous style/formatting nits.
Attachment #8442550 - Flags: review?(wjohnston)
Blocks: 1011712
Comment on attachment 8442550 [details] [diff] [review]
PageActionLayout cleanup

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

::: mobile/android/base/toolbar/PageActionLayout.java
@@ +37,5 @@
>      private static final int DEFAULT_PAGE_ACTIONS_SHOWN = 2;
>  
> +    private final Context mContext;
> +    private final LinearLayout mLayout;
> +    private final ArrayList<PageAction> mPageActionList;

Make this a List.

@@ +134,5 @@
>          });
>      }
>  
>      private void removePageAction(String id) {
> +        for (int i = 0; i < mPageActionList.size(); i++) {

Flip this to an iterator.

@@ +193,5 @@
>  
>      private void refreshPageActionIcons() {
>          final Resources resources = mContext.getResources();
> +        for (int index = 0; index < this.getChildCount(); index++) {
> +            final ImageButton v = (ImageButton) this.getChildAt(index);

And flip this to use i instead of index.
Attachment #8442550 - Flags: review?(wjohnston) → review+
sorry had to backout this change in https://tbpl.mozilla.org/?tree=Fx-Team&rev=7e6ee365e01c since the first push caused a test failure like:

https://tbpl.mozilla.org/php/getParsedLog.php?id=43805525&tree=Fx-Team
https://hg.mozilla.org/mozilla-central/rev/6b76b46afe7a
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 33
Product: Firefox for Android → Firefox for Android Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: