Loading services/core/java/com/android/server/wm/WindowAnimator.java +36 −12 Original line number Diff line number Diff line Loading @@ -27,8 +27,11 @@ import static com.android.server.wm.WindowManagerService.LayoutFields.SET_ORIENT import static com.android.server.wm.WindowManagerService.LayoutFields.SET_WALLPAPER_ACTION_PENDING; import android.content.Context; import android.database.ContentObserver; import android.os.Debug; import android.os.Handler; import android.os.SystemClock; import android.provider.Settings; import android.util.Log; import android.util.Slog; import android.util.SparseArray; Loading @@ -53,7 +56,7 @@ public class WindowAnimator { private static final String TAG = "WindowAnimator"; /** How long to give statusbar to clear the private keyguard flag when animating out */ private static final long KEYGUARD_ANIM_TIMEOUT_MS = 0; //1000; private static long KEYGUARD_ANIM_TIMEOUT_MS = 1000; final WindowManagerService mService; final Context mContext; Loading Loading @@ -91,6 +94,8 @@ public class WindowAnimator { boolean mKeyguardGoingAwayToNotificationShade; boolean mKeyguardGoingAwayDisableWindowAnimations; private boolean mKeyguardBlurEnabled; // forceHiding states. static final int KEYGUARD_NOT_SHOWN = 0; static final int KEYGUARD_ANIMATING_IN = 1; Loading Loading @@ -122,8 +127,25 @@ public class WindowAnimator { } } }; mKeyguardBlurSettingObserver.onChange(true); mContext.getContentResolver().registerContentObserver( Settings.System.getUriFor(Settings.System.BLUR_EFFECT_LOCKSCREEN), false, mKeyguardBlurSettingObserver); } private ContentObserver mKeyguardBlurSettingObserver = new ContentObserver(new Handler()) { @Override public void onChange(boolean selfChange) { mKeyguardBlurEnabled = 1 == Settings.System.getInt( mContext.getContentResolver(), Settings.System.BLUR_EFFECT_LOCKSCREEN, 0); if (mKeyguardBlurEnabled) { KEYGUARD_ANIM_TIMEOUT_MS = 0; } else { KEYGUARD_ANIM_TIMEOUT_MS = 1000; } } }; void addDisplayLocked(final int displayId) { // Create the DisplayContentsAnimator object by retrieving it. getDisplayContentsAnimatorLocked(displayId); Loading Loading @@ -300,9 +322,12 @@ public class WindowAnimator { mKeyguardGoingAway = false; } if (win.isReadyForDisplay()) { if (mKeyguardBlurEnabled) { /* * Top window keep the showing state.(don't hide.) * */ mForceHiding = KEYGUARD_NOT_SHOWN; } else { if (nowAnimating) { if (winAnimator.mAnimationIsEntrance) { mForceHiding = KEYGUARD_ANIMATING_IN; Loading @@ -312,8 +337,7 @@ public class WindowAnimator { } else { mForceHiding = win.isDrawnLw() ? KEYGUARD_SHOWN : KEYGUARD_NOT_SHOWN; } */ mForceHiding = KEYGUARD_NOT_SHOWN; } } if (WindowManagerService.DEBUG_VISIBILITY) Slog.v(TAG, "Force hide " + forceHidingToString() Loading Loading
services/core/java/com/android/server/wm/WindowAnimator.java +36 −12 Original line number Diff line number Diff line Loading @@ -27,8 +27,11 @@ import static com.android.server.wm.WindowManagerService.LayoutFields.SET_ORIENT import static com.android.server.wm.WindowManagerService.LayoutFields.SET_WALLPAPER_ACTION_PENDING; import android.content.Context; import android.database.ContentObserver; import android.os.Debug; import android.os.Handler; import android.os.SystemClock; import android.provider.Settings; import android.util.Log; import android.util.Slog; import android.util.SparseArray; Loading @@ -53,7 +56,7 @@ public class WindowAnimator { private static final String TAG = "WindowAnimator"; /** How long to give statusbar to clear the private keyguard flag when animating out */ private static final long KEYGUARD_ANIM_TIMEOUT_MS = 0; //1000; private static long KEYGUARD_ANIM_TIMEOUT_MS = 1000; final WindowManagerService mService; final Context mContext; Loading Loading @@ -91,6 +94,8 @@ public class WindowAnimator { boolean mKeyguardGoingAwayToNotificationShade; boolean mKeyguardGoingAwayDisableWindowAnimations; private boolean mKeyguardBlurEnabled; // forceHiding states. static final int KEYGUARD_NOT_SHOWN = 0; static final int KEYGUARD_ANIMATING_IN = 1; Loading Loading @@ -122,8 +127,25 @@ public class WindowAnimator { } } }; mKeyguardBlurSettingObserver.onChange(true); mContext.getContentResolver().registerContentObserver( Settings.System.getUriFor(Settings.System.BLUR_EFFECT_LOCKSCREEN), false, mKeyguardBlurSettingObserver); } private ContentObserver mKeyguardBlurSettingObserver = new ContentObserver(new Handler()) { @Override public void onChange(boolean selfChange) { mKeyguardBlurEnabled = 1 == Settings.System.getInt( mContext.getContentResolver(), Settings.System.BLUR_EFFECT_LOCKSCREEN, 0); if (mKeyguardBlurEnabled) { KEYGUARD_ANIM_TIMEOUT_MS = 0; } else { KEYGUARD_ANIM_TIMEOUT_MS = 1000; } } }; void addDisplayLocked(final int displayId) { // Create the DisplayContentsAnimator object by retrieving it. getDisplayContentsAnimatorLocked(displayId); Loading Loading @@ -300,9 +322,12 @@ public class WindowAnimator { mKeyguardGoingAway = false; } if (win.isReadyForDisplay()) { if (mKeyguardBlurEnabled) { /* * Top window keep the showing state.(don't hide.) * */ mForceHiding = KEYGUARD_NOT_SHOWN; } else { if (nowAnimating) { if (winAnimator.mAnimationIsEntrance) { mForceHiding = KEYGUARD_ANIMATING_IN; Loading @@ -312,8 +337,7 @@ public class WindowAnimator { } else { mForceHiding = win.isDrawnLw() ? KEYGUARD_SHOWN : KEYGUARD_NOT_SHOWN; } */ mForceHiding = KEYGUARD_NOT_SHOWN; } } if (WindowManagerService.DEBUG_VISIBILITY) Slog.v(TAG, "Force hide " + forceHidingToString() Loading