diff --git a/.travis.yml b/.travis.yml
index 0bbf572f33..e122be3a82 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -14,22 +14,22 @@ branches:
only:
- develop
- master
- - feature/sonarqube-optimizations
+ - /^feature/.*$/
+ - /^hotfix/.*$/
+ - /^release/.*$/
android:
components:
- tools
- tools
- platform-tools
- build-tools-27.0.3
- - android-27
+ - android-23
- extra-google-m2repository
- extra-android-m2repository
licenses:
- android-sdk-preview-license-.+
- android-sdk-license-.+
- google-gdk-license-.+
-before_install:
- - yes | sdkmanager "platforms;android-27"
script:
- ./gradlew clean build jacocoTestReport sonarqube
after_success:
diff --git a/README.md b/README.md
index 3f343c51c7..98b5f52f6a 100644
--- a/README.md
+++ b/README.md
@@ -1,3 +1,8 @@
+ ![icon](etc/logo.png)
+
+Omni-Notes
+==========
+
![SLicense](https://img.shields.io/badge/License-GPLv3-red.svg)
[![Stories in Ready](https://badge.waffle.io/federicoiosue/Omni-Notes.png?label=ready&title=Ready)](https://waffle.io/federicoiosue/Omni-Notes)
[![Stories in In Progress](https://badge.waffle.io/federicoiosue/Omni-Notes.png?label=In%20Progress&title=InProgress)](https://waffle.io/federicoiosue/Omni-Notes)
@@ -6,10 +11,6 @@
[![Codacy Badge](https://api.codacy.com/project/badge/Grade/8ade707d00ef468fa79d3f6b622444b5)](https://www.codacy.com/app/federico-iosue/Omni-Notes?utm_source=github.com&utm_medium=referral&utm_content=federicoiosue/Omni-Notes&utm_campaign=Badge_Grade)
[![GitHub release](https://img.shields.io/github/release/federicoiosue/omni-notes.svg)](https://github.com/federicoiosue/Omni-Notes/releases/latest)
-
-Omni-Notes
-==========
-
Note taking open-source application aimed to have both a simple interface but keeping smart behavior.
The project was inspired by the absence of such applications compatible with old phones and old versions of Android. It aims to provide an attractive look and follow the most recent design guidelines of the Google operating system.
@@ -167,7 +168,7 @@ They're all listed into the [build.gradle](https://github.com/federicoiosue/Omni
You should have received a copy of the GNU General Public License
along with this program. If not, see .
-
+
[2]: https://crowdin.net/project/omni-notes/
[2]: https://crowdin.net/project/omni-notes/
diff --git a/etc/ON_banner_site.png b/etc/ON_banner_site.png
new file mode 100644
index 0000000000..34b4c9ac19
Binary files /dev/null and b/etc/ON_banner_site.png differ
diff --git a/etc/logo.png b/etc/logo.png
index 6b5a1663ef..9410640690 100644
Binary files a/etc/logo.png and b/etc/logo.png differ
diff --git a/etc/logo.svg b/etc/logo.svg
index 3ed90f2808..026f390b56 100644
--- a/etc/logo.svg
+++ b/etc/logo.svg
@@ -11,7 +11,7 @@
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
sodipodi:docname="logo.svg"
- inkscape:version="0.91 r13725"
+ inkscape:version="0.92.2 2405546, 2018-03-11"
version="1.1"
id="svg2"
viewBox="0 0 70.4225 70.4225"
@@ -30,28 +30,39 @@
guidetolerance="10"
inkscape:pageopacity="0"
inkscape:pageshadow="2"
- inkscape:window-width="1557"
- inkscape:window-height="845"
+ inkscape:window-width="1600"
+ inkscape:window-height="813"
id="namedview86"
showgrid="false"
inkscape:zoom="0.70710678"
- inkscape:cx="561.35829"
- inkscape:cy="-436.77726"
- inkscape:window-x="43"
- inkscape:window-y="27"
+ inkscape:cx="198.04025"
+ inkscape:cy="35.357586"
+ inkscape:window-x="0"
+ inkscape:window-y="22"
inkscape:window-maximized="1"
inkscape:current-layer="g4315"
- showguides="false"
+ showguides="true"
inkscape:guide-bbox="true"
- inkscape:snap-global="true">image/svg+xml
\ No newline at end of file
+ id="path4872-9"
+ style="fill:none;fill-opacity:1;stroke:#000000;stroke-width:5.20780706;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
\ No newline at end of file
diff --git a/gradle.properties b/gradle.properties
index 700ee34d3b..925f854e8e 100644
--- a/gradle.properties
+++ b/gradle.properties
@@ -15,8 +15,8 @@
# along with this program. If not, see .
#
-VERSION_NAME=5.5.1
-VERSION_CODE=246
+VERSION_NAME=5.5.2
+VERSION_CODE=247
PACKAGE=it.feio.android.omninotes
MIN_SDK=16
diff --git a/omniNotes/src/main/java/it/feio/android/omninotes/DetailFragment.java b/omniNotes/src/main/java/it/feio/android/omninotes/DetailFragment.java
index 9809106ac4..3eb8d6e148 100644
--- a/omniNotes/src/main/java/it/feio/android/omninotes/DetailFragment.java
+++ b/omniNotes/src/main/java/it/feio/android/omninotes/DetailFragment.java
@@ -450,23 +450,8 @@ private void handleIntents() {
noteTmp.setContent(content);
}
- // Single attachment data
- Uri uri = i.getParcelableExtra(Intent.EXTRA_STREAM);
- // Due to the fact that Google Now passes intent as text but with
- // audio recording attached the case must be handled in specific way
- if (uri != null && !Constants.INTENT_GOOGLE_NOW.equals(i.getAction())) {
- String name = FileHelper.getNameFromUri(mainActivity, uri);
- new AttachmentTask(this, uri, name, this).executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR);
- }
+ importAttachments(i);
- // Multiple attachment data
- ArrayList uris = i.getParcelableArrayListExtra(Intent.EXTRA_STREAM);
- if (uris != null) {
- for (Uri uriSingle : uris) {
- String name = FileHelper.getNameFromUri(mainActivity, uriSingle);
- new AttachmentTask(this, uriSingle, name, this).executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR);
- }
- }
}
if (IntentChecker.checkAction(i, Intent.ACTION_MAIN, Constants.ACTION_WIDGET_SHOW_LIST, Constants
@@ -477,6 +462,26 @@ private void handleIntents() {
i.setAction(null);
}
+ private void importAttachments(Intent i) {
+
+ if (!i.hasExtra(Intent.EXTRA_STREAM)) return;
+
+ if (i.getExtras().get(Intent.EXTRA_STREAM) instanceof Uri) {
+ Uri uri = i.getParcelableExtra(Intent.EXTRA_STREAM);
+ // Google Now passes Intent as text but with audio recording attached the case must be handled like this
+ if (!Constants.INTENT_GOOGLE_NOW.equals(i.getAction())) {
+ String name = FileHelper.getNameFromUri(mainActivity, uri);
+ new AttachmentTask(this, uri, name, this).execute();
+ }
+ } else {
+ ArrayList uris = i.getParcelableArrayListExtra(Intent.EXTRA_STREAM);
+ for (Uri uriSingle :uris) {
+ String name = FileHelper.getNameFromUri(mainActivity, uriSingle);
+ new AttachmentTask(this, uriSingle, name, this).execute();
+ }
+ }
+ }
+
@SuppressLint("NewApi")
private void initViews() {
diff --git a/omniNotes/src/main/java/it/feio/android/omninotes/db/DbHelper.java b/omniNotes/src/main/java/it/feio/android/omninotes/db/DbHelper.java
index 1c53cead2d..186a0fe974 100644
--- a/omniNotes/src/main/java/it/feio/android/omninotes/db/DbHelper.java
+++ b/omniNotes/src/main/java/it/feio/android/omninotes/db/DbHelper.java
@@ -30,6 +30,7 @@
import it.feio.android.omninotes.helpers.NotesHelper;
import it.feio.android.omninotes.models.*;
import it.feio.android.omninotes.utils.*;
+import org.apache.commons.lang.StringEscapeUtils;
import java.io.IOException;
import java.util.*;
@@ -536,6 +537,7 @@ public void emptyTrash() {
* @return Notes list
*/
public List getNotesByPattern(String pattern) {
+ String escapedPattern = StringEscapeUtils.escapeSql(pattern);
int navigation = Navigation.getNavigation();
String whereCondition = " WHERE "
+ KEY_TRASHED + (navigation == Navigation.TRASH ? " IS 1" : " IS NOT 1")
@@ -545,9 +547,9 @@ public List getNotesByPattern(String pattern) {
+ " == 0) " : "")
+ (Navigation.checkNavigation(Navigation.REMINDERS) ? " AND " + KEY_REMINDER + " IS NOT NULL" : "")
+ " AND ("
- + " ( " + KEY_LOCKED + " IS NOT 1 AND (" + KEY_TITLE + " LIKE '%" + pattern + "%' " + " OR " +
- KEY_CONTENT + " LIKE '%" + pattern + "%' ))"
- + " OR ( " + KEY_LOCKED + " = 1 AND " + KEY_TITLE + " LIKE '%" + pattern + "%' )"
+ + " ( " + KEY_LOCKED + " IS NOT 1 AND (" + KEY_TITLE + " LIKE '%" + escapedPattern + "%' " + " OR " +
+ KEY_CONTENT + " LIKE '%" + escapedPattern + "%' ))"
+ + " OR ( " + KEY_LOCKED + " = 1 AND " + KEY_TITLE + " LIKE '%" + escapedPattern + "%' )"
+ ")";
return getNotes(whereCondition, true);
}
diff --git a/omniNotes/src/main/res/raw/changelog.xml b/omniNotes/src/main/res/raw/changelog.xml
index 8a55808eb9..d32020eb0a 100644
--- a/omniNotes/src/main/res/raw/changelog.xml
+++ b/omniNotes/src/main/res/raw/changelog.xml
@@ -17,6 +17,10 @@
-->
+
+ [u]Fix[/u] Various minor fixes
+
+
[i]Improved![/i] Updated translations
[u]Fix[/u] Attachments' dialog opening on Kitkat