Closed Bug 1058852 Opened 10 years ago Closed 10 years ago

Remove unused resources

Categories

(Firefox for Android Graveyard :: General, defect)

All
Android
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
Firefox 34

People

(Reporter: bnicholson, Assigned: bnicholson)

References

Details

Attachments

(2 files)

"lint --check UnusedResources android_eclipse" reports a number of unused drawables. Several of these are in fact referenced from JS via drawable:// URIs, but some are not in the tree at all. We should remove them.
Got a list? Also yaaaaaaayyyyyy.
Status: NEW → ASSIGNED
Approach used: 1) MXR for filename without extension. 2) If no results, MXR for prefixes of that name (e.g., "suggestedsites_fxaddons" shows no results, but "suggestedsites_" shows that these names are dynamically referenced). 3) If no results, delete it. This ends up saving ~40KB in the APK.
Attachment #8479334 - Flags: review?(rnewman)
Candidates here: https://pastebin.mozilla.org/6166359 I looked only for drawables for this patch. There are probably other XML resources that could be purged.
Blocks: fatfennec
No longer blocks: 1042363
Only gives us another 4KB or so, but still good to remove cruft.
Attachment #8479364 - Flags: review?(rnewman)
Summary: Remove unused drawables → Remove unused resources
Comment on attachment 8479364 [details] [diff] [review] Remove unused layouts Review of attachment 8479364 [details] [diff] [review]: ----------------------------------------------------------------- r+ if the FxA status activity still works after this! ::: mobile/android/base/resources/layout/fxaccount_status.xml @@ -1,5 @@ > -<?xml version="1.0" encoding="utf-8"?> > -<!-- > - This Source Code Form is subject to the terms of the Mozilla Public > - - License, v. 2.0. If a copy of the MPL was not distributed with this > - - file, You can obtain one at http://mozilla.org/MPL/2.0/. Err: wc -l mobile/android/base/resources/layout/fxaccount_status.xml 118 I'm puzzled why this file is empty in your tree.
Attachment #8479364 - Flags: review?(rnewman) → review+
Comment on attachment 8479334 [details] [diff] [review] Remove unused drawables Review of attachment 8479334 [details] [diff] [review]: ----------------------------------------------------------------- fxaccount* ones need to be upstreamed when you land this. I can take care of that. \o/
Attachment #8479334 - Flags: review?(rnewman) → review+
(In reply to Richard Newman [:rnewman] from comment #5) > Err: > > wc -l mobile/android/base/resources/layout/fxaccount_status.xml > 118 > > I'm puzzled why this file is empty in your tree. It's not -- check the raw diff :) Looks like a bug with splinter review.
ni me for upstreaming.
Flags: needinfo?(rnewman)
This also broke Autophone's webappstartup test.
Bitmap getScrollbarImage() { return getDrawable("scrollbar"); } Guess scrollbar.png was needed… And this might indicate some kind of incremental build issue: 16:52:42 INFO - 08-26 16:46:24.515 W/ResourceType( 418): No package identifier when getting value for resource number 0x00000000
That's a try push with scrollbar.png restored.
Try looks green to me, so I'll reland.
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 34
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: