diff --git a/src/com/android/phone/CallNotifier.java b/src/com/android/phone/CallNotifier.java
index 7bd8fd2..921d396 100644
--- a/src/com/android/phone/CallNotifier.java
+++ b/src/com/android/phone/CallNotifier.java
@@ -414,7 +414,7 @@ public class CallNotifier extends Handler
             // otherwise handle it here.
             if (!mApplication.isShowingCallScreen()) {
                 mApplication.setScreenTimeout(PhoneApp.ScreenTimeoutDuration.DEFAULT);
-                mApplication.requestWakeState(PhoneApp.WakeState.SLEEP);
+                mApplication.requestWakeState(PhoneApp.WakeState.PARTIAL);
             }
 
             // Since we're now in-call, the Ringer should definitely *not*
diff --git a/src/com/android/phone/PhoneApp.java b/src/com/android/phone/PhoneApp.java
index c7fdf13..ff225f0 100644
--- a/src/com/android/phone/PhoneApp.java
+++ b/src/com/android/phone/PhoneApp.java
@@ -74,7 +74,7 @@ public class PhoneApp extends Application {
      *   (PhoneApp.DBG_LEVEL >= 2)
      * depending on the desired verbosity.
      */
-    /* package */ static final int DBG_LEVEL = 1;
+    /* package */ static final int DBG_LEVEL = 2;
 
     private static final boolean DBG =
             (PhoneApp.DBG_LEVEL >= 1) && (SystemProperties.getInt("ro.debuggable", 0) == 1);
@@ -819,14 +819,19 @@ public class PhoneApp extends Application {
         // "disconnected" state.
         //
         boolean isRinging = (state == Phone.State.RINGING);
+        boolean isCalling = (state == Phone.State.OFFHOOK);
         boolean showingDisconnectedConnection =
                 PhoneUtils.hasDisconnectedConnections(phone) && isShowingCallScreen;
         boolean keepScreenOn = isRinging || showingDisconnectedConnection;
+
         if (DBG) Log.d(LOG_TAG, "updateWakeState: keepScreenOn = " + keepScreenOn
                        + " (isRinging " + isRinging
                        + ", showingDisc " + showingDisconnectedConnection + ")");
         // keepScreenOn == true means we'll hold a full wake lock:
-        requestWakeState(keepScreenOn ? WakeState.FULL : WakeState.SLEEP);
+        if (isCalling == false)
+            requestWakeState(keepScreenOn ? WakeState.FULL : WakeState.SLEEP);
+        else
+            requestWakeState(WakeState.PARTIAL);
     }
 
     /**
_______________________________________________
android-freerunner mailing list
[email protected]
http://android.koolu.org/listinfo.cgi/android-freerunner-koolu.org

Reply via email to