OSDN Git Service

Suppress screen lock sound effect on first boot.
authorDaniel Sandler <dsandler@google.com>
Thu, 18 Feb 2010 16:42:36 +0000 (11:42 -0500)
committerDaniel Sandler <dsandler@google.com>
Thu, 18 Feb 2010 16:42:36 +0000 (11:42 -0500)
Bug: 2453032

phone/com/android/internal/policy/impl/KeyguardViewMediator.java

index c8e8cd4..f82d1a9 100644 (file)
@@ -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;