title: Closing an activity from another class
body: <p>I have a question in Android during creating my google-maps application.</p>
  
  <p>I've one activity as below</p>
  
  <pre><code>public class MapCallActivity extends MapActivity {
      classA class = new classA(this);
      classA.callMethod();
  }
  </code></pre>
  
  <p>The <code>classA</code> is defined as below:</p>
  
  <pre><code> public class classA{
     public classA(Context context){
     this.myContext = context;
   }
  
     void callMethod(){
        if (isFileValid) {
          &lt;do_something...&gt;;
        } else {
          &lt;call_the_activity's finish() method&gt;;
        }
     }
   }   
  </code></pre>
  
  <p>Is there a way that I can do <code>&lt;call_the_activity's finish() method&gt;</code> so that the <code>MapCallActivity</code> closes?</p>
  
  <p>Any help is appreciated!</p>