[Android] Check context validity while browsing

Geoffrey Métais geoffrey.metais at gmail.com
Wed Jun 22 22:36:58 CEST 2016


No, we use the context to start the foreground task. It's checked at the
right time.

Le mer. 22 juin 2016 22:16, Thomas Guillem <thomas at gllm.fr> a écrit :

>
> On Wed, Jun 22, 2016, at 21:41, Geoffrey Métais wrote:
>
> #Android
>
> It's all callback based, you cannot know the state of your
> activity/fragment/service/whatever when you run a threaded task.
> Thus, behaviour is slightly different with some manufacturer.
> e.g. : With Samsung or custom roms, we commonly have such "impossible" bugs
>
>
> But why you don't check the context before running the background task ?
> It's not null here, it can't become null after
>
>
>
> On Wed, Jun 22, 2016 at 8:58 PM Jean-Baptiste Kempf <jb at videolan.org>
> wrote:
>
> On 22 Jun, Geoffrey Métais wrote :
> > -                if (mReadyToDisplay) {
> > +                if (mReadyToDisplay && context != null) {
>
> How can context be null here? o_O
>
> With my kindest regards,
>
> --
> Jean-Baptiste Kempf
> http://www.jbkempf.com/ - +33 672 704 734
> Sent from my Electronic Device
> _______________________________________________
> Android mailing list
> Android at videolan.org
> https://mailman.videolan.org/listinfo/android
>
> *_______________________________________________*
> Android mailing list
> Android at videolan.org
> https://mailman.videolan.org/listinfo/android
>
>
> _______________________________________________
> Android mailing list
> Android at videolan.org
> https://mailman.videolan.org/listinfo/android
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/android/attachments/20160622/0df7c85e/attachment.html>


More information about the Android mailing list