Class CefriumInitProvider
- All Implemented Interfaces:
android.content.ComponentCallbacks,android.content.ComponentCallbacks2
Declared in the SDK manifest, the Android framework instantiates this
ContentProvider automatically at app launch — before any Activity — in the
browser (main) process. Its onCreate() runs the per-process Chromium
plumbing and initializes the engine (Cefrium.initialize(android.content.Context)),
at the same startup phase the manual Application.onCreate() pattern used to.
Initializing here (rather than lazily on first browser creation) is deliberate:
CEF's context initialization completes asynchronously on the UI message loop, so a
browser can only be created after the looper has spun past it. Doing init at app
launch leaves the whole startup-to-first-Activity window for that to happen;
initializing synchronously inside the first createWithSurface() would crash
(no looper iteration between init and browser creation).
This is why a consumer needs no custom Application and no explicit
Cefrium.initialize() call. Cefrium.initialize(android.content.Context)
is a no-op in Chromium child processes, which self-initialize. The provider performs
no data operations — every query method below is an inert stub.
-
Nested Class Summary
Nested classes/interfaces inherited from class android.content.ContentProvider
android.content.ContentProvider.CallingIdentity, android.content.ContentProvider.PipeDataWriter<T> -
Field Summary
Fields inherited from interface android.content.ComponentCallbacks2
TRIM_MEMORY_BACKGROUND, TRIM_MEMORY_COMPLETE, TRIM_MEMORY_MODERATE, TRIM_MEMORY_RUNNING_CRITICAL, TRIM_MEMORY_RUNNING_LOW, TRIM_MEMORY_RUNNING_MODERATE, TRIM_MEMORY_UI_HIDDEN -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintgetType(android.net.Uri uri) android.net.Uriinsert(android.net.Uri uri, android.content.ContentValues values) booleanonCreate()android.database.Cursorquery(android.net.Uri uri, String[] projection, String selection, String[] selectionArgs, String sortOrder) intupdate(android.net.Uri uri, android.content.ContentValues values, String selection, String[] selectionArgs) Methods inherited from class android.content.ContentProvider
applyBatch, applyBatch, attachInfo, bulkInsert, call, call, canonicalize, clearCallingIdentity, delete, dump, getCallingAttributionSource, getCallingAttributionTag, getCallingPackage, getCallingPackageUnchecked, getContext, getPathPermissions, getReadPermission, getStreamTypes, getTypeAnonymous, 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
-
Constructor Details
-
CefriumInitProvider
public CefriumInitProvider()
-
-
Method Details
-
onCreate
public boolean onCreate()- Specified by:
onCreatein classandroid.content.ContentProvider
-
query
public android.database.Cursor query(android.net.Uri uri, String[] projection, String selection, String[] selectionArgs, String sortOrder) - Specified by:
queryin classandroid.content.ContentProvider
-
getType
- Specified by:
getTypein classandroid.content.ContentProvider
-
insert
public android.net.Uri insert(android.net.Uri uri, android.content.ContentValues values) - Specified by:
insertin classandroid.content.ContentProvider
-
delete
- Specified by:
deletein classandroid.content.ContentProvider
-
update
public int update(android.net.Uri uri, android.content.ContentValues values, String selection, String[] selectionArgs) - Specified by:
updatein classandroid.content.ContentProvider
-