title: Detect if resolution is too high on Android Lollipop
body: <p>I have to display some pictures in an ImageView. 
  Some of them may have a resolution too high that gives me</p>
  
  <pre><code>W/OpenGLRenderer﹕ Bitmap too large to be uploaded into a texture (3744x5616, max=4096x4096)
  </code></pre>
  
  <p>I used this method to detect this situation:</p>
  
  <pre><code>public boolean isResTooHigh() {
      int[] maxSize = new int[1];
      GLES10.glGetIntegerv(GL10.GL_MAX_TEXTURE_SIZE, maxSize, 0);
  
      return (maxSize[0] &lt; width) || (maxSize[0] &lt; height);
  }
  </code></pre>
  
  <p>where width and height are provided by the source of the pictures.</p>
  
  <p>But now on my Nexus 4 running Lollipop and my emulators, maxSize[0] is always 0.
  So, how do I detect this problem?</p>