Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Unverified Commit 2418712a authored by Sebastiano Barezzi's avatar Sebastiano Barezzi
Browse files

Recorder: Remove dead code

Change-Id: Ib75d2b50271959ecd326d0aae9292d5138be3f6d
parent c05365f3
Loading
Loading
Loading
Loading
+0 −35
Original line number Diff line number Diff line
@@ -9,43 +9,8 @@ import android.app.NotificationManager
import android.content.Context
import android.view.inputmethod.InputMethodManager
import org.lineageos.recorder.service.SoundRecorderService
import java.io.Closeable
import java.io.IOException

object Utils {
    /**
     * Unconditionally close a `Closeable`.
     *
     *
     * Equivalent to [Closeable.close], except any exceptions will be ignored.
     * This is typically used in finally blocks.
     *
     *
     * Example code:
     * <pre>
     * Closeable closeable = null;
     * try {
     * closeable = new FileReader("foo.txt");
     * // process closeable
     * closeable.close();
     * } catch (Exception e) {
     * // error handling
     * } finally {
     * IOUtils.closeQuietly(closeable);
     * }
    </pre> *
     *
     * @param closeable the object to close, may be null or already closed
     * @since 2.0
     */
    fun closeQuietly(closeable: Closeable?) {
        try {
            closeable?.close()
        } catch (ioe: IOException) {
            // ignore
        }
    }

    fun showKeyboard(context: Context) {
        val inputMethodManager = context.getSystemService(
            InputMethodManager::class.java