From c58d756f877b6b63da28be67ac9d9d451721ec72 Mon Sep 17 00:00:00 2001 From: tiger_huang Date: Thu, 23 Oct 2014 20:24:19 +0800 Subject: [PATCH] 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 --- .../src/com/android/internal/policy/impl/PhoneWindowManager.java | 1 + 1 file changed, 1 insertion(+) diff --git a/policy/src/com/android/internal/policy/impl/PhoneWindowManager.java b/policy/src/com/android/internal/policy/impl/PhoneWindowManager.java index 07f549048bc8e..0dc66ba93d00f 100644 --- a/policy/src/com/android/internal/policy/impl/PhoneWindowManager.java +++ b/policy/src/com/android/internal/policy/impl/PhoneWindowManager.java @@ -5183,6 +5183,7 @@ public class PhoneWindowManager implements WindowManagerPolicy { if (denyTransientStatus || denyTransientNav) { // clear the clearable flags instead clearClearableFlagsLw(); + vis &= ~View.SYSTEM_UI_CLEARABLE_FLAGS; } vis = mStatusBarController.updateVisibilityLw(transientStatusBarAllowed, oldVis, vis);