gecko-dev/mobile/android/base/webapp
Richard Newman a95ff1c7bb Bug 1123688 - Set BrowserDB factory in application startup, not only for GeckoApp subclasses. r=bnicholson
The issue: only by launching GeckoApp (or a subclass) did we specify what kind of DB we wanted. If we don't specify, we get a StubBrowserDB.

The search activity is not a GeckoApp, but it does implicitly access a profile.

The same is true for Sync: a background Sync would eventually cause the CP to touch GeckoProfile to get the profile directory.

Both of these avenues will poison the GeckoProfile cache, storing a profile with a database member that's a StubBrowserDB.

If you subsequently launched the browser you'd get that GeckoProfile instance from the profile cache. StubBrowserDB deliberately returns null for some queries -- such as getTopSites. That causes us to throw here.

The solution I chose: have *GeckoApplication* specify which kind of DB to use, and then have WebappImpl (the only subclass for which we want different behavior) override it.

GeckoView consumers remain unaffected, because they have their own Application class, and so the usual GeckoProfile fallback applies.
2015-01-22 20:23:38 -08:00
..
Allocator.java Bug 1041836: Delete redundant initialisers. (generated) r=rnewman 2014-07-25 20:14:47 -07:00
ApkResources.java bug 958358 - make webapp capitalisation consistent; r=wesj 2014-02-11 23:41:05 -08:00
Dispatcher.java Bug 929865 - Part 4: Move WebApps to webapp.Webapps; rename WebApp<n> to Webapp<n>. r=myk 2014-06-24 18:20:14 -07:00
EventListener.java Bug 1042383 - Part 2: use optimizable build-time flags for SDK-dependent code. r=mfinkle 2014-07-30 08:19:35 -07:00
InstallHelper.java Bug 1064644: Remove inner-access comments. r=rnewman 2014-09-08 18:11:51 -07:00
InstallListener.java Bug 1081597: Refactor some branches. r=rnewman 2014-10-12 01:41:42 +01:00
TaskKiller.java Bug 958709 - enable webapps to kill their tasks; r=mfinkle,mhaigh 2014-03-25 11:12:58 -07:00
UninstallListener.java Bug 1081582: Fix spelling. r=rnewman 2014-10-12 00:28:29 +01:00
WebappImpl.java Bug 1123688 - Set BrowserDB factory in application startup, not only for GeckoApp subclasses. r=bnicholson 2015-01-22 20:23:38 -08:00
Webapps.java Bug 929865 - Part 4: Move WebApps to webapp.Webapps; rename WebApp<n> to Webapp<n>. r=myk 2014-06-24 18:20:14 -07:00