Closed
Bug 1058852
Opened 10 years ago
Closed 10 years ago
Remove unused resources
Categories
(Firefox for Android Graveyard :: General, defect)
Tracking
(Not tracked)
RESOLVED
FIXED
Firefox 34
People
(Reporter: bnicholson, Assigned: bnicholson)
References
Details
Attachments
(2 files)
43.37 KB,
patch
|
rnewman
:
review+
|
Details | Diff | Splinter Review |
11.12 KB,
patch
|
rnewman
:
review+
|
Details | Diff | Splinter Review |
"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.
Assignee | ||
Comment 2•10 years ago
|
||
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)
Assignee | ||
Comment 3•10 years ago
|
||
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.
Assignee | ||
Updated•10 years ago
|
Assignee | ||
Comment 4•10 years ago
|
||
Only gives us another 4KB or so, but still good to remove cruft.
Attachment #8479364 -
Flags: review?(rnewman)
Assignee | ||
Updated•10 years ago
|
Summary: Remove unused drawables → Remove unused resources
Comment 5•10 years ago
|
||
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 6•10 years ago
|
||
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+
Assignee | ||
Comment 7•10 years ago
|
||
(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.
Assignee | ||
Comment 8•10 years ago
|
||
Backed both out in https://hg.mozilla.org/integration/fx-team/rev/aca5bff5dce5 for failing pretty much across the board on Android 2.3: https://tbpl.mozilla.org/?tree=Fx-Team&rev=512b16337fa9
Flags: needinfo?(bnicholson)
Comment 11•10 years ago
|
||
This also broke Autophone's webappstartup test.
Comment 12•10 years ago
|
||
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
Comment 13•10 years ago
|
||
Comment 14•10 years ago
|
||
That's a try push with scrollbar.png restored.
Comment 15•10 years ago
|
||
Try looks green to me, so I'll reland.
Comment 16•10 years ago
|
||
Comment 17•10 years ago
|
||
Flags: needinfo?(rnewman)
Flags: needinfo?(bnicholson)
Comment 18•10 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/6afb431e77e0
https://hg.mozilla.org/mozilla-central/rev/26170fba2c2b
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 34
Updated•4 years ago
|
Product: Firefox for Android → Firefox for Android Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•