Fix home button returning to now screen issue
b/27978139
Background: onSaveInstanceState assumes that state of the launcher
is being stored after screen is all binded. However, due to ActivityStack
bug in nyc, onCreate is called twice when the device is rotated while
the Launcher is in the background. The first onCreate fails because
our AndroidManifest is setup with nosensor field and hence doesn't support
Landscape. During this first onCreate, screen is not correctly bound
and incomplete workspace state is saved. This results in the second onCreate
to load wrong screen id.
Fix: While the workspace is still being bound, mSaveState is not reset,
which has the correct values. SaveInstance should use this state
instead of incomplete workspace state.
Change-Id: I5b80f584e55769b2a8ffa292f5daa4705c20086d
1 file changed