Note that this does not convert any widgets what were bound when
a different global search app was installed. Thus Froyo -> Froyo
upgrades without userdata wipe will see "Problem loading widget".
Workaround: Remove the search widget and add a new one.
Change-Id: I2bcd211c10bbaba66f5f3f82b6785396d957aa25
It looks like the evil hack in 14f122bf84 to make the workspace
not animate didn't completely work. The key to reproducing this bug is to make sure the
activity is destroyed and to have last gone to an app from a screen other than the center
screen, because that causes it to get reloaded from the icicle, which makes the timing
more amenable to missing the animation, because the view isn't attached yet.
It looks like the evil hack in 14f122bf84 to make the workspace
not animate didn't completely work. The key to reproducing this bug is to make sure the
activity is destroyed and to have last gone to an app from a screen other than the center
screen, because that causes it to get reloaded from the icicle, which makes the timing
more amenable to missing the animation, because the view isn't attached yet.
Before, Launcher2 sent an intent to
com.android.settings/com.android.settings.LauncherAppWidgetBinder
to bind any converted appwidgets. That doesn't seem to work anymore,
and is not how non-converted widgets are bound. Changing to
binding the widgets directly fixes a problem where the search
widget was not bound after an upgrade from Eclair to Master.
The search widget conversion problem was introduced in
Change I85d64defe155c0cad97fafef6a3db62c6cab504a
where I got rid of the built-in search widget.
This patch may break conversion of legacy built-in
clock and photo widgets, but I believe that was already broken
because of the non-functional widget binding mechanism.
Bug: http://b/2322160
Merge commit '3ecbd81f99d2005172f431d2bf207b698154fe29' into eclair-mr2
* commit '3ecbd81f99d2005172f431d2bf207b698154fe29':
Still trying to fix 2320348 - Launcher2 crashed: AIOOBE at com.android.launcher2.AllAppsView$RolloRS.removeApp
Merge commit '8cf34293dc2f078bf023ac77d007f5182f9b9357' into eclair-mr2
* commit '8cf34293dc2f078bf023ac77d007f5182f9b9357':
Launcher2 - This might fix the missing app problem and the crash in removeApp.
This marks the apps list as dirty by default. Usually, because of how long
it takes the loader thread to run, the apps list comes in after the surface
has been initialized. However, if the surface isn't around yet when setApps
is called, then setApps won't set mRollo.mAppsDirty because mRollo is null.
The extra null check is necessary for the normal case when mAllAppsList isn't
ready yet when the surface comes in.
Merge commit '8eea3914a012eec703b5c7829361bbc6e356dc66' into eclair-mr2
* commit '8eea3914a012eec703b5c7829361bbc6e356dc66':
fix 2315821 and 2315729 - problems caused because the apps list could become
Merge commit 'af5b4cb27709e2e3d6c419e81ac87363e701ce5d' into eclair-mr2
* commit 'af5b4cb27709e2e3d6c419e81ac87363e701ce5d':
Fix 2305903 Scrolling trackball upwards at the top of the app menu selects app at the bottom left
Merge commit 'a276fc59f535a2fb05701e8f49bb7adf4cefb3b2' into eclair-mr2
* commit 'a276fc59f535a2fb05701e8f49bb7adf4cefb3b2':
Fix 2306862 - Launcher2 crashed: in libs/rs. Uploading texture without a context.
Before, Launcher relied on a callback to a SearchManager.OnCancelListener to clear the search widget
animation. However, that doesn't get called if some other app opens the search dialog
before the Launcher is reopened. This change clears the animation in onResume().
Should fix http://b/issue?id=2246760
Sometimes clearAnimation() is called on the search widget
when it has no parent, e.g. when it being removed from the
home screen. This caused an NPE, because clearAnimation()
called invalidate() on the parent.
This is a partial fix for: http://b/issue?id=2246760
Activity#showDialog on CreateShortcut
I'm not sure how this can happen, but I think it's okay to just
drop the exception. It's all just trying to clean up anyway.
Now:
- When you're on the workspace and you press home, it animates back to the middle
- When you're in all apps and you press home, all apps animates out and the workspace
doesn't animate to the middle (it just jumps there)
- When you're in an app and you press home, it doesn't animate to the middle
- When you're in an app and you press back, it still goes to the page you were on.
Don't look at the evil hack to make it move without animating.