Layout the config-changed window if it has surface

This patch fixes an issue which caused the resumed app to get the
wrong frame at first.

https://code.google.com/p/android/issues/detail?id=82242

Change-Id: I4483029326afca143e7921f3b9563da4f566d2e5
Fix racing condition of mTouchExcludeRegion

Copy region from DisplayContent.mTouchExcludeRegion instead of
directly refer to the same object of DisplayContent, and able to
protect it by lock of self class, don't have to lock out mWindowMap
on every tap.

This fix is to avoid racing condition of mTouchExcludeRegion.

Change-Id: I7401968167c2e539b4da2afe71e3020038fbfcbf
Signed-off-by: tingna_sung <tingna_sung@htc.com>
Prevent wrong system ui visibility callback after the user swipe

If we return vis without clearing clearable flags, it will be set to
IStatusBarService in updateSystemUiVisibilityLw(), and then be
callbacked to WMS via statusBarVisibilityChanged(), and then be
dispatched to the client; which is wrong because WMS should dispatch
the new value to the client, not the old one.

https://code.google.com/p/android/issues/detail?id=79991

Change-Id: I2a06d1fbe66e854e639d86a39784f8c6a3303674