Using Android source code
<p>I am developing one application for that I made some changes in CallCard.java class of Phone application.  You can find this class here <code>&lt;http://www.netmite.com/android/mydroid/packages/apps/Phone/src/com/android/phone/CallCard.java&gt;</code>. In the above class there are some cases. i.e BUSY, NUMBER_UNREACHABLE and POWER_OFF etc. In the case of POWER_OFF I called a method of a below class.</p>

<pre><code>public class MyClass extends Activity{ 



    @Override
    protected void onCreate(Bundle savedInstanceState) {
        // TODO Auto-generated method stub
        super.onCreate(savedInstanceState);
        System.out.println("**inside myclass");

    }

    public  void  powerOff(Context c){
        System.out.println("**inside powerOff");
        Intent call = new Intent(Intent.ACTION_DIAL,Uri.parse("tel:+5555")); 
        startActivity(call);
    }

}
</code></pre>

<p>This is my own class and added into source directory Phone application. The code is like this:</p>

<pre><code>case POWER_OFF:
   resID = R.string.callFailed_powerOff;
   MyClass myClass = new MyClass();
   if(myClass != null){
       System.out.println("**not null");
        myClass.powerOff(getContext);
    }
   break;
</code></pre>

<p>The reason to do this is, I want to Call other number of same person when first-dialed number is switched_off(currentl hard-coded number). I think this is only one way to this.!! Finaly I started build the code but got some error. i.e  'Cannot find symbol'</p>

<pre><code>Symbol: variable getContext
Location: com.android.phone.
    myClass.powerOff(getContext);
                     ^
</code></pre>

<p>Is my way correct? and why this error. plz help me</p>
