Skip to content

Commit 5e94425

Browse files
AbdeMohlbimboetger
andauthored
Small cleanup in DeferredComponentManager.java‎ (#178585)
this change : - fixes the link in docs that is specified as a text - removes `unnecessary` `public/abstract` modifiers in a `public interface` ## Pre-launch Checklist - [x] I read the [Contributor Guide] and followed the process outlined there for submitting PRs. - [x] I read the [Tree Hygiene] wiki page, which explains my responsibilities. - [x] I read and followed the [Flutter Style Guide], including [Features we expect every widget to implement]. - [x] I signed the [CLA]. - [ ] I listed at least one issue that this PR fixes in the description above. - [ ] I updated/added relevant documentation (doc comments with `///`). - [ ] I added new tests to check the change I am making, or this PR is [test-exempt]. - [x] I followed the [breaking change policy] and added [Data Driven Fixes] where supported. - [x] All existing and new tests are passing. If you need help, consider asking for advice on the #hackers-new channel on [Discord]. **Note**: The Flutter team is currently trialing the use of [Gemini Code Assist for GitHub](https://developers.google.com/gemini-code-assist/docs/review-github-code). Comments from the `gemini-code-assist` bot should not be taken as authoritative feedback from the Flutter team. If you find its comments useful you can update your code accordingly, but if you are unsure or disagree with the feedback, please feel free to wait for a Flutter team member's review for guidance on which automated comments should be addressed. <!-- Links --> [Contributor Guide]: https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#overview [Tree Hygiene]: https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md [test-exempt]: https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#tests [Flutter Style Guide]: https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md [Features we expect every widget to implement]: https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md#features-we-expect-every-widget-to-implement [CLA]: https://cla.developers.google.com/ [flutter/tests]: https://github.com/flutter/tests [breaking change policy]: https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#handling-breaking-changes [Discord]: https://github.com/flutter/flutter/blob/main/docs/contributing/Chat.md [Data Driven Fixes]: https://github.com/flutter/flutter/blob/main/docs/contributing/Data-driven-Fixes.md --------- Co-authored-by: Matt Boetger <matt.boetger@gmail.com> Co-authored-by: Matt Boetger <boetger@google.com>
1 parent 1e11a4c commit 5e94425

1 file changed

Lines changed: 10 additions & 9 deletions

File tree

engine/src/flutter/shell/platform/android/io/flutter/embedding/engine/deferredcomponents/DeferredComponentManager.java

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,8 @@
1818
*
1919
* <p>DeferredComponentManager handles the embedder/Android level tasks of downloading, installing,
2020
* and loading Dart deferred libraries. A typical code-flow begins with a Dart call to loadLibrary()
21-
* on deferred imported library. See https://dart.dev/guides/language/language-tour#deferred-loading
21+
* on deferred imported library. See <a
22+
* href="https://dart.dev/guides/language/language-tour#deferred-loading">https://dart.dev/guides/language/language-tour#deferred-loading</a>
2223
* This call retrieves a unique identifier called the loading unit id, which is assigned by
2324
* gen_snapshot during compilation. The loading unit id is passed down through the engine and
2425
* invokes installDeferredComponent. Once the component is downloaded, loadAssets and
@@ -45,7 +46,7 @@ public interface DeferredComponentManager {
4546
* is fully initialized, this method should be called to provide the FlutterJNI instance to use
4647
* for use in loadDartLibrary and loadAssets.
4748
*/
48-
public abstract void setJNI(FlutterJNI flutterJNI);
49+
void setJNI(FlutterJNI flutterJNI);
4950

5051
/**
5152
* Sets the DeferredComponentChannel system channel to handle the framework API to directly call
@@ -66,7 +67,7 @@ public interface DeferredComponentManager {
6667
* DeferredComponentChannel.completeInstallSuccess} while errors and failures should call {@link
6768
* DeferredComponentChannel.completeInstallError}.
6869
*/
69-
public abstract void setDeferredComponentChannel(DeferredComponentChannel channel);
70+
void setDeferredComponentChannel(DeferredComponentChannel channel);
7071

7172
/**
7273
* Request that the deferred component be downloaded and installed.
@@ -121,7 +122,7 @@ public interface DeferredComponentManager {
121122
* an associated Dart deferred library, loading unit id should a negative value and
122123
* componentName must be non-null.
123124
*/
124-
public abstract void installDeferredComponent(int loadingUnitId, String componentName);
125+
void installDeferredComponent(int loadingUnitId, String componentName);
125126

126127
/**
127128
* Gets the current state of the installation session corresponding to the specified loadingUnitId
@@ -156,7 +157,7 @@ public interface DeferredComponentManager {
156157
* @param loadingUnitId The unique identifier associated with a Dart deferred library.
157158
* @param componentName The deferred component name as defined in bundle_config.yaml.
158159
*/
159-
public abstract String getDeferredComponentInstallState(int loadingUnitId, String componentName);
160+
String getDeferredComponentInstallState(int loadingUnitId, String componentName);
160161

161162
/**
162163
* Extract and load any assets and resources from the deferred component for use by Flutter.
@@ -178,7 +179,7 @@ public interface DeferredComponentManager {
178179
* @param loadingUnitId The unique identifier associated with a Dart deferred library.
179180
* @param componentName The deferred component name as defined in bundle_config.yaml.
180181
*/
181-
public abstract void loadAssets(int loadingUnitId, String componentName);
182+
void loadAssets(int loadingUnitId, String componentName);
182183

183184
/**
184185
* Load the .so shared library file into the Dart VM.
@@ -205,7 +206,7 @@ public interface DeferredComponentManager {
205206
* Play Store deferred component delivery, this name corresponds to the root name on the
206207
* installed APKs in which to search for the desired shared library .so file.
207208
*/
208-
public abstract void loadDartLibrary(int loadingUnitId, String componentName);
209+
void loadDartLibrary(int loadingUnitId, String componentName);
209210

210211
/**
211212
* Request that the specified component be uninstalled.
@@ -229,10 +230,10 @@ public interface DeferredComponentManager {
229230
* @param loadingUnitId The unique identifier associated with a Dart deferred library.
230231
* @param componentName The deferred component name as defined in bundle_config.yaml.
231232
*/
232-
public abstract boolean uninstallDeferredComponent(int loadingUnitId, String componentName);
233+
boolean uninstallDeferredComponent(int loadingUnitId, String componentName);
233234

234235
/**
235236
* Cleans up and releases resources. This object is no longer usable after calling this method.
236237
*/
237-
public abstract void destroy();
238+
void destroy();
238239
}

0 commit comments

Comments
 (0)