Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ public final class FlutterApplicationInfo {
private static final String DEFAULT_AOT_SHARED_LIBRARY_NAME = "libapp.so";
private static final String DEFAULT_VM_SNAPSHOT_DATA = "vm_snapshot_data";
private static final String DEFAULT_ISOLATE_SNAPSHOT_DATA = "isolate_snapshot_data";
private static final String DEFAULT_FLUTTER_ASSETS_DIR = "flutter_assets";
static final String DEFAULT_FLUTTER_ASSETS_DIR = "flutter_assets";

final String aotSharedLibraryName;
final String vmSnapshotData;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -316,9 +316,18 @@ private ResourceExtractor initResources(@NonNull Context applicationContext) {
return resourceExtractor;
}

private String flutterAssetsDir() {
// TODO(64458): Return default until we can fix initialization sequence.
// When fixed, flutterApplicationInfo should not be null.
if (flutterApplicationInfo == null) {
return FlutterApplicationInfo.DEFAULT_FLUTTER_ASSETS_DIR;
}
return flutterApplicationInfo.flutterAssetsDir;
}

@NonNull
public String findAppBundlePath() {
return flutterApplicationInfo.flutterAssetsDir;
return flutterAssetsDir();
}

/**
Expand Down Expand Up @@ -349,7 +358,7 @@ public String getLookupKeyForAsset(@NonNull String asset, @NonNull String packag

@NonNull
private String fullAssetPathFrom(@NonNull String filePath) {
return flutterApplicationInfo.flutterAssetsDir + File.separator + filePath;
return flutterAssetsDir() + File.separator + filePath;
}

public static class Settings {
Expand Down