A class to initialize the native code.
Definition at line 25 of file ResourceExtractor.java.
◆ ResourceExtractor()
io.flutter.embedding.engine.loader.ResourceExtractor.ResourceExtractor |
( |
@NonNull String |
dataDirPath, |
|
|
@NonNull String |
packageName, |
|
|
@NonNull PackageManager |
packageManager, |
|
|
@NonNull AssetManager |
assetManager |
|
) |
| |
|
inlinepackage |
Definition at line 129 of file ResourceExtractor.java.
133 {
134 mDataDirPath = dataDirPath;
135 mPackageName = packageName;
136 mPackageManager = packageManager;
137 mAssetManager = assetManager;
138 mResources = new HashSet<>();
139 }
◆ addResource()
ResourceExtractor io.flutter.embedding.engine.loader.ResourceExtractor.addResource |
( |
@NonNull String |
resource | ) |
|
|
inlinepackage |
Definition at line 141 of file ResourceExtractor.java.
141 {
143 return this;
144 }
static SkString resource(SkPDFResourceType type, int index)
◆ addResources()
ResourceExtractor io.flutter.embedding.engine.loader.ResourceExtractor.addResources |
( |
@NonNull Collection< String > |
resources | ) |
|
|
inlinepackage |
◆ getVersionCode()
static long io.flutter.embedding.engine.loader.ResourceExtractor.getVersionCode |
( |
@NonNull PackageInfo |
packageInfo | ) |
|
|
inlinestaticpackage |
Definition at line 31 of file ResourceExtractor.java.
31 {
32
33 if (
Build.VERSION.SDK_INT >= API_LEVELS.API_28) {
34 return packageInfo.getLongVersionCode();
35 } else {
36 return packageInfo.versionCode;
37 }
38 }
def Build(configs, env, options)
◆ start()
Definition at line 151 of file ResourceExtractor.java.
151 {
152 if (BuildConfig.DEBUG && mExtractTask != null) {
154 TAG, "Attempted to start resource extraction while another extraction was in progress.");
155 }
156 mExtractTask =
157 new ExtractTask(mDataDirPath, mResources, mPackageName, mPackageManager, mAssetManager);
158 mExtractTask.executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR);
159 return this;
160 }
void Log(const char *format,...) SK_PRINTF_LIKE(1
◆ waitForCompletion()
void io.flutter.embedding.engine.loader.ResourceExtractor.waitForCompletion |
( |
| ) |
|
|
inlinepackage |
Definition at line 162 of file ResourceExtractor.java.
162 {
163 if (mExtractTask == null) {
164 return;
165 }
166
167 try {
168 mExtractTask.get();
169 }
catch (CancellationException | ExecutionException | InterruptedException
e) {
170 deleteFiles(mDataDirPath, mResources);
171 }
172 }
The documentation for this class was generated from the following file: