Java Code Examples for android.os.Bundle.clone()

The following are Jave code examples for showing how to use clone() of the android.os.Bundle class. You can vote up the examples you like. Your votes will be used in our system to get more good examples.
Example 1
Project: keepass2android   File: FileStorageSetupActivity.java   Vote up 6 votes
@Override
protected void onCreate(Bundle savedInstanceState) {
	super.onCreate(savedInstanceState);
	setContentView(R.layout.activity_file_storage_setup);
	Log.d("FSSA", "onCreate");

	if (savedInstanceState != null)
	{
		isRecreated = true;
		state = (Bundle) savedInstanceState.clone();
		Log.d("FSSA", "recreating state");
		for (String key: state.keySet())
		{
			Log.d("FSSA", "state " + key + ":" +state.get(key));
		}
	}
	if (!isRecreated)
	{
		if (MainActivity.storageToTest == null)
			MainActivity.createStorageToTest(this, getApplicationContext(), false);
		MainActivity.storageToTest.onCreate(this, savedInstanceState);
	}
}