title: Android MediaPlayer not playing on Galaxy S6 with Android 5.1.1
body: <p>I'm seeing an issue that is specific to the Galaxy S6 running Android 5.1.1. I'm using MediaPlayer to play audio streams and on this specific configuration of device and Android version, it fails to ever reach the onPrepared method, and therefore never plays.</p>
  
  <pre><code>@Override
      protected void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
          setContentView(R.layout.activity_main);
  
          mAndroidPlayer = new MediaPlayer();
  
          mAndroidPlayer.setOnErrorListener(new MediaPlayer.OnErrorListener() {
              @Override
              public boolean onError(MediaPlayer mediaPlayer, int i, int i1) {
                  System.out.print("ERROR " + i);
                  return false;
              }
          });
  
          mAndroidPlayer.setOnPreparedListener(new MediaPlayer.OnPreparedListener() {
              @Override
              public void onPrepared(MediaPlayer mediaPlayer) {
                  System.out.println("PREPARED");
                  mAndroidPlayer.start();
              }
          });
  
          mAndroidPlayer.setAudioStreamType(AudioManager.STREAM_MUSIC);
  
          try {
              mAndroidPlayer.setDataSource("http://live.radioart.com/fFilm_scores.mp3");
          } catch (IOException e) {
              e.printStackTrace();
          }
  
          try {
              mAndroidPlayer.prepareAsync();
          } catch (IllegalStateException e) {
              e.printStackTrace();
          }
      }
  </code></pre>
  
  <p>Just to re-iterate, it works fine on all other devices and Android versions.</p>
  
  <p>Below is output from the console:</p>
  
  <pre><code>    09-04 09:54:51.112  24991-24991/com.tsm.mediaplayertest E/Zygote﹕ MountEmulatedStorage()
  09-04 09:54:51.112  24991-24991/com.tsm.mediaplayertest E/Zygote﹕ v2
  09-04 09:54:51.112  24991-24991/com.tsm.mediaplayertest I/libpersona﹕ KNOX_SDCARD checking this for 10229
  09-04 09:54:51.112  24991-24991/com.tsm.mediaplayertest I/libpersona﹕ KNOX_SDCARD not a persona
  09-04 09:54:51.112  24991-24991/com.tsm.mediaplayertest I/SELinux﹕ Function: selinux_compare_spd_ram , priority [2] , priority version is VE=SEPF_SM-G920V_5.1.1_0024
  09-04 09:54:51.112  24991-24991/com.tsm.mediaplayertest E/SELinux﹕ [DEBUG] get_category: variable seinfo: default sensitivity: NULL, cateogry: NULL
  09-04 09:54:51.112  24991-24991/com.tsm.mediaplayertest I/art﹕ Late-enabling -Xcheck:jni
  09-04 09:54:51.122  24991-24991/com.tsm.mediaplayertest D/TimaKeyStoreProvider﹕ TimaSignature is unavailable
  09-04 09:54:51.122  24991-24991/com.tsm.mediaplayertest D/ActivityThread﹕ Added TimaKeyStore provider
  09-04 09:54:51.132  24991-24998/com.tsm.mediaplayertest E/art﹕ Failed sending reply to debugger: Broken pipe
  09-04 09:54:51.132  24991-24998/com.tsm.mediaplayertest I/art﹕ Debugger is no longer active
  09-04 09:54:51.132  24991-24991/com.tsm.mediaplayertest I/InjectionManager﹕ Inside getClassLibPath + mLibMap{0=, 1=}
  09-04 09:54:51.132  24991-24991/com.tsm.mediaplayertest I/InjectionManager﹕ Inside getClassLibPath caller
  09-04 09:54:51.142  24991-24991/com.tsm.mediaplayertest D/InjectionManager﹕ InjectionManager
  09-04 09:54:51.142  24991-24991/com.tsm.mediaplayertest D/InjectionManager﹕ fillFeatureStoreMap com.tsm.mediaplayertest
  09-04 09:54:51.142  24991-24991/com.tsm.mediaplayertest I/InjectionManager﹕ Constructor com.tsm.mediaplayertest, Feature store :{}
  09-04 09:54:51.142  24991-24991/com.tsm.mediaplayertest I/InjectionManager﹕ featureStore :{}
  09-04 09:54:51.162  24991-24991/com.tsm.mediaplayertest D/SecWifiDisplayUtil﹕ Metadata value : SecSettings2
  09-04 09:54:51.172  24991-24991/com.tsm.mediaplayertest D/PhoneWindow﹕ *FMB* installDecor mIsFloating : false
  09-04 09:54:51.182  24991-24991/com.tsm.mediaplayertest D/PhoneWindow﹕ *FMB* installDecor flags : -2139029248
  09-04 09:54:51.202  24991-24991/com.tsm.mediaplayertest I/MediaPlayer﹕ Need to enable context aware info
  09-04 09:54:51.202  24991-24991/com.tsm.mediaplayertest V/MediaPlayer-JNI﹕ native_setup
  09-04 09:54:51.202  24991-24991/com.tsm.mediaplayertest V/MediaPlayer﹕ constructor
  09-04 09:54:51.202  24991-24991/com.tsm.mediaplayertest V/MediaPlayer﹕ setListener
  09-04 09:54:51.202  24991-24991/com.tsm.mediaplayertest V/MediaPlayer-JNI﹕ setAudioStreamType: 3
  09-04 09:54:51.202  24991-24991/com.tsm.mediaplayertest V/MediaPlayer﹕ MediaPlayer::setAudioStreamType
  09-04 09:54:51.212  24991-24991/com.tsm.mediaplayertest V/MediaPlayer﹕ setVideoSurfaceTexture
  09-04 09:54:51.212  24991-24991/com.tsm.mediaplayertest V/MediaPlayer﹕ prepareAsync
  09-04 09:54:51.212  24991-24991/com.tsm.mediaplayertest D/Activity﹕ performCreate Call Injection manager
  09-04 09:54:51.212  24991-25004/com.tsm.mediaplayertest D/MediaHTTPConnection﹕ setReadTimeOut =  30000ms
  09-04 09:54:51.212  24991-24991/com.tsm.mediaplayertest I/InjectionManager﹕ dispatchOnViewCreated &gt; Target : com.tsm.mediaplayertest.MainActivity isFragment :false
  09-04 09:54:51.212  24991-25010/com.tsm.mediaplayertest D/OpenGLRenderer﹕ Use EGL_SWAP_BEHAVIOR_PRESERVED: true
  09-04 09:54:51.222  24991-25004/com.tsm.mediaplayertest D/MediaHTTPConnection﹕ setReadTimeout with 30000ms
  09-04 09:54:51.222  24991-25004/com.tsm.mediaplayertest I/System.out﹕ (HTTPLog)-Static: isSBSettingEnabled false
  09-04 09:54:51.222  24991-25004/com.tsm.mediaplayertest I/System.out﹕ (HTTPLog)-Static: isShipBuild true
  09-04 09:54:51.222  24991-25004/com.tsm.mediaplayertest I/System.out﹕ (HTTPLog)-Thread-5351-996493763: SmartBonding Enabling is false, SHIP_BUILD is true, log to file is false, DBG is false
  09-04 09:54:51.222  24991-25004/com.tsm.mediaplayertest I/System.out﹕ (HTTPLog)-Thread-5351-996493763: SMARTBONDING_FEATURE_ENABLED is true
  09-04 09:54:51.222  24991-25004/com.tsm.mediaplayertest I/System.out﹕ (HTTPLog)-Static: isSBSettingEnabled false
  09-04 09:54:51.222  24991-25004/com.tsm.mediaplayertest I/System.out﹕ KnoxVpnUidStorageknoxVpnSupported API value returned is false
  09-04 09:54:51.222  24991-24991/com.tsm.mediaplayertest D/PhoneWindow﹕ *FMB* isFloatingMenuEnabled mFloatingMenuBtn : null
  09-04 09:54:51.222  24991-24991/com.tsm.mediaplayertest D/PhoneWindow﹕ *FMB* isFloatingMenuEnabled return false
  09-04 09:54:51.242  24991-24991/com.tsm.mediaplayertest D/SRIB_DCS﹕ log_dcs ThreadedRenderer::initialize entered!
  09-04 09:54:51.262  24991-25010/com.tsm.mediaplayertest D/libEGL﹕ loaded /vendor/lib/egl/libGLES_mali.so
  09-04 09:54:51.272  24991-25010/com.tsm.mediaplayertest I/OpenGLRenderer﹕ Initialized EGL, version 1.4
  09-04 09:54:51.282  24991-25010/com.tsm.mediaplayertest I/OpenGLRenderer﹕ HWUI protection enabled for context ,  &amp;this =0xf4d8c940 ,&amp;mEglDisplay = 1 , &amp;mEglConfig = -185126244
  09-04 09:54:51.282  24991-25010/com.tsm.mediaplayertest D/OpenGLRenderer﹕ Get maximum texture size. GL_MAX_TEXTURE_SIZE is 8192
  09-04 09:54:51.282  24991-25010/com.tsm.mediaplayertest D/OpenGLRenderer﹕ Enabling debug mode 0
  09-04 09:54:51.282  24991-25010/com.tsm.mediaplayertest D/mali_winsys﹕ new_window_surface returns 0x3000,  [1440x2560]-format:1
  09-04 09:54:51.292  24991-24991/com.tsm.mediaplayertest I/InjectionManager﹕ dispatchCreateOptionsMenu :com.tsm.mediaplayertest.MainActivity
  09-04 09:54:51.292  24991-24991/com.tsm.mediaplayertest I/InjectionManager﹕ dispatchPrepareOptionsMenu :com.tsm.mediaplayertest.MainActivity
  09-04 09:54:51.322  24991-24991/com.tsm.mediaplayertest I/Timeline﹕ Timeline: Activity_idle id: android.os.BinderProxy@356f9c4b time:29488057
  09-04 09:54:51.672  24991-25004/com.tsm.mediaplayertest I/MediaHTTPConnection﹕ response code = 200
  09-04 09:54:51.672  24991-25004/com.tsm.mediaplayertest V/MediaHTTPConnection﹕ mTotalSize is -1
  09-04 09:54:51.672  24991-25004/com.tsm.mediaplayertest D/MediaHTTPConnection﹕ getProperties 16
  09-04 09:54:51.672  24991-25013/com.tsm.mediaplayertest D/MediaHTTPConnection﹕ getProperties 16
  09-04 09:54:52.142  24991-24998/com.tsm.mediaplayertest I/art﹕ Ignoring second debugger -- accepting and dropping
  </code></pre>