title: Close activity or call finish() from class that extends ContextWrapper
body: <p>I have one activity with viewPager. Suppose <code>Post_Home</code> is my <code>activity</code> that extends <code>AppCompatActivity</code>. And I have another class <code>Post__Home</code> that extends <code>ContextWrapper</code>.</p>
  
  <p>My Post__Home Class:</p>
  
  <pre><code>public class Post__Home extends ContextWrapper {
  
      public Post__Home(Context context){
          super(context);
      }
  
  public void DoSomething(){
  if(someValueisOK){
   // I Need to close the main activity (i.e. Post_Home) from this method.
  }
  }
  }
  </code></pre>
  
  <p>My Post_Home class </p>
  
  <pre><code>public class Post_Home extends AppCompatActivity{
  
      @Override
      protected void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
          setContentView(R.layout.post_home);            
         init();
      }
  
  //I have a reference of the Post__Home class something like this:
   private void init(){
     Post__Home home = new Post__Home(this);
     home.DoSomething();
   }
  }
  </code></pre>
  
  <p>How can I call <code>finish()</code> method in <code>home.DoSomething()</code> ? Or is there any way by which I can close the <code>Post_Home</code> and open some other <code>activity</code>?</p>