Save last visited folder in the application state, so that it survives orientation changes, for example

This commit is contained in:
Xavi Artigas 2012-11-07 13:16:09 +01:00
parent ce47bec59e
commit b0282e731f

View file

@ -114,6 +114,7 @@ public class Tutorial5 extends Activity implements SurfaceHolder.Callback, OnSee
position = savedInstanceState.getInt("position");
duration = savedInstanceState.getInt("duration");
mediaUri = savedInstanceState.getString("mediaUri");
last_folder = savedInstanceState.getString("last_folder");
Log.i ("GStreamer", "Activity created with saved state:");
} else {
is_playing_desired = false;
@ -152,6 +153,7 @@ public class Tutorial5 extends Activity implements SurfaceHolder.Callback, OnSee
outState.putInt("position", position);
outState.putInt("duration", duration);
outState.putString("mediaUri", mediaUri);
outState.putString("last_folder", last_folder);
}
protected void onDestroy() {