AI 143776: am: CL 143622 Correctly startListening() for widget updates when first boot completes.
  During the first boot upgrade, LauncherProvider will deleteHost() to clear out any old appWidgetId bindings.  During the first boot, Launcher calls AppWidgetHost.startListening() to watch for widget updates.  It also calls loadUserItems(), which loads data from LauncherProvider, triggering the database creation and deleteHost() call.  Because deleteHost() removes any existing callbacks, any future widget updates are dropped on the floor.  (This can currently be solved by rebooting, because there isn't an upgrade on subsequent boots.)
  This bug was particularly evident on vfpioneer-userdebug builds, as there aren't any configuration changes that cause Launcher to be destroyed and recreated.  (When destroyed and recreated, we startListening() again, and LauncherProvider doesn't call deleteHost().)
  To handle this special case, Launcher creates a ContentObserver pointing at a specific URI, which the LauncherProvider notifies when the AppWidgetHost is reset through deleteHost(), allowing Launcher to correctly startListening() again.
  Original author: jsharkey
  Merged from: //branches/cupcake/...

Automated import of CL 143776
2 files changed
tree: 7611574f12e387e4ba48e0270f0e9dbafc0c8e96
  1. res/
  2. src/
  3. Android.mk
  4. AndroidManifest.xml
  5. MODULE_LICENSE_APACHE2
  6. NOTICE