ApkFacetConfiguration implements FacetConfiguration { @NotNull public Collection<String> getDebugSymbolFolderPaths(@NotNull List<Abi> abis) { if (NATIVE_LIBRARIES.isEmpty() || abis.isEmpty()) { return Collections.emptyList(); } Set<String> paths = new HashSet<>(); for (Abi abi : abis) { for (NativeLibrary library : NATIVE_LIBRARIES) { DebuggableSharedObjectFile sharedObjectFile = library.debuggableSharedObjectFilesByAbi.get(abi); if (sharedObjectFile != null) { File path = toSystemDependentPath(sharedObjectFile.path); if (path.exists()) { paths.add(path.getParent()); } } } } if (paths.isEmpty()) { return Collections.emptyList(); } return paths; }  @Override FacetEditorTab[] createEditorTabs(FacetEditorContext editorContext, FacetValidatorsManager validatorsManager); @NotNull Collection<String> getDebugSymbolFolderPaths(@NotNull List<Abi> abis); @NotNull Map<File, File> getExplicitModuleSymbolMap(@NotNull final Abi abi); @NotNull Map<String, String> getSymbolFolderPathMappings(); @Override void readExternal(@NotNull Element element); @Override void writeExternal(@NotNull Element element); @NotNull List<NativeLibrary> getLibrariesWithoutDebugSymbols(); void removeIssues(@NotNull String category); @NonNls public String APK_PATH; @NonNls public String APP_PACKAGE; @NotNull public List<SetupIssue> SETUP_ISSUES; @NotNull public List<NativeLibrary> NATIVE_LIBRARIES; @NotNull public Set<String> JAVA_SOURCE_FOLDER_PATHS; }
@Test public void getDebugSymbolFolderPaths() throws Exception { myTemporaryFolder.create(); File x86Folder = myTemporaryFolder.newFolder(Abi.X86.toString()); File armeabiV7aFolder = myTemporaryFolder.newFolder("armeabiV7a"); File x86_64 = myTemporaryFolder.newFolder("x86_64"); File testX86File = createFile(x86Folder, "test.so"); File testArmeabiV7aFile = createFile(armeabiV7aFolder, "test.so"); NativeLibrary testLibrary = new NativeLibrary("test.so"); DebuggableSharedObjectFile testSoFile = new DebuggableSharedObjectFile(); testSoFile.path = testX86File.getPath(); testLibrary.debuggableSharedObjectFilesByAbi.put(Abi.X86, testSoFile); testSoFile = new DebuggableSharedObjectFile(); testSoFile.path = testArmeabiV7aFile.getPath(); testLibrary.debuggableSharedObjectFilesByAbi.put(Abi.ARMEABI_V7A, testSoFile); myConfiguration.NATIVE_LIBRARIES.add(testLibrary); File debugX86File = createFile(x86Folder, "debub.so"); File debugX86_64File = createFile(x86_64, "debug.so"); NativeLibrary debugLibrary = new NativeLibrary("test.so"); DebuggableSharedObjectFile debugSoFile = new DebuggableSharedObjectFile(); debugSoFile.path = debugX86File.getPath(); debugLibrary.debuggableSharedObjectFilesByAbi.put(Abi.X86, debugSoFile); debugSoFile = new DebuggableSharedObjectFile(); debugSoFile.path = debugX86_64File.getPath(); debugLibrary.debuggableSharedObjectFilesByAbi.put(Abi.X86_64, debugSoFile); myConfiguration.NATIVE_LIBRARIES.add(debugLibrary); Collection<String> paths = myConfiguration.getDebugSymbolFolderPaths(Arrays.asList(Abi.X86, Abi.ARMEABI_V7A)); assertThat(paths).containsExactly(x86Folder.getPath(), armeabiV7aFolder.getPath()); }