Closed Bug 1311842 Opened 3 years ago Closed 3 years ago

Share icon not rendered in link long-press context menu on Android 4

Categories

(Firefox for Android :: General, defect, P1)

defect

Tracking

()

RESOLVED FIXED
Firefox 52
Iteration:
1.8
Tracking Status
firefox52 --- fixed

People

(Reporter: ahunt, Assigned: ahunt)

Details

(Whiteboard: [MobileAS])

Attachments

(2 files)

The "share" icon is not rendered on Android 4, but is visible as usual on Android 7 (I haven't tested 5 and 6 yet).

Nightly 52.0.a1 2016-10-20 is affected.
Aurora 51.0.a1 2016-10-20 is not affected.

STR (from clean profile):
1. open any page, e.g. http://mozilla.org
2. long press on any link, menu appears, select "Share >"
3. select any of the available items
4. return to fennec
5. long press on any link, menu appears

Expected: the top row of the menu contains a share icon on the left, and the icon of the item selected in (3) on the right.
Actual: empty space on the left (is still clickable, but the icon isn't rendered), normal icon from (3) does appear on the right. [See screenshot]

Devices tested:
Nexus 4, Android 4.4.4: affected
Nexus 6P, Android 7: not affected
Taking this since I'm likely to be replacing some icons as part of Bug 1300144, including the share icon, and I specifically need to test that these new icons work on Android 4 (the new icons are VectorDrawable's, with only partial support on Android 4, hence the need for detailed testing).
Assignee: nobody → ahunt
Priority: -- → P1
Whiteboard: [MobileAS]
Iteration: --- → 1.7
Not using DrawableUtil.tintDrawableWithStateList() at https://dxr.mozilla.org/mozilla-central/source/mobile/android/base/java/org/mozilla/gecko/widget/themed/ThemedImageButton.java#188 seems to result in an icon being shown again. That makes me wonder whether the support library upgrade in Bug 1267884 is the cause of this bug.
The following Android bug suggested that something has changed in DrawableCompat's bounds-handling behaviour between 23.2.0 and 23.3, which was included in our upgrade to 23.4. I've got a patch which works, but I'm not sure I understand what exactly has changed yet.

We'll probably want to make the bounds fiddling dependent on being on Android 4, and I also need to test Android 5/6 to verify which versions this actually happens on.
Status: NEW → ASSIGNED
I've found that this bug actually affects Android 5 (in addition to 4), but not 6 or 7.

I thought that this might be related to the following Android bug, but none of the fixes there are helping, so maybe not:
https://code.google.com/p/android/issues/detail?id=172067
Comment on attachment 8803170 [details]
Bug 1311842 - Manually set intrinsic bounds on DrawableCompat to ensure visibility

https://reviewboard.mozilla.org/r/87416/#review87272
Attachment #8803170 - Flags: review?(s.kaspari) → review+
Pushed by ahunt@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/9274f4f0ebdc
Manually set intrinsic bounds on DrawableCompat to ensure visibility r=sebastian
https://hg.mozilla.org/mozilla-central/rev/9274f4f0ebdc
Status: ASSIGNED → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 52
Iteration: 1.7 → 1.8
You need to log in before you can comment on or make changes to this bug.