package dev.zoriya.omni import android.app.Application import android.content.ContentProvider import android.content.ContentValues import android.database.Cursor import android.net.Uri // cast connect needs to be set up before the activity handles its intent, a provider // is the only hook a library has that runs before it. class OmniInitProvider : ContentProvider() { override fun onCreate(): Boolean { val app = context?.applicationContext as? Application ?: return false OmniCastReceiver.init(app) return true } override fun query( uri: Uri, projection: Array?, selection: String?, selectionArgs: Array?, sortOrder: String?, ): Cursor? = null override fun getType(uri: Uri): String? = null override fun insert(uri: Uri, values: ContentValues?): Uri? = null override fun delete(uri: Uri, selection: String?, selectionArgs: Array?) = 0 override fun update( uri: Uri, values: ContentValues?, selection: String?, selectionArgs: Array?, ) = 0 }