[TIMOB-1178] Android: Online check results in NPE
|Fix Version/s||Release 1.4.0|
There is a race condition where checking online state was can be called before the Activity used to get the ConnectionManager is available. Since a specific Context is not required to look up the service. Use the Application as the Context instead of the Activity.
- Don Thorp 2011-04-15
(from [cdda68078dd2fc441889acf10ce0967b6a974533]) [#1178 state:resolved] Use the Application object as the Context when retrieving the ConnectionManager. Have TiContext hold a reference to the application instead of querying it each time. http://github.com/appcelerator/titanium_mobile/commit/cdda68078dd2fc441889acf10ce0967b6a974533"> http://github.com/appcelerator/titanium_mobile/commit/cdda68078dd2f...