Fix the unchecked conversion warning for searchPaths in PlayStoreDynamicFeatureManager (flutter/engine#22654)

Also use the diamond operator throughout this class.
This commit is contained in:
Jason Simmons
2020-11-30 12:23:09 -08:00
committed by GitHub
parent cc4b12faf4
commit 567590484f

View File

@@ -165,7 +165,7 @@ public class PlayStoreDynamicFeatureManager implements DynamicFeatureManager {
splitInstallManager = SplitInstallManagerFactory.create(context);
listener = new FeatureInstallStateUpdatedListener();
splitInstallManager.registerListener(listener);
sessionIdToName = new SparseArray<String>();
sessionIdToName = new SparseArray<>();
sessionIdToLoadingUnitId = new SparseIntArray();
}
@@ -294,10 +294,10 @@ public class PlayStoreDynamicFeatureManager implements DynamicFeatureManager {
// performant and robust.
// Search directly in APKs first
List<String> apkPaths = new ArrayList<String>();
List<String> apkPaths = new ArrayList<>();
// If not found in APKs, we check in extracted native libs for the lib directly.
List<String> soPaths = new ArrayList<String>();
Queue<File> searchFiles = new LinkedList<File>();
List<String> soPaths = new ArrayList<>();
Queue<File> searchFiles = new LinkedList<>();
searchFiles.add(context.getFilesDir());
while (!searchFiles.isEmpty()) {
File file = searchFiles.remove();
@@ -317,7 +317,7 @@ public class PlayStoreDynamicFeatureManager implements DynamicFeatureManager {
}
}
List<String> searchPaths = new ArrayList();
List<String> searchPaths = new ArrayList<>();
for (String path : apkPaths) {
searchPaths.add(path + "!lib/" + abi + "/" + aotSharedLibraryName);
}