title: gradle prints warning although SuppressWarnings is set
body: <p>I have an android app imported to Android Studio. It has some Java libraries included. Everything works so far.</p>
  
  <p>The following method:</p>
  
  <pre><code>            @SuppressWarnings("deprecation")
          private Drawable getDrawable() {
              if(Build.VERSION.SDK_INT &gt; Build.VERSION_CODES.KITKAT_WATCH)
                  return activity.getResources().getDrawable(R.drawable.separator_gradient, activity.getTheme());
              else
                  return activity.getResources().getDrawable(R.drawable.separator_gradient);
          }
  </code></pre>
  
  <p>prints always a depreciation warning:</p>
  
  <pre><code>:androidAnsatTerminal:compileDebugJava
  C:\...\src\main\java\de\ansat\terminal\activity\widgets\druckAssistent\FahrkartenArtSelector.java:131: warning: [deprecation] getDrawable(int) in Resources has been deprecated
                  return activity.getResources().getDrawable(R.drawable.separator_gradient);
                                                 ^
  </code></pre>
  
  <p>1 warning</p>
  
  <p>This is not the only @SuppressWarnings("deprecation") in my project. In other places the warning is not printed...</p>
  
  <p>For example: </p>
  
  <pre><code>    @SuppressWarnings("deprecation")
  private void setBackgroundToNull(ImageView imgRight) {
  
      if (android.os.Build.VERSION.SDK_INT &lt; android.os.Build.VERSION_CODES.JELLY_BEAN) {
          imgRight.setBackgroundDrawable(null);
      } else {
          imgRight.setBackground(null);
      }
  }
  </code></pre>
  
  <p>From my AndroidManifest:</p>
  
  <pre><code>&lt;uses-sdk
      android:minSdkVersion="15"
      android:targetSdkVersion="21" /&gt;
  </code></pre>
  
  <p>How can I get rid of this warning message?
  I don't want to turn of warnings globally or something.</p>
  
  <p>EDIT: 
  If I just call getDrawable with Theme parameter, of cause this happens on SDK15 device:</p>
  
  <pre><code>java.lang.NoSuchMethodError: android.content.res.Resources.getDrawable
          at de.ansat.terminal.activity.widgets.druckAssistent.FahrkartenArtSelector$3.getDrawable(FahrkartenArtSelector.java:128)
  </code></pre>