diff --git a/app/src/main/java/keijumt/devandroid/common/Calculate.kt b/app/src/main/java/keijumt/devandroid/common/Calculate.kt deleted file mode 100644 index 58ec5f4..0000000 --- a/app/src/main/java/keijumt/devandroid/common/Calculate.kt +++ /dev/null @@ -1,34 +0,0 @@ -package keijumt.devandroid.common - -import android.os.AsyncTask - -class Calculate(val callback: Callback) : AsyncTask() { - - // ui thread - override fun onPreExecute() { - println("onPreExecute") - } - - override fun doInBackground(vararg params: Int?): Int { - try { - println("doInBackground") - Thread.sleep(3000) - } catch (e: Exception) { - - } - val value = params.get(0) ?: 1 - return value * value - } - - override fun onProgressUpdate(vararg values: Int?) { - println("onPorgressUpdate") - } - - override fun onPostExecute(result: Int?) { - callback.execute(result) - } - - interface Callback { - fun execute(value: T?) - } -} \ No newline at end of file