From f129859ee83fb1cce8a0549e216d57b5ddd602be Mon Sep 17 00:00:00 2001 From: Daniel Sandler Date: Thu, 18 Feb 2010 11:42:36 -0500 Subject: [PATCH] Suppress screen lock sound effect on first boot. Bug: 2453032 --- .../android/internal/policy/impl/KeyguardViewMediator.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/policy/com/android/internal/policy/impl/KeyguardViewMediator.java b/policy/com/android/internal/policy/impl/KeyguardViewMediator.java index c8e8cd47de080..f82d1a9064873 100644 --- a/policy/com/android/internal/policy/impl/KeyguardViewMediator.java +++ b/policy/com/android/internal/policy/impl/KeyguardViewMediator.java @@ -147,6 +147,7 @@ public class KeyguardViewMediator implements KeyguardViewCallback, private IBinder mSecureLockIcon = null; private boolean mSystemReady; + private boolean mFirstShow = true; /** Low level access to the power manager for enableUserActivity. Having this * requires that we run in the system process. */ @@ -946,7 +947,11 @@ public class KeyguardViewMediator implements KeyguardViewCallback, if (DEBUG) Log.d(TAG, "handleShow"); if (!mSystemReady) return; - playSounds(true); + if (mFirstShow) { + mFirstShow = false; + } else { + playSounds(true); + } mKeyguardViewManager.show(); mShowing = true;