Skip to content
This repository has been archived by the owner on Jan 12, 2023. It is now read-only.

Changed download dialog from Fragment to Dialog with callback #973

Closed
wants to merge 1 commit into from

Conversation

ekager
Copy link
Contributor

@ekager ekager commented Jul 18, 2017

Changed implementation in response to (#970)

@ekager ekager requested a review from pocmo July 18, 2017 00:52
@ekager ekager force-pushed the download_dialog branch from 864ec31 to daac545 Compare July 18, 2017 00:56
@pocmo
Copy link
Contributor

pocmo commented Jul 18, 2017

The problem I see with using a dialog without a DialogFragment is that Android won't restore the dialog if the activity is getting destroyed while in the background (e.g. test with "don't keep activities" developer setting). Instead the dialog will disappear and Android will log a message that we leaked the previous view:

android.view.WindowLeaked: Activity org.mozilla.focus.activity.MainActivity has leaked window DecorView@b3a9ac6[] that was originally added here [..]

In addition I'm hesitant about merging this patch now that we have almost no time left to send this to our beta testers.

I've been playing today with showing the fragment from onResume() instead of onRequestPermissionsResult(). See PR #974. It seems to work. But I haven't tested it thoroughly yet. What do you think?

@ekager
Copy link
Contributor Author

ekager commented Jul 18, 2017 via email

@ekager ekager closed this Jul 18, 2017
@ekager ekager deleted the download_dialog branch June 4, 2018 18:42
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants