diff --git a/.gitignore b/.gitignore index bbaecc6..21c7026 100644 --- a/.gitignore +++ b/.gitignore @@ -4,6 +4,7 @@ # # Builds build/ +app/release/ app/src/main/assets/arm64-v8a app/src/main/assets/x86 app/src/main/assets/tcl_aux diff --git a/README b/README new file mode 100644 index 0000000..0e32d7d --- /dev/null +++ b/README @@ -0,0 +1,4 @@ +Privacy Policy +-------------- + +Palantir does not collect any of your personal data. diff --git a/app/build.gradle b/app/build.gradle index 4e4dc4b..a653e56 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -3,28 +3,24 @@ apply plugin: 'com.google.ar.sceneform.plugin' apply plugin: 'org.ajoberstar.grgit' android { - compileSdkVersion 27 + compileSdkVersion 28 defaultConfig { applicationId "io.ningyuan.palantir" // AR Optional apps must declare minSdkVersion >= 14. // AR Required apps must declare minSdkVersion >= 24. minSdkVersion 24 - targetSdkVersion 27 + targetSdkVersion 28 versionCode 1 - versionName "1.0" + versionName "1.0.0" ndk { /* * Sceneform is available for the following ABIs: * 'arm64-v8a', 'armeabi-v7a', 'x86_64' and 'x86'. * Your application should include the ABIs most appropriate to * minimize APK size. Listing 'arm64-v8a' is recommended. - * - * This sample app includes two ABIs: - * 1. 'arm64-v8a' to run on devices - * 2. 'x86' to run in the Android emulator */ - abiFilters 'arm64-v8a', 'x86' + abiFilters 'arm64-v8a' } externalNativeBuild { cmake { @@ -90,8 +86,8 @@ preBuild.dependsOn fetchStrideSrc dependencies { implementation 'ch.acra:acra-dialog:5.4.0' implementation 'ch.acra:acra-mail:5.4.0' - implementation 'com.android.support:appcompat-v7:27.1.1' - implementation 'com.android.support:design:27.1.1' + implementation 'com.android.support:appcompat-v7:28.0.0' + implementation 'com.android.support:design:28.0.0' implementation 'com.google.ar.sceneform.ux:sceneform-ux:1.10.0' implementation 'com.google.ar.sceneform:assets:1.10.0' implementation 'commons-io:commons-io:2.6' diff --git a/app/src/main/java/io/ningyuan/palantir/utils/PdbTitleSearcher.java b/app/src/main/java/io/ningyuan/palantir/utils/PdbTitleSearcher.java index 8ca53d6..6d4c06f 100644 --- a/app/src/main/java/io/ningyuan/palantir/utils/PdbTitleSearcher.java +++ b/app/src/main/java/io/ningyuan/palantir/utils/PdbTitleSearcher.java @@ -31,6 +31,10 @@ public PdbTitleSearcher(PdbSearcher pdbSearcher, CursorAdapter adapter, LinkedLi protected Integer doInBackground(Integer... integers) { int indexToLoad = integers[0]; + if (indexToLoad >= pdbs.size()) { + return indexToLoad + 1; // value doesn't matter, will terminate at onPostExecute + } + try { pdbs.get(indexToLoad).load(); } catch (IOException e) { diff --git a/app/src/main/java/io/ningyuan/palantir/views/SearchView.java b/app/src/main/java/io/ningyuan/palantir/views/SearchView.java index 69cf704..21e2ae2 100644 --- a/app/src/main/java/io/ningyuan/palantir/views/SearchView.java +++ b/app/src/main/java/io/ningyuan/palantir/views/SearchView.java @@ -149,6 +149,7 @@ private void deactivate() { imm.hideSoftInputFromWindow(getWindowToken(), 0); } + pdbSearcher.makeInvalid(); setVisibility(GONE); progressBar.setVisibility(GONE); suggestionAdapter.changeCursor(getEmptyCursor(false)); diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 8236958..cdee41b 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -48,16 +48,11 @@ Click on the bottom-right button to import a 3D model - Failed with IOException: - Done writing cache file from content URI: - Preparing to save cache file from content URI. - - Something went wrong: unable to render the import file. + Something went wrong: unable to render PDB file. Something went wrong: unable to import the requested file. Palantir uses ARCore, which requires OpenGL ES 3.0 or later. Palantir uses ARCore, which requires Android N or later. - You must first import a *.glb file! - Something went wrong: there is no application configured to browse your filesystem. + A PDB must be loaded first! mol addfile %s \n