title: How to get the current locale (API level 24)?
body: <p>I was doing this way:</p>
  
  <pre><code>context.getResources().getConfiguration().locale
  </code></pre>
  
  <p><a href="https://developer.android.com/reference/android/content/res/Configuration.html#locale" rel="noreferrer"><code>Configuration.locale</code></a> is deprecated if target is 24. So I made this change:</p>
  
  <pre><code>context.getResources().getConfiguration().getLocales().get(0)
  </code></pre>
  
  <p>Now it says that it's only for <code>minSdkVersion</code> 24, so I cannot use it because my min target is lower.</p>
  
  <p>What's the right method?</p>