Package com.tencent.mmkv
Class MMKVContentProvider
- java.lang.Object
-
- android.content.ContentProvider
-
- com.tencent.mmkv.MMKVContentProvider
-
- All Implemented Interfaces:
android.content.ComponentCallbacks,android.content.ComponentCallbacks2
public class MMKVContentProvider extends android.content.ContentProviderA helper class for MMKV based on Anonymous Shared Memory.MMKV.mmkvWithAshmemID(android.content.Context, java.lang.String, int, int, java.lang.String)
-
-
Field Summary
Fields Modifier and Type Field Description protected static java.lang.StringFUNCTION_NAMEprotected static java.lang.StringKEYprotected static java.lang.StringKEY_CRYPTprotected static java.lang.StringKEY_MODEprotected static java.lang.StringKEY_SIZE
-
Constructor Summary
Constructors Constructor Description MMKVContentProvider()
-
Method Summary
Modifier and Type Method Description android.os.Bundlecall(java.lang.String method, java.lang.String mmapID, android.os.Bundle extras)protected static android.net.UricontentUri(android.content.Context context)intdelete(android.net.Uri uri, java.lang.String selection, java.lang.String[] selectionArgs)protected static java.lang.StringgetProcessNameByPID(android.content.Context context, int pid)java.lang.StringgetType(android.net.Uri uri)android.net.Uriinsert(android.net.Uri uri, android.content.ContentValues values)booleanonCreate()android.database.Cursorquery(android.net.Uri uri, java.lang.String[] projection, java.lang.String selection, java.lang.String[] selectionArgs, java.lang.String sortOrder)intupdate(android.net.Uri uri, android.content.ContentValues values, java.lang.String selection, java.lang.String[] selectionArgs)-
Methods inherited from class android.content.ContentProvider
applyBatch, applyBatch, attachInfo, bulkInsert, call, canonicalize, clearCallingIdentity, delete, dump, getCallingAttributionSource, getCallingAttributionTag, getCallingPackage, getCallingPackageUnchecked, getContext, getPathPermissions, getReadPermission, getStreamTypes, getWritePermission, insert, isTemporary, onCallingPackageChanged, onConfigurationChanged, onLowMemory, onTrimMemory, openAssetFile, openAssetFile, openFile, openFile, openFileHelper, openPipeHelper, openTypedAssetFile, openTypedAssetFile, query, query, refresh, requireContext, restoreCallingIdentity, setPathPermissions, setReadPermission, setWritePermission, shutdown, uncanonicalize, update
-
-
-
-
Field Detail
-
KEY
protected static final java.lang.String KEY
- See Also:
- Constant Field Values
-
KEY_SIZE
protected static final java.lang.String KEY_SIZE
- See Also:
- Constant Field Values
-
KEY_MODE
protected static final java.lang.String KEY_MODE
- See Also:
- Constant Field Values
-
KEY_CRYPT
protected static final java.lang.String KEY_CRYPT
- See Also:
- Constant Field Values
-
FUNCTION_NAME
protected static final java.lang.String FUNCTION_NAME
- See Also:
- Constant Field Values
-
-
Method Detail
-
contentUri
@Nullable protected static android.net.Uri contentUri(android.content.Context context)
-
onCreate
public boolean onCreate()
- Specified by:
onCreatein classandroid.content.ContentProvider
-
getProcessNameByPID
protected static java.lang.String getProcessNameByPID(android.content.Context context, int pid)
-
call
@Nullable public android.os.Bundle call(@NonNull java.lang.String method, @Nullable java.lang.String mmapID, @Nullable android.os.Bundle extras)- Overrides:
callin classandroid.content.ContentProvider
-
getType
@Nullable public java.lang.String getType(@NonNull android.net.Uri uri)- Specified by:
getTypein classandroid.content.ContentProvider
-
query
@Nullable public android.database.Cursor query(@NonNull android.net.Uri uri, @Nullable java.lang.String[] projection, @Nullable java.lang.String selection, @Nullable java.lang.String[] selectionArgs, @Nullable java.lang.String sortOrder)- Specified by:
queryin classandroid.content.ContentProvider
-
update
public int update(@NonNull android.net.Uri uri, @Nullable android.content.ContentValues values, @Nullable java.lang.String selection, @Nullable java.lang.String[] selectionArgs)- Specified by:
updatein classandroid.content.ContentProvider
-
delete
public int delete(@NonNull android.net.Uri uri, @Nullable java.lang.String selection, @Nullable java.lang.String[] selectionArgs)- Specified by:
deletein classandroid.content.ContentProvider
-
insert
@Nullable public android.net.Uri insert(@NonNull android.net.Uri uri, @Nullable android.content.ContentValues values)- Specified by:
insertin classandroid.content.ContentProvider
-
-