Hi,
I am trying to disconnect an outgoing call by injecting END key but it gives a security exception.I have added INJECT_EVENT permission in manifest.Here is my code:
Handler handler;
Thread t = new Thread() {
Object sync = new Object();
public void run() {
Log.d( "Handler11","Creating handler ..." );
Looper.prepare();
handler = new Handler();
Looper.loop();
Log.d( "Handler22", "Looper thread ends" );
}
};
t.start();
handler.post( new Runnable() {
// Log.d( "Generate key","Generating keys w/inst..." );
public void run() {
Log.d( "111111111111","11111111111111111111111" );
Log.d( "Generate key","Generating keys w/inst..." );
Instrumentation inst = new Instrumentation();
inst.sendKeyDownUpSync( KeyEvent.KEYCODE_ENDCALL );
}
} );

