title: Why use ContextWrapper directly in an Activity instead of implicit context from "this"
body: <p>Going through some supposedly "good" sources sources to learn the details and tricks of context handling in Android I have come across one pattern multiple time that I fail to understand.</p>
  
  <p>What is the advantage of using a ContextWrapper when you could equally well use the implicit context?</p>
  
  <p>For example why use the following in an activity method (defined directly in an Activity class)</p>
  
  <pre><code>...
  ContextWrapper cw = new ContextWrapper(getApplicationContext())
  File filesDir = cw.getFilesDir();
  ...
  </code></pre>
  
  <p>Instead of just</p>
  
  <pre><code>...
  File filesDir = getFilesDir();
  ...
  </code></pre>
  
  <p>even though getFilesDir() is defined in the ContextWrapper class the  Activity is anyway a subclass of ContextWrapper so you have direct access to the method anyway.</p>
  
  <p>So what potential issue (that I fail to see) does this added complexity address?</p>