[WVDRM] Fix for stuttering on low bandwidth

Reintroduces the play/pause rebuffering logic we eliminated
in JB zero day to fix double spins and slow startup - but
activates that logic only based on a comparison of the
current bandwidth measurement and the lowest bitrate track
in the movie.

Needs to be submitted with related changes in /vendor/widevine

bug: 7230071
Change-Id: If4f5ecda36c4858ce8bf5c4abb722f90a329ecdb
diff --git a/media/libstagefright/AwesomePlayer.cpp b/media/libstagefright/AwesomePlayer.cpp
index 9f069ae..0cb378d 100644
--- a/media/libstagefright/AwesomePlayer.cpp
+++ b/media/libstagefright/AwesomePlayer.cpp
@@ -755,22 +755,18 @@
         if ((mFlags & PLAYING) && !eos
                 && (cachedDurationUs < kLowWaterMarkUs)) {
             modifyFlags(CACHE_UNDERRUN, SET);
-            if (mWVMExtractor == NULL) {
-                ALOGI("cache is running low (%.2f secs) , pausing.",
-                      cachedDurationUs / 1E6);
-                pause_l();
-                ensureCacheIsFetching_l();
-            }
+            ALOGI("cache is running low (%.2f secs) , pausing.",
+                  cachedDurationUs / 1E6);
+            pause_l();
+            ensureCacheIsFetching_l();
             sendCacheStats();
             notifyListener_l(MEDIA_INFO, MEDIA_INFO_BUFFERING_START);
         } else if (eos || cachedDurationUs > kHighWaterMarkUs) {
             if (mFlags & CACHE_UNDERRUN) {
                 modifyFlags(CACHE_UNDERRUN, CLEAR);
-                if (mWVMExtractor == NULL) {
-                    ALOGI("cache has filled up (%.2f secs), resuming.",
-                          cachedDurationUs / 1E6);
-                    play_l();
-                }
+                ALOGI("cache has filled up (%.2f secs), resuming.",
+                      cachedDurationUs / 1E6);
+                play_l();
             } else if (mFlags & PREPARING) {
                 ALOGV("cache has filled up (%.2f secs), prepare is done",
                      cachedDurationUs / 1E6);