Sync account avatar still visible after disconnect/logout

RESOLVED FIXED in Firefox 52

Status

()

Firefox for Android
Firefox Accounts
P2
normal
RESOLVED FIXED
a year ago
a year ago

People

(Reporter: sebastian, Assigned: maliu)

Tracking

unspecified
Firefox 52
All
Android
Points:
---

Firefox Tracking Flags

(firefox52 fixed)

Details

(Whiteboard: [TPE-1])

MozReview Requests

()

Submitter Diff Changes Open Issues Last Updated
Loading...
Error loading review requests:

Attachments

(2 attachments)

(Reporter)

Description

a year ago
Created attachment 8804220 [details]
settings-logout.png

After selecting "disconnect" on the account settings page and returning to settings the avatar from the account is still visible (See screenshot). The next time I open settings the default avatar is shown again.
(Reporter)

Updated

a year ago
Whiteboard: [MobileAS] → [TPE-1]
(Assignee)

Updated

a year ago
Assignee: nobody → max
Comment hidden (mozreview-request)
(Reporter)

Comment 2

a year ago
mozreview-review
Comment on attachment 8807978 [details]
Bug 1312719 - Clear icon by setIcon with null drawable before setIcon with resId,

https://reviewboard.mozilla.org/r/90898/#review90876

::: mobile/android/base/java/org/mozilla/gecko/preferences/SyncPreference.java:58
(Diff revision 1)
> +                        // Bug 1312719 - IconDrawable is prior to IconResId, drawable must be set null before setIcon(resId)
> +                        // http://androidxref.com/5.1.1_r6/xref/frameworks/base/core/java/android/preference/Preference.java#102
> +                        setIcon(null);
>                          setIcon(R.drawable.sync_avatar_default);

This is weird - but it works. Do you know why? Doesn't setIcon(int) call setIcon(Drawable)?
Attachment #8807978 - Flags: review?(s.kaspari) → review+
(Assignee)

Comment 3

a year ago
Because in bindView, iconRes will take effect only when iconDrawable is null.

Maybe I should update the link to following line?
http://androidxref.com/5.1.1_r6/xref/frameworks/base/core/java/android/preference/Preference.java#562
Flags: needinfo?(s.kaspari)
Comment hidden (mozreview-request)
(Reporter)

Comment 5

a year ago
(In reply to Max Liu [:maliu] from comment #3)
> Because in bindView, iconRes will take effect only when iconDrawable is null.
> 
> Maybe I should update the link to following line?
> http://androidxref.com/5.1.1_r6/xref/frameworks/base/core/java/android/
> preference/Preference.java#562

Yeah, and/or add a comment mentioning that the new icon resource will only be loaded if no icon is set.

As this patch is already reviewed: Just add the 'checkin-needed' keyword to the bug and a sheriff will land the patch. :)
Flags: needinfo?(s.kaspari)
(Assignee)

Updated

a year ago
Keywords: checkin-needed

Comment 6

a year ago
Pushed by cbook@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/a14ca8dbcc4b
Clear icon by setIcon with null drawable before setIcon with resId, r=sebastian
Keywords: checkin-needed

Comment 7

a year ago
bugherder
https://hg.mozilla.org/mozilla-central/rev/a14ca8dbcc4b
Status: NEW → RESOLVED
Last Resolved: a year ago
status-firefox52: --- → fixed
Resolution: --- → FIXED
Target Milestone: --- → Firefox 52
You need to log in before you can comment on or make changes to this bug.