Flutter Engine
The Flutter Engine
shell
platform
android
io
flutter
embedding
engine
plugins
contentprovider
ContentProviderControlSurface.java
Go to the documentation of this file.
1
// Copyright 2013 The Flutter Authors. All rights reserved.
2
// Use of this source code is governed by a BSD-style license that can be
3
// found in the LICENSE file.
4
5
package
io.flutter.embedding.engine.plugins.contentprovider;
6
7
import
android
.content.ContentProvider;
8
import
androidx.annotation.NonNull;
9
import
androidx.lifecycle.Lifecycle;
10
11
/**
12
* Control surface through which a {@link ContentProvider} attaches to a {@link
13
* io.flutter.embedding.engine.FlutterEngine}.
14
*
15
* <p>A {@link ContentProvider} that contains a {@link io.flutter.embedding.engine.FlutterEngine}
16
* should coordinate itself with the {@link io.flutter.embedding.engine.FlutterEngine}'s {@code
17
* ContentProviderControlSurface}.
18
*/
19
public
interface
ContentProviderControlSurface
{
20
/**
21
* Call this method from the {@link ContentProvider} that is running the {@link
22
* io.flutter.embedding.engine.FlutterEngine} that is associated with this {@code
23
* ContentProviderControlSurface}.
24
*
25
* <p>Once a {@link ContentProvider} is created, and its associated {@link
26
* io.flutter.embedding.engine.FlutterEngine} is executing Dart code, the {@link ContentProvider}
27
* should invoke this method. At that point the {@link io.flutter.embedding.engine.FlutterEngine}
28
* is considered "attached" to the {@link ContentProvider} and all {@link ContentProviderAware}
29
* plugins are given access to the {@link ContentProvider}.
30
*/
31
void
attachToContentProvider
(
32
@NonNull ContentProvider contentProvider, @NonNull Lifecycle lifecycle);
33
34
/**
35
* Call this method from the {@link ContentProvider} that is attached to this {@code
36
* ContentProviderControlSurfaces}'s {@link io.flutter.embedding.engine.FlutterEngine} when the
37
* {@link ContentProvider} is about to be destroyed.
38
*
39
* <p>This method gives each {@link ContentProviderAware} plugin an opportunity to clean up its
40
* references before the {@link ContentProvider is destroyed}.
41
*/
42
void
detachFromContentProvider
();
43
}
io.flutter.embedding.engine.plugins.contentprovider.ContentProviderControlSurface
Definition:
ContentProviderControlSurface.java:19
io.flutter.embedding.engine.plugins.contentprovider.ContentProviderControlSurface.detachFromContentProvider
void detachFromContentProvider()
io.flutter.embedding.engine.plugins.contentprovider.ContentProviderControlSurface.attachToContentProvider
void attachToContentProvider( @NonNull ContentProvider contentProvider, @NonNull Lifecycle lifecycle)
android
Definition:
BitmapRegionDecoder.cpp:14
Generated on Sun Jun 23 2024 21:55:09 for Flutter Engine by
1.9.4