diff --git a/app/src/main/java/io/lowrespalmtree/harvestdawn/MainActivity.kt b/app/src/main/java/io/lowrespalmtree/harvestdawn/MainActivity.kt index 7c1a74b..434c3bb 100644 --- a/app/src/main/java/io/lowrespalmtree/harvestdawn/MainActivity.kt +++ b/app/src/main/java/io/lowrespalmtree/harvestdawn/MainActivity.kt @@ -61,6 +61,18 @@ class MainActivity : AppCompatActivity() { return true } + override fun onSaveInstanceState(outState: Bundle) { + outState.putString("cvp", currentVideoPath) + outState.putParcelable("cvi", currentVideoUri) + super.onSaveInstanceState(outState) + } + + override fun onRestoreInstanceState(savedInstanceState: Bundle) { + currentVideoPath = savedInstanceState.getString("cvp") + currentVideoUri = savedInstanceState.getParcelable("cvi") + super.onRestoreInstanceState(savedInstanceState) + } + override fun onOptionsItemSelected(item: MenuItem): Boolean { // Handle action bar item clicks here. The action bar will // automatically handle clicks on the Home/Up button, so long