package com.lemenzo.camera.ui.activities import android.content.SharedPreferences import android.os.Bundle import com.lemenzo.camera.AutoFinishOnSleep import com.lemenzo.camera.CapturedItem import com.lemenzo.camera.util.EphemeralSharedPrefsNamespace import com.lemenzo.camera.util.getPrefs open class SecureMainActivity : MainActivity(), SecureActivity { val capturedItems = ArrayList() val ephemeralPrefsNamespace = EphemeralSharedPrefsNamespace() private val autoFinisher = AutoFinishOnSleep(this) override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) autoFinisher.start() } override fun onDestroy() { super.onDestroy() autoFinisher.stop() } override fun getSharedPreferences(name: String, mode: Int): SharedPreferences { return ephemeralPrefsNamespace.getPrefs(this, name, mode, cloneOriginal = true) } }