FileDocCategorySizeDatePackage
RemoteSubActivityScreen.javaAPI DocAndroid 1.5 API1945Wed May 06 22:42:02 BST 2009com.android.unit_tests.activity

RemoteSubActivityScreen

public class RemoteSubActivityScreen extends SubActivityScreen

Fields Summary
android.os.Handler
mHandler
boolean
mFirst
Constructors Summary
public RemoteSubActivityScreen()


      
    
Methods Summary
public voidonCreate(android.os.Bundle icicle)

    	// We are running in a remote process, so want to have the sub-activity
    	// sending the result back in the original process.
        Intent intent = getIntent();
    	intent.setClass(this, SubActivityScreen.class);
    	
        super.onCreate(icicle);
        
        boolean kill = intent.getBooleanExtra("kill", false);
        //Log.i("foo", "RemoteSubActivityScreen pid=" + Process.myPid()
        //        + " kill=" + kill);
        
        if (kill) {
	        // After finishing initialization, kill the process!  But only if
	        // this is the first time...
	        if (icicle == null) {
		        mHandler.post(new Runnable() {
		        	public void run() {
		        		handleBeforeStopping();
		        		Process.killProcess(Process.myPid());
		        	}
		        });
	        }
        }