lmw
2025-04-14 0361f47762f9958f2ec91fdb62bfc98de4e162a6
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
package com.lzf.easyfloat
 
import android.app.Application
import android.content.ContentProvider
import android.content.ContentValues
import android.database.Cursor
import android.net.Uri
import com.lzf.easyfloat.utils.LifecycleUtils
 
/**
 * @author: liuzhenfeng
 * @github:https://github.com/princekin-f
 * @function:
 * @date: 2020/10/23  13:41
 */
class EasyFloatInitializer : ContentProvider() {
 
    override fun onCreate(): Boolean {
        LifecycleUtils.setLifecycleCallbacks(context!!.applicationContext as Application)
        return true
    }
 
    override fun query(
        uri: Uri,
        projection: Array<String>?,
        selection: String?,
        selectionArgs: Array<String>?,
        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<String>?): Int = 0
 
    override fun update(
        uri: Uri,
        values: ContentValues?,
        selection: String?,
        selectionArgs: Array<String>?
    ): Int = 0
}