Merge "Dont start wifi if in airplane mode" into froyo
diff --git a/common/tests/src/com/android/common/OperationSchedulerTest.java b/common/tests/src/com/android/common/OperationSchedulerTest.java
index f728eea..866d1a8 100644
--- a/common/tests/src/com/android/common/OperationSchedulerTest.java
+++ b/common/tests/src/com/android/common/OperationSchedulerTest.java
@@ -18,8 +18,11 @@
 
 import android.content.SharedPreferences;
 import android.test.AndroidTestCase;
+import android.test.suitebuilder.annotation.MediumTest;
+import android.test.suitebuilder.annotation.SmallTest;
 
 public class OperationSchedulerTest extends AndroidTestCase {
+    @MediumTest
     public void testScheduler() throws Exception {
         String name = "OperationSchedulerTest.testScheduler";
         SharedPreferences storage = getContext().getSharedPreferences(name, 0);
@@ -112,6 +115,7 @@
         assertTrue(afterSuccess + 1000000 >= scheduler.getNextTimeMillis(options));
     }
 
+    @SmallTest
     public void testParseOptions() throws Exception {
          OperationScheduler.Options options = new OperationScheduler.Options();
          assertEquals(
@@ -132,6 +136,7 @@
                  OperationScheduler.parseOptions("", options).toString());
     }
 
+    @SmallTest
     public void testMoratoriumWithHttpDate() throws Exception {
         String name = "OperationSchedulerTest.testMoratoriumWithHttpDate";
         SharedPreferences storage = getContext().getSharedPreferences(name, 0);
diff --git a/libs/audioflinger/AudioFlinger.cpp b/libs/audioflinger/AudioFlinger.cpp
index 815a367..7166c89 100644
--- a/libs/audioflinger/AudioFlinger.cpp
+++ b/libs/audioflinger/AudioFlinger.cpp
@@ -1488,7 +1488,7 @@
         // for all its buffers to be filled before processing it
         mAudioMixer->setActiveTrack(track->name());
         if (cblk->framesReady() && (track->isReady() || track->isStopped()) &&
-                !track->isPaused())
+                !track->isPaused() && !track->isTerminated())
         {
             //LOGV("track %d u=%08x, s=%08x [OK] on thread %p", track->name(), cblk->user, cblk->server, this);