[guardian-dev] Orbot v14.1.4: The Battle for the Background!
Nathan of Guardian
nathan at guardianproject.info
Mon Dec 1 11:19:23 EST 2014
On Mon, Dec 1, 2014, at 09:52 AM, Hans-Christoph Steiner wrote:
>
> I don't see the particular thing you're referencing in the Lifecycle
> page. One
> notable time when apps are killed without warning is during an upgrade or
> removal.
I think that "kill" actually means that, and not "shutdown politely",
for some reason.
>
> My understanding of the normal lifecycle is that Activities and Services
> are
> always shutdown using the whole sequence (onPause(), onStop(),
> onDestroy()
> etc.) before being killed. Maybe that's based on my wishful thinking.
Yes, it is :(
> One thing to help tracking low memory conditions is creating
> onTrimMemory()
> and onLowMemory() in an Application subclass. Android should call those
> when
> memory is getting low as the first step before killing things. That's
> how I
> understand it at least.
onTrimMemory() is really great actually, and I do think we can do a lot
more to respond to these across all of our apps:
https://gitweb.torproject.org/orbot.git/tree/src/org/torproject/android/service/TorService.java#n2419
More information about the Guardian-dev
mailing list