FileDocCategorySizeDatePackage
RemoteSubActivityScreen.javaAPI DocAndroid 5.1 API2018Thu Mar 12 22:22:12 GMT 2015android.app.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());
                    }
                });
            }
        }