Fix for mSavedStates being out of sync

mSavedStates contains the state that should be restored on resume. Apparently the method restoreInstanceStateForRemainingPages gets called without mSavedStates being up-to-date.
This problem leads in certain circumstances to widgets being restored to an old state, although newer data was displayed before. The issue is described in the following bug report:
https://code.google.com/p/android/issues/detail?id=42534
The problem can be reproduced on the latest Nexus factory images with the procedure described in the bug report (I'll update it with information about this fix later).
With this fix being submitted, the saved state will always be up-to-date and widgets will be restored correctly.

Change-Id: Ic8be85426116f7a27585cc22b8ee46f58a785925
Signed-off-by: Michael Diener <mdienersoftware@gmail.com>
Launcher: fix crash when call new LoaderTask thread's runBindSynchronousPage before old LoaderTask thread stopped.

when mIsLoaderTaskRunning is true it will raise up java.lang.RuntimeException.

Make sure mIsLoaderTaskRunning == false when new LoaderTask ready to run.
stopLoader() will be called everytime before startLoader() then it can
avoid java.lang.RuntimeExcepion.

Change-Id: I5d0ab5412d535cd910f5466ae47532fee6858e77
Author: Jun Wu <junx.wu@intel.com>
Signed-off-by: Jun Wu <junx.wu@intel.com>
Signed-off-by: Shuo Gao <shuo.gao@intel.com>
Signed-off-by: Bruce Beare <bruce.j.beare@intel.com>
Signed-off-by: Jack Ren <jack.ren@intel.com>
Author-tracking-BZ: 66274 67779
Launcher2: JAVECRASH about ‘com.android.launcher’ happens when long pressing allAppsButton and Hotseat at the same time.

Can't get the right shortcut view When long press allAppsButton in Hotseat.
	   It will cause itemUnderLongClick.getTag() = null, so we need to check it.

Change-Id: I88b2cb9af61f4b2197f423b222a1ac031bfc188b
Author: Jianchun Shen <jianchunx.shen@intel.com>
Signed-off-by: Jianchun Shen <jianchunx.shen@intel.com>
Signed-off-by: Shuo Gao <shuo.gao@intel.com>
Signed-off-by: Bruce Beare <bruce.j.beare@intel.com>
Signed-off-by: Jack Ren <jack.ren@intel.com>
Author-tracking-BZ: 45586
Launcher: Fix the Null point issue for mWorkspace

mWorkspace may have been destroyed when onAnimationEnd is called

Change-Id: I5df190a236bd591b9e363ca4bedb1460f4f83249
Author: Yong Yao <yong.yao@intel.com>
Signed-off-by: Yong Yao <yong.yao@intel.com>
Signed-off-by: Shuo Gao <shuo.gao@intel.com>
Signed-off-by: Bruce Beare <bruce.j.beare@intel.com>
Signed-off-by: Jack Ren <jack.ren@intel.com>
Author-tracking-BZ: 51436
Launcher: Avoid showing clings if no touchscreen

If the device has no touchscreen the clings are displayed indicating that
"To add an app to your Home screen, touch &amp; hold it.".
Furthermore, having no touchscreen is very difficult to get rid of the
clings because the focus remains on the Launcher.

Change-Id: I26182955fe3d44c51e82b140b5cc2ee3baacf6ca

Conflicts:

	src/com/android/launcher2/Launcher.java