diff --git a/.gitignore b/.gitignore
index 988df778c..5b4928353 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,6 +1,38 @@
-bin/**
.classpath
*.swp
.settings
+
+# https://github.com/github/gitignore/blob/master/Gradle.gitignore
+.gradle/
+build/
+# Ignore Gradle GUI config
+gradle-app.setting
+
+# https://github.com/github/gitignore/blob/master/Android.gitignore
+# Built application files
+*.apk
+*.ap_
+
+# Files for the Dalvik VM
+*.dex
+
+# Java class files
+*.class
+
+# Generated files
+bin/
+gen/
+
+# Local configuration file (sdk path, etc)
local.properties
-gen
+
+# Proguard folder generated by Eclipse
+proguard/
+
+# Log Files
+*.log
+
+*.iml
+.idea
+
+import-summary.txt
diff --git a/.gitmodules b/.gitmodules
deleted file mode 100644
index 7ddaefe68..000000000
--- a/.gitmodules
+++ /dev/null
@@ -1,10 +0,0 @@
-[submodule "libs/minidns"]
- path = libs/minidns
- url = https://github.com/rtreffer/minidns.git
-
-[submodule "libs/openpgp-api-lib"]
- path = libs/openpgp-api-lib
- url = https://github.com/open-keychain/openpgp-api-lib.git
-[submodule "libs/MemorizingTrustManager"]
- path = libs/MemorizingTrustManager
- url = https://github.com/iNPUTmice/MemorizingTrustManager.git
diff --git a/.project b/.project
deleted file mode 100644
index 72617463c..000000000
--- a/.project
+++ /dev/null
@@ -1,33 +0,0 @@
-
-
- Conversations
-
-
-
-
-
- com.android.ide.eclipse.adt.ResourceManagerBuilder
-
-
-
-
- com.android.ide.eclipse.adt.PreCompilerBuilder
-
-
-
-
- org.eclipse.jdt.core.javabuilder
-
-
-
-
- com.android.ide.eclipse.adt.ApkBuilder
-
-
-
-
-
- com.android.ide.eclipse.adt.AndroidNature
- org.eclipse.jdt.core.javanature
-
-
diff --git a/README.md b/README.md
index c28d7e422..ed8a48af3 100644
--- a/README.md
+++ b/README.md
@@ -271,9 +271,26 @@ Make sure to have ANDROID_HOME point to your Android SDK
git clone https://github.com/siacs/Conversations.git
cd Conversations
- git submodule update --init --recursive
- ant clean
- ant debug
+ ./gradlew build
+
+### How do I update/add external libraries?
+
+If the library you want to update is in Maven Central or JCenter (or has its own
+Maven repo), add it or update its version in `build.gradle`. If the library is
+in the `libs/` directory, you can update it using a subtree merge by doing the
+following (using `minidns` as an example):
+
+ git remote add minidns https://github.com/rtreffer/minidns.git
+ git fetch minidns
+ git merge -s subtree minidns master
+
+To add a new dependency to the `libs/` directory (replacing "name", "branch" and
+"url" as necessary):
+
+ git remote add name url
+ git merge -s ours --no-commit name/branch
+ git read-tree --prefix=libs/name -u name/branch
+ git commit -m "Subtree merged in name"
#### How do I debug Conversations
diff --git a/build.gradle b/build.gradle
new file mode 100644
index 000000000..68b1b2f2f
--- /dev/null
+++ b/build.gradle
@@ -0,0 +1,118 @@
+// Top-level build file where you can add configuration options common to all
+// sub-projects/modules.
+buildscript {
+ repositories {
+ jcenter()
+ mavenCentral()
+ }
+ dependencies {
+ classpath 'com.android.tools.build:gradle:0.12.2'
+ }
+}
+
+allprojects {
+ repositories {
+ jcenter()
+ mavenCentral()
+ }
+}
+
+apply plugin: 'com.android.application'
+
+repositories {
+ jcenter()
+ mavenCentral()
+ maven {
+ url "http://jitsi.github.com/otr4j/repository/"
+ }
+}
+
+dependencies {
+ compile project(':libs/minidns')
+ compile project(':libs/openpgp-api-lib')
+ compile project(':libs/MemorizingTrustManager')
+ compile 'com.android.support:support-v13:19.1.0'
+ compile 'org.bouncycastle:bcprov-jdk15on:1.50'
+ compile 'net.java:otr4j:0.21'
+ compile fileTree(dir: 'libs', include: ['*.jar'])
+}
+
+android {
+ compileSdkVersion 19
+ buildToolsVersion "19.1"
+
+ defaultConfig {
+ minSdkVersion 14
+ targetSdkVersion 19
+ versionCode 32
+ versionName "0.8-alpha"
+ }
+
+ compileOptions {
+ sourceCompatibility JavaVersion.VERSION_1_7
+ targetCompatibility JavaVersion.VERSION_1_7
+ }
+
+ //
+ // To sign release builds, create the file `gradle.properties` in
+ // $HOME/.gradle or in your project directory with this content:
+ //
+ // mStoreFile=/path/to/key.store
+ // mStorePassword=xxx
+ // mKeyAlias=alias
+ // mKeyPassword=xxx
+ //
+ if (project.hasProperty('mStoreFile') &&
+ project.hasProperty('mStorePassword') &&
+ project.hasProperty('mKeyAlias') &&
+ project.hasProperty('mKeyPassword')) {
+ signingConfigs {
+ release {
+ storeFile file(mStoreFile)
+ storePassword mStorePassword
+ keyAlias mKeyAlias
+ keyPassword mKeyPassword
+ }
+ }
+ buildTypes.release.signingConfig = signingConfigs.release
+ } else {
+ buildTypes.release.signingConfig = null
+ }
+
+ buildTypes {
+ release {
+ runProguard true
+ proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
+ }
+ applicationVariants.all { variant ->
+ def fileName = variant.packageApplication.outputFile.name.replace(".apk",
+ "-" + defaultConfig.versionName + ".apk")
+ variant.packageApplication.outputFile = new
+ File(variant.packageApplication.outputFile.parent, fileName)
+ if (variant.zipAlign) {
+ if (variant.name.equals('release')) {
+ variant.outputFile = new File(variant.outputFile.parent,
+ rootProject.name + "-" + defaultConfig.versionName + ".apk")
+ }
+ }
+ }
+ }
+
+ lintOptions {
+ disable 'MissingTranslation', 'InvalidPackage'
+ }
+
+ subprojects {
+
+ afterEvaluate {
+ if (getPlugins().hasPlugin('android') ||
+ getPlugins().hasPlugin('android-library')) {
+
+ configure(android.lintOptions) {
+ disable 'AndroidGradlePluginVersion', 'MissingTranslation'
+ }
+ }
+
+ }
+ }
+}
diff --git a/custom_rules.xml b/custom_rules.xml
deleted file mode 100644
index f7b0378a6..000000000
--- a/custom_rules.xml
+++ /dev/null
@@ -1,28 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar
new file mode 100644
index 000000000..8c0fb64a8
Binary files /dev/null and b/gradle/wrapper/gradle-wrapper.jar differ
diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties
new file mode 100644
index 000000000..1e61d1fd3
--- /dev/null
+++ b/gradle/wrapper/gradle-wrapper.properties
@@ -0,0 +1,6 @@
+#Wed Apr 10 15:27:10 PDT 2013
+distributionBase=GRADLE_USER_HOME
+distributionPath=wrapper/dists
+zipStoreBase=GRADLE_USER_HOME
+zipStorePath=wrapper/dists
+distributionUrl=http\://services.gradle.org/distributions/gradle-1.12-all.zip
diff --git a/gradlew b/gradlew
new file mode 100755
index 000000000..91a7e269e
--- /dev/null
+++ b/gradlew
@@ -0,0 +1,164 @@
+#!/usr/bin/env bash
+
+##############################################################################
+##
+## Gradle start up script for UN*X
+##
+##############################################################################
+
+# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
+DEFAULT_JVM_OPTS=""
+
+APP_NAME="Gradle"
+APP_BASE_NAME=`basename "$0"`
+
+# Use the maximum available, or set MAX_FD != -1 to use that value.
+MAX_FD="maximum"
+
+warn ( ) {
+ echo "$*"
+}
+
+die ( ) {
+ echo
+ echo "$*"
+ echo
+ exit 1
+}
+
+# OS specific support (must be 'true' or 'false').
+cygwin=false
+msys=false
+darwin=false
+case "`uname`" in
+ CYGWIN* )
+ cygwin=true
+ ;;
+ Darwin* )
+ darwin=true
+ ;;
+ MINGW* )
+ msys=true
+ ;;
+esac
+
+# For Cygwin, ensure paths are in UNIX format before anything is touched.
+if $cygwin ; then
+ [ -n "$JAVA_HOME" ] && JAVA_HOME=`cygpath --unix "$JAVA_HOME"`
+fi
+
+# Attempt to set APP_HOME
+# Resolve links: $0 may be a link
+PRG="$0"
+# Need this for relative symlinks.
+while [ -h "$PRG" ] ; do
+ ls=`ls -ld "$PRG"`
+ link=`expr "$ls" : '.*-> \(.*\)$'`
+ if expr "$link" : '/.*' > /dev/null; then
+ PRG="$link"
+ else
+ PRG=`dirname "$PRG"`"/$link"
+ fi
+done
+SAVED="`pwd`"
+cd "`dirname \"$PRG\"`/" >&-
+APP_HOME="`pwd -P`"
+cd "$SAVED" >&-
+
+CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
+
+# Determine the Java command to use to start the JVM.
+if [ -n "$JAVA_HOME" ] ; then
+ if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
+ # IBM's JDK on AIX uses strange locations for the executables
+ JAVACMD="$JAVA_HOME/jre/sh/java"
+ else
+ JAVACMD="$JAVA_HOME/bin/java"
+ fi
+ if [ ! -x "$JAVACMD" ] ; then
+ die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
+
+Please set the JAVA_HOME variable in your environment to match the
+location of your Java installation."
+ fi
+else
+ JAVACMD="java"
+ which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
+
+Please set the JAVA_HOME variable in your environment to match the
+location of your Java installation."
+fi
+
+# Increase the maximum file descriptors if we can.
+if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then
+ MAX_FD_LIMIT=`ulimit -H -n`
+ if [ $? -eq 0 ] ; then
+ if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
+ MAX_FD="$MAX_FD_LIMIT"
+ fi
+ ulimit -n $MAX_FD
+ if [ $? -ne 0 ] ; then
+ warn "Could not set maximum file descriptor limit: $MAX_FD"
+ fi
+ else
+ warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
+ fi
+fi
+
+# For Darwin, add options to specify how the application appears in the dock
+if $darwin; then
+ GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
+fi
+
+# For Cygwin, switch paths to Windows format before running java
+if $cygwin ; then
+ APP_HOME=`cygpath --path --mixed "$APP_HOME"`
+ CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
+
+ # We build the pattern for arguments to be converted via cygpath
+ ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
+ SEP=""
+ for dir in $ROOTDIRSRAW ; do
+ ROOTDIRS="$ROOTDIRS$SEP$dir"
+ SEP="|"
+ done
+ OURCYGPATTERN="(^($ROOTDIRS))"
+ # Add a user-defined pattern to the cygpath arguments
+ if [ "$GRADLE_CYGPATTERN" != "" ] ; then
+ OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
+ fi
+ # Now convert the arguments - kludge to limit ourselves to /bin/sh
+ i=0
+ for arg in "$@" ; do
+ CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
+ CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
+
+ if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
+ eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
+ else
+ eval `echo args$i`="\"$arg\""
+ fi
+ i=$((i+1))
+ done
+ case $i in
+ (0) set -- ;;
+ (1) set -- "$args0" ;;
+ (2) set -- "$args0" "$args1" ;;
+ (3) set -- "$args0" "$args1" "$args2" ;;
+ (4) set -- "$args0" "$args1" "$args2" "$args3" ;;
+ (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
+ (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
+ (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
+ (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
+ (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
+ esac
+fi
+
+# Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules
+function splitJvmOpts() {
+ JVM_OPTS=("$@")
+}
+eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS
+JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME"
+
+exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@"
diff --git a/gradlew.bat b/gradlew.bat
new file mode 100644
index 000000000..aec99730b
--- /dev/null
+++ b/gradlew.bat
@@ -0,0 +1,90 @@
+@if "%DEBUG%" == "" @echo off
+@rem ##########################################################################
+@rem
+@rem Gradle startup script for Windows
+@rem
+@rem ##########################################################################
+
+@rem Set local scope for the variables with windows NT shell
+if "%OS%"=="Windows_NT" setlocal
+
+@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
+set DEFAULT_JVM_OPTS=
+
+set DIRNAME=%~dp0
+if "%DIRNAME%" == "" set DIRNAME=.
+set APP_BASE_NAME=%~n0
+set APP_HOME=%DIRNAME%
+
+@rem Find java.exe
+if defined JAVA_HOME goto findJavaFromJavaHome
+
+set JAVA_EXE=java.exe
+%JAVA_EXE% -version >NUL 2>&1
+if "%ERRORLEVEL%" == "0" goto init
+
+echo.
+echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
+echo.
+echo Please set the JAVA_HOME variable in your environment to match the
+echo location of your Java installation.
+
+goto fail
+
+:findJavaFromJavaHome
+set JAVA_HOME=%JAVA_HOME:"=%
+set JAVA_EXE=%JAVA_HOME%/bin/java.exe
+
+if exist "%JAVA_EXE%" goto init
+
+echo.
+echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
+echo.
+echo Please set the JAVA_HOME variable in your environment to match the
+echo location of your Java installation.
+
+goto fail
+
+:init
+@rem Get command-line arguments, handling Windowz variants
+
+if not "%OS%" == "Windows_NT" goto win9xME_args
+if "%@eval[2+2]" == "4" goto 4NT_args
+
+:win9xME_args
+@rem Slurp the command line arguments.
+set CMD_LINE_ARGS=
+set _SKIP=2
+
+:win9xME_args_slurp
+if "x%~1" == "x" goto execute
+
+set CMD_LINE_ARGS=%*
+goto execute
+
+:4NT_args
+@rem Get arguments from the 4NT Shell from JP Software
+set CMD_LINE_ARGS=%$
+
+:execute
+@rem Setup the command line
+
+set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
+
+@rem Execute Gradle
+"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
+
+:end
+@rem End local scope for the variables with windows NT shell
+if "%ERRORLEVEL%"=="0" goto mainEnd
+
+:fail
+rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
+rem the _cmd.exe /c_ return code!
+if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
+exit /b 1
+
+:mainEnd
+if "%OS%"=="Windows_NT" endlocal
+
+:omega
diff --git a/libs/MemorizingTrustManager b/libs/MemorizingTrustManager
deleted file mode 160000
index fad835037..000000000
--- a/libs/MemorizingTrustManager
+++ /dev/null
@@ -1 +0,0 @@
-Subproject commit fad835037adc1bd313bb56b694426fca4eb67346
diff --git a/libs/MemorizingTrustManager/.gitignore b/libs/MemorizingTrustManager/.gitignore
new file mode 100644
index 000000000..c642de10f
--- /dev/null
+++ b/libs/MemorizingTrustManager/.gitignore
@@ -0,0 +1,11 @@
+bin
+build
+gen
+local.properties
+example/bin
+example/gen
+tags
+.project
+.classpath
+.gradle
+.*.swp
diff --git a/libs/MemorizingTrustManager/AndroidManifest.xml b/libs/MemorizingTrustManager/AndroidManifest.xml
new file mode 100644
index 000000000..c125afe42
--- /dev/null
+++ b/libs/MemorizingTrustManager/AndroidManifest.xml
@@ -0,0 +1,11 @@
+
+
+
+
+
+
+
diff --git a/libs/MemorizingTrustManager/LICENSE.txt b/libs/MemorizingTrustManager/LICENSE.txt
new file mode 100644
index 000000000..25012507a
--- /dev/null
+++ b/libs/MemorizingTrustManager/LICENSE.txt
@@ -0,0 +1,21 @@
+The MIT license.
+
+Copyright (c) 2010 Georg Lukas
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
diff --git a/libs/MemorizingTrustManager/README.mdwn b/libs/MemorizingTrustManager/README.mdwn
new file mode 100644
index 000000000..c48f38de3
--- /dev/null
+++ b/libs/MemorizingTrustManager/README.mdwn
@@ -0,0 +1,125 @@
+# MemorizingTrustManager - Private Cloud Support for Your App
+
+MemorizingTrustManager (MTM) is a project to enable smarter and more secure use
+of SSL on Android. If it encounters an unknown SSL certificate, it asks the
+user whether to accept the certificate once, permanently or to abort the
+connection. This is a step in preventing man-in-the-middle attacks by blindly
+accepting any invalid, self-signed and/or expired certificates.
+
+MTM is aimed at providing seamless integration into your Android application,
+and the source code is available under the MIT license.
+
+## Screenshots
+
+![MemorizingTrustManager dialog](mtm-screenshot.png)
+![MemorizingTrustManager notification](mtm-notification.png)
+![MemorizingTrustManager server name dialog](mtm-servername.png)
+
+## Status
+
+MemorizingTrustManager is in production use in the
+[yaxim XMPP client](https://yaxim.org/). It is usable and easy to integrate,
+though it does not yet support hostname validation (the Java API makes it
+**hard** to integrate).
+
+## Integration
+
+MTM is easy to integrate into your own application. Follow these steps or have
+a look into the demo application in the `example` directory.
+
+### 1. Add MTM to your project
+
+Download the MTM source from GitHub, or add it as a
+[git submodule](http://git-scm.com/docs/git-submodule):
+
+ # plain download:
+ git clone https://github.com/ge0rg/MemorizingTrustManager
+ # submodule:
+ git submodule add https://github.com/ge0rg/MemorizingTrustManager
+
+Then add a library project dependency to `default.properties`:
+
+ android.library.reference.1=MemorizingTrustManager
+
+### 2. Add the MTM (popup) Activity to your manifest
+
+Edit your `AndroidManifest.xml` and add the MTM activity element right before the
+end of your closing `` tag.
+
+ ...
+
+
+
+
+### 3. Hook MTM as the default TrustManager for your connection type
+
+Hooking MemorizingTrustmanager in HTTPS connections:
+
+ // register MemorizingTrustManager for HTTPS
+ SSLContext sc = SSLContext.getInstance("TLS");
+ MemorizingTrustManager mtm = new MemorizingTrustManager(this);
+ sc.init(null, new X509TrustManager[] { mtm }, new java.security.SecureRandom());
+ HttpsURLConnection.setDefaultSSLSocketFactory(sc.getSocketFactory());
+ HttpsURLConnection.setDefaultHostnameVerifier(
+ mtm.wrapHostnameVerifier(HttpsURLConnection.getDefaultHostnameVerifier()));
+
+
+Or, for aSmack you can use `setCustomSSLContext()`:
+
+ org.jivesoftware.smack.ConnectionConfiguration connectionConfiguration = …
+ SSLContext sc = SSLContext.getInstance("TLS");
+ MemorizingTrustManager mtm = new MemorizingTrustManager(this);
+ sc.init(null, new X509TrustManager[] { mtm }, new java.security.SecureRandom());
+ connectionConfiguration.setCustomSSLContext(sc);
+ connectionConfiguration.setHostnameVerifier(
+ mtm.wrapHostnameVerifier(new org.apache.http.conn.ssl.StrictHostnameVerifier()));
+
+By default, MTM falls back to the system `TrustManager` before asking the user.
+If you do not trust the establishment, you can enforce a dialog on *every new
+connection* by supplying a `defaultTrustManager = null` parameter to the
+constructor:
+
+ MemorizingTrustManager mtm = new MemorizingTrustManager(this, null);
+
+If you want to use a different underlying `TrustManager`, like
+[AndroidPinning](https://github.com/moxie0/AndroidPinning), just supply that to
+MTM's constructor:
+
+ X509TrustManager pinning = new PinningTrustManager(SystemKeyStore.getInstance(),
+ new String[] {"f30012bbc18c231ac1a44b788e410ce754182513"}, 0);
+ MemorizingTrustManager mtm = new MemorizingTrustManager(this, pinning);
+
+### 4. Profit!
+
+### Logging
+
+MTM uses java.util.logging (JUL) for logging purposes. If you have not
+configured a Handler for JUL, then Android will by default log all
+messages of Level.INFO or higher. In order to get also the debug log
+messages (those with Level.FINE or lower) you need to configure a
+Handler accordingly. The MTM example project contains
+de.duenndns.mtmexample.JULHandler, which allows to enable and disable
+debug logging at runtime.
+
+## Alternatives
+
+MemorizingTrustManager is not the only one out there.
+
+[**NetCipher**](https://guardianproject.info/code/netcipher/) is an Android
+library made by the [Guardian Project](https://guardianproject.info/) to
+improve network security for mobile apps. It comes with a StrongTrustManager
+to do more thorough certificate checks, an independent Root CA store, and code
+to easily route your traffic through
+[the Tor network](https://www.torproject.org/) using [Orbot](https://guardianproject.info/apps/orbot/).
+
+[**AndroidPinning**](https://github.com/moxie0/AndroidPinning) is another Android
+library, written by [Moxie Marlinspike](http://www.thoughtcrime.org/) to allow
+pinning of server certificates, improving security against government-scale
+MitM attacks. Use this if your app is made to communicate with a specific
+server!
+
+## Contribute
+
+Please [help translating MTM into more languages](https://translations.launchpad.net/yaxim/master/+pots/mtm/)!
diff --git a/libs/MemorizingTrustManager/ant.properties b/libs/MemorizingTrustManager/ant.properties
new file mode 100644
index 000000000..ee52d86d9
--- /dev/null
+++ b/libs/MemorizingTrustManager/ant.properties
@@ -0,0 +1,17 @@
+# This file is used to override default values used by the Ant build system.
+#
+# This file must be checked in Version Control Systems, as it is
+# integral to the build system of your project.
+
+# This file is only used by the Ant script.
+
+# You can use this to override default values such as
+# 'source.dir' for the location of your java source folder and
+# 'out.dir' for the location of your output folder.
+
+# You can also use it define how the release builds are signed by declaring
+# the following properties:
+# 'key.store' for the location of your keystore and
+# 'key.alias' for the name of the key to use.
+# The password will be asked during the build when you use the 'release' target.
+
diff --git a/libs/MemorizingTrustManager/build.gradle b/libs/MemorizingTrustManager/build.gradle
new file mode 100644
index 000000000..aa022a938
--- /dev/null
+++ b/libs/MemorizingTrustManager/build.gradle
@@ -0,0 +1,32 @@
+buildscript {
+ repositories {
+ mavenCentral()
+ }
+ dependencies {
+ classpath 'com.android.tools.build:gradle:0.7.+'
+ }
+}
+
+apply plugin: 'android-library'
+
+android {
+ compileSdkVersion 19
+ buildToolsVersion "19.1"
+ defaultConfig {
+ minSdkVersion 7
+ targetSdkVersion 19
+ }
+
+ sourceSets {
+ main {
+ manifest.srcFile 'AndroidManifest.xml'
+ java.srcDirs = ['src']
+ resources.srcDirs = ['src']
+ aidl.srcDirs = ['src']
+ renderscript.srcDirs = ['src']
+ res.srcDirs = ['res']
+ assets.srcDirs = ['assets']
+ }
+ }
+
+}
diff --git a/libs/MemorizingTrustManager/build.xml b/libs/MemorizingTrustManager/build.xml
new file mode 100644
index 000000000..06cf485c1
--- /dev/null
+++ b/libs/MemorizingTrustManager/build.xml
@@ -0,0 +1,92 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/libs/MemorizingTrustManager/example/AndroidManifest.xml b/libs/MemorizingTrustManager/example/AndroidManifest.xml
new file mode 100644
index 000000000..cdc0450b3
--- /dev/null
+++ b/libs/MemorizingTrustManager/example/AndroidManifest.xml
@@ -0,0 +1,29 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/libs/MemorizingTrustManager/example/ant.properties b/libs/MemorizingTrustManager/example/ant.properties
new file mode 100644
index 000000000..27fcaadd8
--- /dev/null
+++ b/libs/MemorizingTrustManager/example/ant.properties
@@ -0,0 +1,18 @@
+# This file is used to override default values used by the Ant build system.
+#
+# This file must be checked in Version Control Systems, as it is
+# integral to the build system of your project.
+
+# This file is only used by the Ant script.
+
+# You can use this to override default values such as
+# 'source.dir' for the location of your java source folder and
+# 'out.dir' for the location of your output folder.
+
+# You can also use it define how the release builds are signed by declaring
+# the following properties:
+# 'key.store' for the location of your keystore and
+# 'key.alias' for the name of the key to use.
+# The password will be asked during the build when you use the 'release' target.
+
+application.package=de.duenndns.mtmexample
diff --git a/libs/MemorizingTrustManager/example/build.gradle b/libs/MemorizingTrustManager/example/build.gradle
new file mode 100644
index 000000000..00bfe99e2
--- /dev/null
+++ b/libs/MemorizingTrustManager/example/build.gradle
@@ -0,0 +1,23 @@
+apply plugin: 'android'
+
+dependencies {
+ compile rootProject
+}
+
+android {
+ compileSdkVersion 19
+ buildToolsVersion "19.1"
+ defaultConfig {
+ minSdkVersion 7
+ targetSdkVersion 19
+ }
+
+ sourceSets {
+ main {
+ manifest.srcFile 'AndroidManifest.xml'
+ java.srcDirs = ['src']
+ res.srcDirs = ['res']
+ }
+ }
+
+}
diff --git a/build.xml b/libs/MemorizingTrustManager/example/build.xml
similarity index 98%
rename from build.xml
rename to libs/MemorizingTrustManager/example/build.xml
index 2571750ad..cdc74917d 100644
--- a/build.xml
+++ b/libs/MemorizingTrustManager/example/build.xml
@@ -1,5 +1,5 @@
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/libs/openpgp-api-lib/proguard-project.txt b/libs/openpgp-api-lib/proguard-project.txt
new file mode 100644
index 000000000..f2fe1559a
--- /dev/null
+++ b/libs/openpgp-api-lib/proguard-project.txt
@@ -0,0 +1,20 @@
+# To enable ProGuard in your project, edit project.properties
+# to define the proguard.config property as described in that file.
+#
+# Add project specific ProGuard rules here.
+# By default, the flags in this file are appended to flags specified
+# in ${sdk.dir}/tools/proguard/proguard-android.txt
+# You can edit the include path and order by changing the ProGuard
+# include property in project.properties.
+#
+# For more details, see
+# http://developer.android.com/guide/developing/tools/proguard.html
+
+# Add any project specific keep options here:
+
+# If your project uses WebView with JS, uncomment the following
+# and specify the fully qualified class name to the JavaScript interface
+# class:
+#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
+# public *;
+#}
diff --git a/project.properties b/libs/openpgp-api-lib/project.properties
similarity index 79%
rename from project.properties
rename to libs/openpgp-api-lib/project.properties
index 7276fb94d..91d2b0246 100644
--- a/project.properties
+++ b/libs/openpgp-api-lib/project.properties
@@ -12,6 +12,4 @@
# Project target.
target=android-19
-android.library.reference.1=libs/minidns
-android.library.reference.2=libs/openpgp-api-lib
-android.library.reference.3=libs/MemorizingTrustManager
+android.library=true
diff --git a/libs/openpgp-api-lib/res/drawable-hdpi/ic_action_cancel_launchersize.png b/libs/openpgp-api-lib/res/drawable-hdpi/ic_action_cancel_launchersize.png
new file mode 100644
index 000000000..71b9118dc
Binary files /dev/null and b/libs/openpgp-api-lib/res/drawable-hdpi/ic_action_cancel_launchersize.png differ
diff --git a/libs/openpgp-api-lib/res/drawable-hdpi/ic_action_cancel_launchersize_light.png b/libs/openpgp-api-lib/res/drawable-hdpi/ic_action_cancel_launchersize_light.png
new file mode 100644
index 000000000..73b1d08f3
Binary files /dev/null and b/libs/openpgp-api-lib/res/drawable-hdpi/ic_action_cancel_launchersize_light.png differ
diff --git a/libs/openpgp-api-lib/res/drawable-mdpi/ic_action_cancel_launchersize.png b/libs/openpgp-api-lib/res/drawable-mdpi/ic_action_cancel_launchersize.png
new file mode 100644
index 000000000..270abf45f
Binary files /dev/null and b/libs/openpgp-api-lib/res/drawable-mdpi/ic_action_cancel_launchersize.png differ
diff --git a/libs/openpgp-api-lib/res/drawable-mdpi/ic_action_cancel_launchersize_light.png b/libs/openpgp-api-lib/res/drawable-mdpi/ic_action_cancel_launchersize_light.png
new file mode 100644
index 000000000..d841821c8
Binary files /dev/null and b/libs/openpgp-api-lib/res/drawable-mdpi/ic_action_cancel_launchersize_light.png differ
diff --git a/libs/openpgp-api-lib/res/drawable-xhdpi/ic_action_cancel_launchersize.png b/libs/openpgp-api-lib/res/drawable-xhdpi/ic_action_cancel_launchersize.png
new file mode 100644
index 000000000..1e3571fa5
Binary files /dev/null and b/libs/openpgp-api-lib/res/drawable-xhdpi/ic_action_cancel_launchersize.png differ
diff --git a/libs/openpgp-api-lib/res/drawable-xhdpi/ic_action_cancel_launchersize_light.png b/libs/openpgp-api-lib/res/drawable-xhdpi/ic_action_cancel_launchersize_light.png
new file mode 100644
index 000000000..d505046b4
Binary files /dev/null and b/libs/openpgp-api-lib/res/drawable-xhdpi/ic_action_cancel_launchersize_light.png differ
diff --git a/libs/openpgp-api-lib/res/drawable-xxhdpi/ic_action_cancel_launchersize.png b/libs/openpgp-api-lib/res/drawable-xxhdpi/ic_action_cancel_launchersize.png
new file mode 100644
index 000000000..52044601e
Binary files /dev/null and b/libs/openpgp-api-lib/res/drawable-xxhdpi/ic_action_cancel_launchersize.png differ
diff --git a/libs/openpgp-api-lib/res/drawable-xxhdpi/ic_action_cancel_launchersize_light.png b/libs/openpgp-api-lib/res/drawable-xxhdpi/ic_action_cancel_launchersize_light.png
new file mode 100644
index 000000000..d6fb86bdd
Binary files /dev/null and b/libs/openpgp-api-lib/res/drawable-xxhdpi/ic_action_cancel_launchersize_light.png differ
diff --git a/libs/openpgp-api-lib/res/values-cs/strings.xml b/libs/openpgp-api-lib/res/values-cs/strings.xml
new file mode 100644
index 000000000..c9fe1fab7
--- /dev/null
+++ b/libs/openpgp-api-lib/res/values-cs/strings.xml
@@ -0,0 +1,5 @@
+
+
+ Žádný
+ Instalovat OpenKeychain pomocí %s
+
diff --git a/libs/openpgp-api-lib/res/values-de/strings.xml b/libs/openpgp-api-lib/res/values-de/strings.xml
new file mode 100644
index 000000000..91e800adb
--- /dev/null
+++ b/libs/openpgp-api-lib/res/values-de/strings.xml
@@ -0,0 +1,5 @@
+
+
+ Keine Auswahl
+ Installiere OpenKeychain mit %s
+
diff --git a/libs/openpgp-api-lib/res/values-es/strings.xml b/libs/openpgp-api-lib/res/values-es/strings.xml
new file mode 100644
index 000000000..da8979b45
--- /dev/null
+++ b/libs/openpgp-api-lib/res/values-es/strings.xml
@@ -0,0 +1,5 @@
+
+
+ Ninguno
+ Instalar OpenKeychain mediante %s
+
diff --git a/libs/openpgp-api-lib/res/values-et/strings.xml b/libs/openpgp-api-lib/res/values-et/strings.xml
new file mode 100644
index 000000000..c757504ac
--- /dev/null
+++ b/libs/openpgp-api-lib/res/values-et/strings.xml
@@ -0,0 +1,2 @@
+
+
diff --git a/libs/openpgp-api-lib/res/values-fi/strings.xml b/libs/openpgp-api-lib/res/values-fi/strings.xml
new file mode 100644
index 000000000..c757504ac
--- /dev/null
+++ b/libs/openpgp-api-lib/res/values-fi/strings.xml
@@ -0,0 +1,2 @@
+
+
diff --git a/libs/openpgp-api-lib/res/values-fr/strings.xml b/libs/openpgp-api-lib/res/values-fr/strings.xml
new file mode 100644
index 000000000..9b36df2df
--- /dev/null
+++ b/libs/openpgp-api-lib/res/values-fr/strings.xml
@@ -0,0 +1,5 @@
+
+
+ Aucun
+ Installer OpenKeychain par %s
+
diff --git a/libs/openpgp-api-lib/res/values-is/strings.xml b/libs/openpgp-api-lib/res/values-is/strings.xml
new file mode 100644
index 000000000..c757504ac
--- /dev/null
+++ b/libs/openpgp-api-lib/res/values-is/strings.xml
@@ -0,0 +1,2 @@
+
+
diff --git a/libs/openpgp-api-lib/res/values-it/strings.xml b/libs/openpgp-api-lib/res/values-it/strings.xml
new file mode 100644
index 000000000..23e8e8013
--- /dev/null
+++ b/libs/openpgp-api-lib/res/values-it/strings.xml
@@ -0,0 +1,5 @@
+
+
+ Nessuno
+ Installa OpenKeychain via %s
+
diff --git a/libs/openpgp-api-lib/res/values-ja/strings.xml b/libs/openpgp-api-lib/res/values-ja/strings.xml
new file mode 100644
index 000000000..5e337f5ab
--- /dev/null
+++ b/libs/openpgp-api-lib/res/values-ja/strings.xml
@@ -0,0 +1,5 @@
+
+
+ 無し
+ %s 経由でOpenKeychainをインストール
+
diff --git a/libs/openpgp-api-lib/res/values-nl/strings.xml b/libs/openpgp-api-lib/res/values-nl/strings.xml
new file mode 100644
index 000000000..c757504ac
--- /dev/null
+++ b/libs/openpgp-api-lib/res/values-nl/strings.xml
@@ -0,0 +1,2 @@
+
+
diff --git a/libs/openpgp-api-lib/res/values-pl/strings.xml b/libs/openpgp-api-lib/res/values-pl/strings.xml
new file mode 100644
index 000000000..c757504ac
--- /dev/null
+++ b/libs/openpgp-api-lib/res/values-pl/strings.xml
@@ -0,0 +1,2 @@
+
+
diff --git a/libs/openpgp-api-lib/res/values-pt/strings.xml b/libs/openpgp-api-lib/res/values-pt/strings.xml
new file mode 100644
index 000000000..c757504ac
--- /dev/null
+++ b/libs/openpgp-api-lib/res/values-pt/strings.xml
@@ -0,0 +1,2 @@
+
+
diff --git a/libs/openpgp-api-lib/res/values-ru/strings.xml b/libs/openpgp-api-lib/res/values-ru/strings.xml
new file mode 100644
index 000000000..e8fd1ddf6
--- /dev/null
+++ b/libs/openpgp-api-lib/res/values-ru/strings.xml
@@ -0,0 +1,5 @@
+
+
+ Нет
+ Установить OpenKeychain через %s
+
diff --git a/libs/openpgp-api-lib/res/values-sl/strings.xml b/libs/openpgp-api-lib/res/values-sl/strings.xml
new file mode 100644
index 000000000..20bf70b0a
--- /dev/null
+++ b/libs/openpgp-api-lib/res/values-sl/strings.xml
@@ -0,0 +1,5 @@
+
+
+ Brez
+ Namesti OpenKeychain prek %s
+
diff --git a/libs/openpgp-api-lib/res/values-tr/strings.xml b/libs/openpgp-api-lib/res/values-tr/strings.xml
new file mode 100644
index 000000000..c757504ac
--- /dev/null
+++ b/libs/openpgp-api-lib/res/values-tr/strings.xml
@@ -0,0 +1,2 @@
+
+
diff --git a/libs/openpgp-api-lib/res/values-uk/strings.xml b/libs/openpgp-api-lib/res/values-uk/strings.xml
new file mode 100644
index 000000000..baf600a9f
--- /dev/null
+++ b/libs/openpgp-api-lib/res/values-uk/strings.xml
@@ -0,0 +1,5 @@
+
+
+ Жоден
+ Встановити OpenKeychain через %s
+
diff --git a/libs/openpgp-api-lib/res/values-zh/strings.xml b/libs/openpgp-api-lib/res/values-zh/strings.xml
new file mode 100644
index 000000000..c757504ac
--- /dev/null
+++ b/libs/openpgp-api-lib/res/values-zh/strings.xml
@@ -0,0 +1,2 @@
+
+
diff --git a/libs/openpgp-api-lib/res/values/strings.xml b/libs/openpgp-api-lib/res/values/strings.xml
new file mode 100644
index 000000000..0119831cc
--- /dev/null
+++ b/libs/openpgp-api-lib/res/values/strings.xml
@@ -0,0 +1,7 @@
+
+
+
+ None
+ Install OpenKeychain via %s
+
+
\ No newline at end of file
diff --git a/libs/openpgp-api-lib/src/org/openintents/openpgp/IOpenPgpService.aidl b/libs/openpgp-api-lib/src/org/openintents/openpgp/IOpenPgpService.aidl
new file mode 100644
index 000000000..7ee79d6ab
--- /dev/null
+++ b/libs/openpgp-api-lib/src/org/openintents/openpgp/IOpenPgpService.aidl
@@ -0,0 +1,24 @@
+/*
+ * Copyright (C) 2014 Dominik Schürmann
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.openintents.openpgp;
+
+interface IOpenPgpService {
+
+ // see OpenPgpApi for documentation
+ Intent execute(in Intent data, in ParcelFileDescriptor input, in ParcelFileDescriptor output);
+
+}
\ No newline at end of file
diff --git a/libs/openpgp-api-lib/src/org/openintents/openpgp/OpenPgpError.java b/libs/openpgp-api-lib/src/org/openintents/openpgp/OpenPgpError.java
new file mode 100644
index 000000000..b894a4609
--- /dev/null
+++ b/libs/openpgp-api-lib/src/org/openintents/openpgp/OpenPgpError.java
@@ -0,0 +1,118 @@
+/*
+ * Copyright (C) 2014 Dominik Schürmann
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.openintents.openpgp;
+
+import android.os.Parcel;
+import android.os.Parcelable;
+
+/**
+ * Parcelable versioning has been copied from Dashclock Widget
+ * https://code.google.com/p/dashclock/source/browse/api/src/main/java/com/google/android/apps/dashclock/api/ExtensionData.java
+ */
+public class OpenPgpError implements Parcelable {
+ /**
+ * Since there might be a case where new versions of the client using the library getting
+ * old versions of the protocol (and thus old versions of this class), we need a versioning
+ * system for the parcels sent between the clients and the providers.
+ */
+ public static final int PARCELABLE_VERSION = 1;
+
+ // possible values for errorId
+ public static final int CLIENT_SIDE_ERROR = -1;
+ public static final int GENERIC_ERROR = 0;
+ public static final int INCOMPATIBLE_API_VERSIONS = 1;
+ public static final int NO_OR_WRONG_PASSPHRASE = 2;
+ public static final int NO_USER_IDS = 3;
+
+ int errorId;
+ String message;
+
+ public OpenPgpError() {
+ }
+
+ public OpenPgpError(int errorId, String message) {
+ this.errorId = errorId;
+ this.message = message;
+ }
+
+ public OpenPgpError(OpenPgpError b) {
+ this.errorId = b.errorId;
+ this.message = b.message;
+ }
+
+ public int getErrorId() {
+ return errorId;
+ }
+
+ public void setErrorId(int errorId) {
+ this.errorId = errorId;
+ }
+
+ public String getMessage() {
+ return message;
+ }
+
+ public void setMessage(String message) {
+ this.message = message;
+ }
+
+ public int describeContents() {
+ return 0;
+ }
+
+ public void writeToParcel(Parcel dest, int flags) {
+ /**
+ * NOTE: When adding fields in the process of updating this API, make sure to bump
+ * {@link #PARCELABLE_VERSION}.
+ */
+ dest.writeInt(PARCELABLE_VERSION);
+ // Inject a placeholder that will store the parcel size from this point on
+ // (not including the size itself).
+ int sizePosition = dest.dataPosition();
+ dest.writeInt(0);
+ int startPosition = dest.dataPosition();
+ // version 1
+ dest.writeInt(errorId);
+ dest.writeString(message);
+ // Go back and write the size
+ int parcelableSize = dest.dataPosition() - startPosition;
+ dest.setDataPosition(sizePosition);
+ dest.writeInt(parcelableSize);
+ dest.setDataPosition(startPosition + parcelableSize);
+ }
+
+ public static final Creator CREATOR = new Creator() {
+ public OpenPgpError createFromParcel(final Parcel source) {
+ int parcelableVersion = source.readInt();
+ int parcelableSize = source.readInt();
+ int startPosition = source.dataPosition();
+
+ OpenPgpError error = new OpenPgpError();
+ error.errorId = source.readInt();
+ error.message = source.readString();
+
+ // skip over all fields added in future versions of this parcel
+ source.setDataPosition(startPosition + parcelableSize);
+
+ return error;
+ }
+
+ public OpenPgpError[] newArray(final int size) {
+ return new OpenPgpError[size];
+ }
+ };
+}
diff --git a/libs/openpgp-api-lib/src/org/openintents/openpgp/OpenPgpMetadata.java b/libs/openpgp-api-lib/src/org/openintents/openpgp/OpenPgpMetadata.java
new file mode 100644
index 000000000..2a99e406f
--- /dev/null
+++ b/libs/openpgp-api-lib/src/org/openintents/openpgp/OpenPgpMetadata.java
@@ -0,0 +1,132 @@
+/*
+ * Copyright (C) 2014 Dominik Schürmann
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.openintents.openpgp;
+
+import android.os.Parcel;
+import android.os.Parcelable;
+
+/**
+ * Parcelable versioning has been copied from Dashclock Widget
+ * https://code.google.com/p/dashclock/source/browse/api/src/main/java/com/google/android/apps/dashclock/api/ExtensionData.java
+ */
+public class OpenPgpMetadata implements Parcelable {
+ /**
+ * Since there might be a case where new versions of the client using the library getting
+ * old versions of the protocol (and thus old versions of this class), we need a versioning
+ * system for the parcels sent between the clients and the providers.
+ */
+ public static final int PARCELABLE_VERSION = 1;
+
+ String filename;
+ String mimeType;
+ long modificationTime;
+ long originalSize;
+
+ public String getFilename() {
+ return filename;
+ }
+
+ public String getMimeType() {
+ return mimeType;
+ }
+
+ public long getModificationTime() {
+ return modificationTime;
+ }
+
+ public long getOriginalSize() {
+ return originalSize;
+ }
+
+ public OpenPgpMetadata() {
+ }
+
+ public OpenPgpMetadata(String filename, String mimeType, long modificationTime,
+ long originalSize) {
+ this.filename = filename;
+ this.mimeType = mimeType;
+ this.modificationTime = modificationTime;
+ this.originalSize = originalSize;
+ }
+
+ public OpenPgpMetadata(OpenPgpMetadata b) {
+ this.filename = b.filename;
+ this.mimeType = b.mimeType;
+ this.modificationTime = b.modificationTime;
+ this.originalSize = b.originalSize;
+ }
+
+ public int describeContents() {
+ return 0;
+ }
+
+ public void writeToParcel(Parcel dest, int flags) {
+ /**
+ * NOTE: When adding fields in the process of updating this API, make sure to bump
+ * {@link #PARCELABLE_VERSION}.
+ */
+ dest.writeInt(PARCELABLE_VERSION);
+ // Inject a placeholder that will store the parcel size from this point on
+ // (not including the size itself).
+ int sizePosition = dest.dataPosition();
+ dest.writeInt(0);
+ int startPosition = dest.dataPosition();
+ // version 1
+ dest.writeString(filename);
+ dest.writeString(mimeType);
+ dest.writeLong(modificationTime);
+ dest.writeLong(originalSize);
+ // Go back and write the size
+ int parcelableSize = dest.dataPosition() - startPosition;
+ dest.setDataPosition(sizePosition);
+ dest.writeInt(parcelableSize);
+ dest.setDataPosition(startPosition + parcelableSize);
+ }
+
+ public static final Creator CREATOR = new Creator() {
+ public OpenPgpMetadata createFromParcel(final Parcel source) {
+ int parcelableVersion = source.readInt();
+ int parcelableSize = source.readInt();
+ int startPosition = source.dataPosition();
+
+ OpenPgpMetadata vr = new OpenPgpMetadata();
+ vr.filename = source.readString();
+ vr.mimeType = source.readString();
+ vr.modificationTime = source.readLong();
+ vr.originalSize = source.readLong();
+
+ // skip over all fields added in future versions of this parcel
+ source.setDataPosition(startPosition + parcelableSize);
+
+ return vr;
+ }
+
+ public OpenPgpMetadata[] newArray(final int size) {
+ return new OpenPgpMetadata[size];
+ }
+ };
+
+ @Override
+ public String toString() {
+ String out = "\nfilename: " + filename;
+ out += "\nmimeType: " + mimeType;
+ out += "\nmodificationTime: " + modificationTime;
+ out += "\noriginalSize: " + originalSize;
+ return out;
+ }
+
+}
diff --git a/libs/openpgp-api-lib/src/org/openintents/openpgp/OpenPgpSignatureResult.java b/libs/openpgp-api-lib/src/org/openintents/openpgp/OpenPgpSignatureResult.java
new file mode 100644
index 000000000..dbcd74b64
--- /dev/null
+++ b/libs/openpgp-api-lib/src/org/openintents/openpgp/OpenPgpSignatureResult.java
@@ -0,0 +1,183 @@
+/*
+ * Copyright (C) 2014 Dominik Schürmann
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.openintents.openpgp;
+
+import android.os.Parcel;
+import android.os.Parcelable;
+
+import org.openintents.openpgp.util.OpenPgpUtils;
+
+import java.util.ArrayList;
+import java.util.Locale;
+
+/**
+ * Parcelable versioning has been copied from Dashclock Widget
+ * https://code.google.com/p/dashclock/source/browse/api/src/main/java/com/google/android/apps/dashclock/api/ExtensionData.java
+ */
+public class OpenPgpSignatureResult implements Parcelable {
+ /**
+ * Since there might be a case where new versions of the client using the library getting
+ * old versions of the protocol (and thus old versions of this class), we need a versioning
+ * system for the parcels sent between the clients and the providers.
+ */
+ public static final int PARCELABLE_VERSION = 2;
+
+ // generic error on signature verification
+ public static final int SIGNATURE_ERROR = 0;
+ // successfully verified signature, with certified key
+ public static final int SIGNATURE_SUCCESS_CERTIFIED = 1;
+ // no key was found for this signature verification
+ public static final int SIGNATURE_KEY_MISSING = 2;
+ // successfully verified signature, but with uncertified key
+ public static final int SIGNATURE_SUCCESS_UNCERTIFIED = 3;
+ // key has been revoked
+ public static final int SIGNATURE_KEY_REVOKED = 4;
+ // key is expired
+ public static final int SIGNATURE_KEY_EXPIRED = 5;
+
+ int status;
+ boolean signatureOnly;
+ String primaryUserId;
+ ArrayList userIds;
+ long keyId;
+
+ public int getStatus() {
+ return status;
+ }
+
+ public void setStatus(int status) {
+ this.status = status;
+ }
+
+ public boolean isSignatureOnly() {
+ return signatureOnly;
+ }
+
+ public void setSignatureOnly(boolean signatureOnly) {
+ this.signatureOnly = signatureOnly;
+ }
+
+ public String getPrimaryUserId() {
+ return primaryUserId;
+ }
+
+ public void setPrimaryUserId(String primaryUserId) {
+ this.primaryUserId = primaryUserId;
+ }
+
+ public ArrayList getUserIds() {
+ return userIds;
+ }
+
+ public void setUserIds(ArrayList userIds) {
+ this.userIds = userIds;
+ }
+
+ public long getKeyId() {
+ return keyId;
+ }
+
+ public void setKeyId(long keyId) {
+ this.keyId = keyId;
+ }
+
+ public OpenPgpSignatureResult() {
+
+ }
+
+ public OpenPgpSignatureResult(int signatureStatus, String signatureUserId,
+ boolean signatureOnly, long keyId, ArrayList userIds) {
+ this.status = signatureStatus;
+ this.signatureOnly = signatureOnly;
+ this.primaryUserId = signatureUserId;
+ this.keyId = keyId;
+ this.userIds = userIds;
+ }
+
+ public OpenPgpSignatureResult(OpenPgpSignatureResult b) {
+ this.status = b.status;
+ this.primaryUserId = b.primaryUserId;
+ this.signatureOnly = b.signatureOnly;
+ this.keyId = b.keyId;
+ this.userIds = b.userIds;
+ }
+
+ public int describeContents() {
+ return 0;
+ }
+
+ public void writeToParcel(Parcel dest, int flags) {
+ /**
+ * NOTE: When adding fields in the process of updating this API, make sure to bump
+ * {@link #PARCELABLE_VERSION}.
+ */
+ dest.writeInt(PARCELABLE_VERSION);
+ // Inject a placeholder that will store the parcel size from this point on
+ // (not including the size itself).
+ int sizePosition = dest.dataPosition();
+ dest.writeInt(0);
+ int startPosition = dest.dataPosition();
+ // version 1
+ dest.writeInt(status);
+ dest.writeByte((byte) (signatureOnly ? 1 : 0));
+ dest.writeString(primaryUserId);
+ dest.writeLong(keyId);
+ // version 2
+ dest.writeStringList(userIds);
+ // Go back and write the size
+ int parcelableSize = dest.dataPosition() - startPosition;
+ dest.setDataPosition(sizePosition);
+ dest.writeInt(parcelableSize);
+ dest.setDataPosition(startPosition + parcelableSize);
+ }
+
+ public static final Creator CREATOR = new Creator() {
+ public OpenPgpSignatureResult createFromParcel(final Parcel source) {
+ int parcelableVersion = source.readInt();
+ int parcelableSize = source.readInt();
+ int startPosition = source.dataPosition();
+
+ OpenPgpSignatureResult vr = new OpenPgpSignatureResult();
+ vr.status = source.readInt();
+ vr.signatureOnly = source.readByte() == 1;
+ vr.primaryUserId = source.readString();
+ vr.keyId = source.readLong();
+ vr.userIds = new ArrayList();
+ source.readStringList(vr.userIds);
+
+ // skip over all fields added in future versions of this parcel
+ source.setDataPosition(startPosition + parcelableSize);
+
+ return vr;
+ }
+
+ public OpenPgpSignatureResult[] newArray(final int size) {
+ return new OpenPgpSignatureResult[size];
+ }
+ };
+
+ @Override
+ public String toString() {
+ String out = "\nstatus: " + status;
+ out += "\nprimaryUserId: " + primaryUserId;
+ out += "\nuserIds: " + userIds;
+ out += "\nsignatureOnly: " + signatureOnly;
+ out += "\nkeyId: " + OpenPgpUtils.convertKeyIdToHex(keyId);
+ return out;
+ }
+
+}
diff --git a/libs/openpgp-api-lib/src/org/openintents/openpgp/util/OpenPgpApi.java b/libs/openpgp-api-lib/src/org/openintents/openpgp/util/OpenPgpApi.java
new file mode 100644
index 000000000..3e18ab0cf
--- /dev/null
+++ b/libs/openpgp-api-lib/src/org/openintents/openpgp/util/OpenPgpApi.java
@@ -0,0 +1,306 @@
+/*
+ * Copyright (C) 2014 Dominik Schürmann
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.openintents.openpgp.util;
+
+import android.annotation.TargetApi;
+import android.content.Context;
+import android.content.Intent;
+import android.os.AsyncTask;
+import android.os.Build;
+import android.os.ParcelFileDescriptor;
+import android.util.Log;
+
+import org.openintents.openpgp.IOpenPgpService;
+import org.openintents.openpgp.OpenPgpError;
+
+import java.io.InputStream;
+import java.io.OutputStream;
+
+public class OpenPgpApi {
+
+ public static final String TAG = "OpenPgp API";
+
+ public static final String SERVICE_INTENT = "org.openintents.openpgp.IOpenPgpService";
+
+ /**
+ * Version history
+ * ---------------
+ *
+ * 3:
+ * - first public stable version
+ *
+ * 4:
+ * - No changes to existing methods -> backward compatible
+ * - Introduction of ACTION_DECRYPT_METADATA, RESULT_METADATA, EXTRA_ORIGINAL_FILENAME, and OpenPgpMetadata parcel
+ * - Introduction of internal NFC extras: EXTRA_NFC_SIGNED_HASH, EXTRA_NFC_SIG_CREATION_TIMESTAMP
+ * 5:
+ * - OpenPgpSignatureResult: new consts SIGNATURE_KEY_REVOKED and SIGNATURE_KEY_EXPIRED
+ * - OpenPgpSignatureResult: ArrayList userIds
+ */
+ public static final int API_VERSION = 5;
+
+ /**
+ * General extras
+ * --------------
+ *
+ * required extras:
+ * int EXTRA_API_VERSION (always required)
+ *
+ * returned extras:
+ * int RESULT_CODE (RESULT_CODE_ERROR, RESULT_CODE_SUCCESS or RESULT_CODE_USER_INTERACTION_REQUIRED)
+ * OpenPgpError RESULT_ERROR (if RESULT_CODE == RESULT_CODE_ERROR)
+ * PendingIntent RESULT_INTENT (if RESULT_CODE == RESULT_CODE_USER_INTERACTION_REQUIRED)
+ */
+
+ /**
+ * Sign only
+ *
+ * optional extras:
+ * boolean EXTRA_REQUEST_ASCII_ARMOR (request ascii armor for output)
+ * String EXTRA_PASSPHRASE (key passphrase)
+ */
+ public static final String ACTION_SIGN = "org.openintents.openpgp.action.SIGN";
+
+ /**
+ * Encrypt
+ *
+ * required extras:
+ * String[] EXTRA_USER_IDS (=emails of recipients, if more than one key has a user_id, a PendingIntent is returned via RESULT_INTENT)
+ * or
+ * long[] EXTRA_KEY_IDS
+ *
+ * optional extras:
+ * boolean EXTRA_REQUEST_ASCII_ARMOR (request ascii armor for output)
+ * String EXTRA_PASSPHRASE (key passphrase)
+ * String EXTRA_ORIGINAL_FILENAME (original filename to be encrypted as metadata)
+ */
+ public static final String ACTION_ENCRYPT = "org.openintents.openpgp.action.ENCRYPT";
+
+ /**
+ * Sign and encrypt
+ *
+ * required extras:
+ * String[] EXTRA_USER_IDS (=emails of recipients, if more than one key has a user_id, a PendingIntent is returned via RESULT_INTENT)
+ * or
+ * long[] EXTRA_KEY_IDS
+ *
+ * optional extras:
+ * boolean EXTRA_REQUEST_ASCII_ARMOR (request ascii armor for output)
+ * String EXTRA_PASSPHRASE (key passphrase)
+ * String EXTRA_ORIGINAL_FILENAME (original filename to be encrypted as metadata)
+ */
+ public static final String ACTION_SIGN_AND_ENCRYPT = "org.openintents.openpgp.action.SIGN_AND_ENCRYPT";
+
+ /**
+ * Decrypts and verifies given input stream. This methods handles encrypted-only, signed-and-encrypted,
+ * and also signed-only input.
+ *
+ * If OpenPgpSignatureResult.getStatus() == OpenPgpSignatureResult.SIGNATURE_KEY_MISSING
+ * in addition a PendingIntent is returned via RESULT_INTENT to download missing keys.
+ *
+ * optional extras:
+ * boolean EXTRA_REQUEST_ASCII_ARMOR (request ascii armor for output)
+ *
+ * returned extras:
+ * OpenPgpSignatureResult RESULT_SIGNATURE
+ * OpenPgpDecryptMetadata RESULT_METADATA
+ */
+ public static final String ACTION_DECRYPT_VERIFY = "org.openintents.openpgp.action.DECRYPT_VERIFY";
+
+ /**
+ * Decrypts the header of an encrypted file to retrieve metadata such as original filename.
+ *
+ * This does not decrypt the actual content of the file.
+ *
+ * returned extras:
+ * OpenPgpDecryptMetadata RESULT_METADATA
+ */
+ public static final String ACTION_DECRYPT_METADATA = "org.openintents.openpgp.action.DECRYPT_METADATA";
+
+ /**
+ * Get key ids based on given user ids (=emails)
+ *
+ * required extras:
+ * String[] EXTRA_USER_IDS
+ *
+ * returned extras:
+ * long[] RESULT_KEY_IDS
+ */
+ public static final String ACTION_GET_KEY_IDS = "org.openintents.openpgp.action.GET_KEY_IDS";
+
+ /**
+ * This action returns RESULT_CODE_SUCCESS if the OpenPGP Provider already has the key
+ * corresponding to the given key id in its database.
+ *
+ * It returns RESULT_CODE_USER_INTERACTION_REQUIRED if the Provider does not have the key.
+ * The PendingIntent from RESULT_INTENT can be used to retrieve those from a keyserver.
+ *
+ * required extras:
+ * long EXTRA_KEY_ID
+ */
+ public static final String ACTION_GET_KEY = "org.openintents.openpgp.action.GET_KEY";
+
+ /* Intent extras */
+ public static final String EXTRA_API_VERSION = "api_version";
+
+ public static final String EXTRA_ACCOUNT_NAME = "account_name";
+
+ // SIGN, ENCRYPT, SIGN_AND_ENCRYPT, DECRYPT_VERIFY
+ // request ASCII Armor for output
+ // OpenPGP Radix-64, 33 percent overhead compared to binary, see http://tools.ietf.org/html/rfc4880#page-53)
+ public static final String EXTRA_REQUEST_ASCII_ARMOR = "ascii_armor";
+
+ // ENCRYPT, SIGN_AND_ENCRYPT
+ public static final String EXTRA_USER_IDS = "user_ids";
+ public static final String EXTRA_KEY_IDS = "key_ids";
+ // optional extras:
+ public static final String EXTRA_PASSPHRASE = "passphrase";
+ public static final String EXTRA_ORIGINAL_FILENAME = "original_filename";
+
+ // internal NFC states
+ public static final String EXTRA_NFC_SIGNED_HASH = "nfc_signed_hash";
+ public static final String EXTRA_NFC_SIG_CREATION_TIMESTAMP = "nfc_sig_creation_timestamp";
+ public static final String EXTRA_NFC_DECRYPTED_SESSION_KEY = "nfc_decrypted_session_key";
+
+ // GET_KEY
+ public static final String EXTRA_KEY_ID = "key_id";
+ public static final String RESULT_KEY_IDS = "key_ids";
+
+ /* Service Intent returns */
+ public static final String RESULT_CODE = "result_code";
+
+ // get actual error object from RESULT_ERROR
+ public static final int RESULT_CODE_ERROR = 0;
+ // success!
+ public static final int RESULT_CODE_SUCCESS = 1;
+ // get PendingIntent from RESULT_INTENT, start PendingIntent with startIntentSenderForResult,
+ // and execute service method again in onActivityResult
+ public static final int RESULT_CODE_USER_INTERACTION_REQUIRED = 2;
+
+ public static final String RESULT_ERROR = "error";
+ public static final String RESULT_INTENT = "intent";
+
+ // DECRYPT_VERIFY
+ public static final String RESULT_SIGNATURE = "signature";
+ public static final String RESULT_METADATA = "metadata";
+
+ IOpenPgpService mService;
+ Context mContext;
+
+ public OpenPgpApi(Context context, IOpenPgpService service) {
+ this.mContext = context;
+ this.mService = service;
+ }
+
+ public interface IOpenPgpCallback {
+ void onReturn(final Intent result);
+ }
+
+ private class OpenPgpAsyncTask extends AsyncTask {
+ Intent data;
+ InputStream is;
+ OutputStream os;
+ IOpenPgpCallback callback;
+
+ private OpenPgpAsyncTask(Intent data, InputStream is, OutputStream os, IOpenPgpCallback callback) {
+ this.data = data;
+ this.is = is;
+ this.os = os;
+ this.callback = callback;
+ }
+
+ @Override
+ protected Intent doInBackground(Void... unused) {
+ return executeApi(data, is, os);
+ }
+
+ protected void onPostExecute(Intent result) {
+ callback.onReturn(result);
+ }
+
+ }
+
+ @TargetApi(Build.VERSION_CODES.HONEYCOMB)
+ public void executeApiAsync(Intent data, InputStream is, OutputStream os, IOpenPgpCallback callback) {
+ OpenPgpAsyncTask task = new OpenPgpAsyncTask(data, is, os, callback);
+
+ // don't serialize async tasks!
+ // http://commonsware.com/blog/2012/04/20/asynctask-threading-regression-confirmed.html
+ if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB) {
+ task.executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR, (Void[]) null);
+ } else {
+ task.execute((Void[]) null);
+ }
+ }
+
+ public Intent executeApi(Intent data, InputStream is, OutputStream os) {
+ try {
+ data.putExtra(EXTRA_API_VERSION, OpenPgpApi.API_VERSION);
+
+ Intent result;
+
+ // pipe the input and output
+ ParcelFileDescriptor input = null;
+ if (is != null) {
+ input = ParcelFileDescriptorUtil.pipeFrom(is,
+ new ParcelFileDescriptorUtil.IThreadListener() {
+
+ @Override
+ public void onThreadFinished(Thread thread) {
+ //Log.d(OpenPgpApi.TAG, "Copy to service finished");
+ }
+ }
+ );
+ }
+ ParcelFileDescriptor output = null;
+ if (os != null) {
+ output = ParcelFileDescriptorUtil.pipeTo(os,
+ new ParcelFileDescriptorUtil.IThreadListener() {
+
+ @Override
+ public void onThreadFinished(Thread thread) {
+ //Log.d(OpenPgpApi.TAG, "Service finished writing!");
+ }
+ }
+ );
+ }
+
+ // blocks until result is ready
+ result = mService.execute(data, input, output);
+ // close() is required to halt the TransferThread
+ if (output != null) {
+ output.close();
+ }
+ // TODO: close input?
+
+ // set class loader to current context to allow unparcelling
+ // of OpenPgpError and OpenPgpSignatureResult
+ // http://stackoverflow.com/a/3806769
+ result.setExtrasClassLoader(mContext.getClassLoader());
+
+ return result;
+ } catch (Exception e) {
+ Log.e(OpenPgpApi.TAG, "Exception in executeApi call", e);
+ Intent result = new Intent();
+ result.putExtra(RESULT_CODE, RESULT_CODE_ERROR);
+ result.putExtra(RESULT_ERROR,
+ new OpenPgpError(OpenPgpError.CLIENT_SIDE_ERROR, e.getMessage()));
+ return result;
+ }
+ }
+
+}
diff --git a/libs/openpgp-api-lib/src/org/openintents/openpgp/util/OpenPgpListPreference.java b/libs/openpgp-api-lib/src/org/openintents/openpgp/util/OpenPgpListPreference.java
new file mode 100644
index 000000000..cf5864620
--- /dev/null
+++ b/libs/openpgp-api-lib/src/org/openintents/openpgp/util/OpenPgpListPreference.java
@@ -0,0 +1,257 @@
+/*
+ * Copyright (C) 2014 Dominik Schürmann
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.openintents.openpgp.util;
+
+import android.app.AlertDialog.Builder;
+import android.content.Context;
+import android.content.DialogInterface;
+import android.content.Intent;
+import android.content.pm.ResolveInfo;
+import android.content.res.TypedArray;
+import android.graphics.drawable.Drawable;
+import android.net.Uri;
+import android.preference.DialogPreference;
+import android.util.AttributeSet;
+import android.view.View;
+import android.view.ViewGroup;
+import android.widget.ArrayAdapter;
+import android.widget.ListAdapter;
+import android.widget.TextView;
+import org.openintents.openpgp.R;
+
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * Does not extend ListPreference, but is very similar to it!
+ * http://grepcode.com/file_/repository.grepcode.com/java/ext/com.google.android/android/4.4_r1/android/preference/ListPreference.java/?v=source
+ */
+public class OpenPgpListPreference extends DialogPreference {
+ private static final String OPENKEYCHAIN_PACKAGE = "org.sufficientlysecure.keychain";
+ private static final String MARKET_INTENT_URI_BASE = "market://details?id=%s";
+ private static final Intent MARKET_INTENT = new Intent(Intent.ACTION_VIEW, Uri.parse(
+ String.format(MARKET_INTENT_URI_BASE, OPENKEYCHAIN_PACKAGE)));
+
+ private ArrayList mLegacyList = new ArrayList();
+ private ArrayList mList = new ArrayList();
+
+ private String mSelectedPackage;
+
+ public OpenPgpListPreference(Context context, AttributeSet attrs) {
+ super(context, attrs);
+ }
+
+ public OpenPgpListPreference(Context context) {
+ this(context, null);
+ }
+
+ /**
+ * Public method to add new entries for legacy applications
+ *
+ * @param packageName
+ * @param simpleName
+ * @param icon
+ */
+ public void addLegacyProvider(int position, String packageName, String simpleName, Drawable icon) {
+ mLegacyList.add(position, new OpenPgpProviderEntry(packageName, simpleName, icon));
+ }
+
+ @Override
+ protected void onPrepareDialogBuilder(Builder builder) {
+ mList.clear();
+
+ // add "none"-entry
+ mList.add(0, new OpenPgpProviderEntry("",
+ getContext().getString(R.string.openpgp_list_preference_none),
+ getContext().getResources().getDrawable(R.drawable.ic_action_cancel_launchersize)));
+
+ // add all additional (legacy) providers
+ mList.addAll(mLegacyList);
+
+ // search for OpenPGP providers...
+ ArrayList providerList = new ArrayList();
+ Intent intent = new Intent(OpenPgpApi.SERVICE_INTENT);
+ List resInfo = getContext().getPackageManager().queryIntentServices(intent, 0);
+ if (!resInfo.isEmpty()) {
+ for (ResolveInfo resolveInfo : resInfo) {
+ if (resolveInfo.serviceInfo == null)
+ continue;
+
+ String packageName = resolveInfo.serviceInfo.packageName;
+ String simpleName = String.valueOf(resolveInfo.serviceInfo.loadLabel(getContext()
+ .getPackageManager()));
+ Drawable icon = resolveInfo.serviceInfo.loadIcon(getContext().getPackageManager());
+
+ providerList.add(new OpenPgpProviderEntry(packageName, simpleName, icon));
+ }
+ }
+
+ if (providerList.isEmpty()) {
+ // add install links if provider list is empty
+ resInfo = getContext().getPackageManager().queryIntentActivities
+ (MARKET_INTENT, 0);
+ for (ResolveInfo resolveInfo : resInfo) {
+ Intent marketIntent = new Intent(MARKET_INTENT);
+ marketIntent.setPackage(resolveInfo.activityInfo.packageName);
+ Drawable icon = resolveInfo.activityInfo.loadIcon(getContext().getPackageManager());
+ String marketName = String.valueOf(resolveInfo.activityInfo.applicationInfo
+ .loadLabel(getContext().getPackageManager()));
+ String simpleName = String.format(getContext().getString(R.string
+ .openpgp_install_openkeychain_via), marketName);
+ mList.add(new OpenPgpProviderEntry(OPENKEYCHAIN_PACKAGE, simpleName,
+ icon, marketIntent));
+ }
+ } else {
+ // add provider
+ mList.addAll(providerList);
+ }
+
+ // Init ArrayAdapter with OpenPGP Providers
+ ListAdapter adapter = new ArrayAdapter(getContext(),
+ android.R.layout.select_dialog_singlechoice, android.R.id.text1, mList) {
+ public View getView(int position, View convertView, ViewGroup parent) {
+ // User super class to create the View
+ View v = super.getView(position, convertView, parent);
+ TextView tv = (TextView) v.findViewById(android.R.id.text1);
+
+ // Put the image on the TextView
+ tv.setCompoundDrawablesWithIntrinsicBounds(mList.get(position).icon, null,
+ null, null);
+
+ // Add margin between image and text (support various screen densities)
+ int dp10 = (int) (10 * getContext().getResources().getDisplayMetrics().density + 0.5f);
+ tv.setCompoundDrawablePadding(dp10);
+
+ return v;
+ }
+ };
+
+ builder.setSingleChoiceItems(adapter, getIndexOfProviderList(getValue()),
+ new DialogInterface.OnClickListener() {
+
+ @Override
+ public void onClick(DialogInterface dialog, int which) {
+ OpenPgpProviderEntry entry = mList.get(which);
+
+ if (entry.intent != null) {
+ /*
+ * Intents are called as activity
+ *
+ * Current approach is to assume the user installed the app.
+ * If he does not, the selected package is not valid.
+ *
+ * However applications should always consider this could happen,
+ * as the user might remove the currently used OpenPGP app.
+ */
+ getContext().startActivity(entry.intent);
+ }
+
+ mSelectedPackage = entry.packageName;
+
+ /*
+ * Clicking on an item simulates the positive button click, and dismisses
+ * the dialog.
+ */
+ OpenPgpListPreference.this.onClick(dialog, DialogInterface.BUTTON_POSITIVE);
+ dialog.dismiss();
+ }
+ });
+
+ /*
+ * The typical interaction for list-based dialogs is to have click-on-an-item dismiss the
+ * dialog instead of the user having to press 'Ok'.
+ */
+ builder.setPositiveButton(null, null);
+ }
+
+ @Override
+ protected void onDialogClosed(boolean positiveResult) {
+ super.onDialogClosed(positiveResult);
+
+ if (positiveResult && (mSelectedPackage != null)) {
+ if (callChangeListener(mSelectedPackage)) {
+ setValue(mSelectedPackage);
+ }
+ }
+ }
+
+ private int getIndexOfProviderList(String packageName) {
+ for (OpenPgpProviderEntry app : mList) {
+ if (app.packageName.equals(packageName)) {
+ return mList.indexOf(app);
+ }
+ }
+
+ return -1;
+ }
+
+ public void setValue(String packageName) {
+ mSelectedPackage = packageName;
+ persistString(packageName);
+ }
+
+ public String getValue() {
+ return mSelectedPackage;
+ }
+
+ public String getEntry() {
+ return getEntryByValue(mSelectedPackage);
+ }
+
+ @Override
+ protected Object onGetDefaultValue(TypedArray a, int index) {
+ return a.getString(index);
+ }
+
+ @Override
+ protected void onSetInitialValue(boolean restoreValue, Object defaultValue) {
+ setValue(restoreValue ? getPersistedString(mSelectedPackage) : (String) defaultValue);
+ }
+
+ public String getEntryByValue(String packageName) {
+ for (OpenPgpProviderEntry app : mList) {
+ if (app.packageName.equals(packageName)) {
+ return app.simpleName;
+ }
+ }
+
+ return null;
+ }
+
+ private static class OpenPgpProviderEntry {
+ private String packageName;
+ private String simpleName;
+ private Drawable icon;
+ private Intent intent;
+
+ public OpenPgpProviderEntry(String packageName, String simpleName, Drawable icon) {
+ this.packageName = packageName;
+ this.simpleName = simpleName;
+ this.icon = icon;
+ }
+
+ public OpenPgpProviderEntry(String packageName, String simpleName, Drawable icon, Intent intent) {
+ this(packageName, simpleName, icon);
+ this.intent = intent;
+ }
+
+ @Override
+ public String toString() {
+ return simpleName;
+ }
+ }
+}
diff --git a/libs/openpgp-api-lib/src/org/openintents/openpgp/util/OpenPgpServiceConnection.java b/libs/openpgp-api-lib/src/org/openintents/openpgp/util/OpenPgpServiceConnection.java
new file mode 100644
index 000000000..15096d9eb
--- /dev/null
+++ b/libs/openpgp-api-lib/src/org/openintents/openpgp/util/OpenPgpServiceConnection.java
@@ -0,0 +1,124 @@
+/*
+ * Copyright (C) 2014 Dominik Schürmann
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.openintents.openpgp.util;
+
+import android.content.ComponentName;
+import android.content.Context;
+import android.content.Intent;
+import android.content.ServiceConnection;
+import android.os.IBinder;
+
+import org.openintents.openpgp.IOpenPgpService;
+
+public class OpenPgpServiceConnection {
+
+ // callback interface
+ public interface OnBound {
+ public void onBound(IOpenPgpService service);
+
+ public void onError(Exception e);
+ }
+
+ private Context mApplicationContext;
+
+ private IOpenPgpService mService;
+ private String mProviderPackageName;
+
+ private OnBound mOnBoundListener;
+
+ /**
+ * Create new connection
+ *
+ * @param context
+ * @param providerPackageName specify package name of OpenPGP provider,
+ * e.g., "org.sufficientlysecure.keychain"
+ */
+ public OpenPgpServiceConnection(Context context, String providerPackageName) {
+ this.mApplicationContext = context.getApplicationContext();
+ this.mProviderPackageName = providerPackageName;
+ }
+
+ /**
+ * Create new connection with callback
+ *
+ * @param context
+ * @param providerPackageName specify package name of OpenPGP provider,
+ * e.g., "org.sufficientlysecure.keychain"
+ * @param onBoundListener callback, executed when connection to service has been established
+ */
+ public OpenPgpServiceConnection(Context context, String providerPackageName,
+ OnBound onBoundListener) {
+ this(context, providerPackageName);
+ this.mOnBoundListener = onBoundListener;
+ }
+
+ public IOpenPgpService getService() {
+ return mService;
+ }
+
+ public boolean isBound() {
+ return (mService != null);
+ }
+
+ private ServiceConnection mServiceConnection = new ServiceConnection() {
+ public void onServiceConnected(ComponentName name, IBinder service) {
+ mService = IOpenPgpService.Stub.asInterface(service);
+ if (mOnBoundListener != null) {
+ mOnBoundListener.onBound(mService);
+ }
+ }
+
+ public void onServiceDisconnected(ComponentName name) {
+ mService = null;
+ }
+ };
+
+ /**
+ * If not already bound, bind to service!
+ *
+ * @return
+ */
+ public void bindToService() {
+ // if not already bound...
+ if (mService == null) {
+ try {
+ Intent serviceIntent = new Intent(OpenPgpApi.SERVICE_INTENT);
+ // NOTE: setPackage is very important to restrict the intent to this provider only!
+ serviceIntent.setPackage(mProviderPackageName);
+ boolean connect = mApplicationContext.bindService(serviceIntent, mServiceConnection,
+ Context.BIND_AUTO_CREATE);
+ if (!connect) {
+ throw new Exception("bindService() returned false!");
+ }
+ } catch (Exception e) {
+ if (mOnBoundListener != null) {
+ mOnBoundListener.onError(e);
+ }
+ }
+ } else {
+ // already bound, but also inform client about it with callback
+ if (mOnBoundListener != null) {
+ mOnBoundListener.onBound(mService);
+ }
+ }
+ }
+
+ public void unbindFromService() {
+ mApplicationContext.unbindService(mServiceConnection);
+ }
+
+}
diff --git a/libs/openpgp-api-lib/src/org/openintents/openpgp/util/OpenPgpUtils.java b/libs/openpgp-api-lib/src/org/openintents/openpgp/util/OpenPgpUtils.java
new file mode 100644
index 000000000..416b2841b
--- /dev/null
+++ b/libs/openpgp-api-lib/src/org/openintents/openpgp/util/OpenPgpUtils.java
@@ -0,0 +1,76 @@
+/*
+ * Copyright (C) 2014 Dominik Schürmann
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.openintents.openpgp.util;
+
+import java.util.List;
+import java.util.Locale;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
+import android.content.Context;
+import android.content.Intent;
+import android.content.pm.ResolveInfo;
+
+public class OpenPgpUtils {
+
+ public static final Pattern PGP_MESSAGE = Pattern.compile(
+ ".*?(-----BEGIN PGP MESSAGE-----.*?-----END PGP MESSAGE-----).*",
+ Pattern.DOTALL);
+
+ public static final Pattern PGP_SIGNED_MESSAGE = Pattern.compile(
+ ".*?(-----BEGIN PGP SIGNED MESSAGE-----.*?-----BEGIN PGP SIGNATURE-----.*?-----END PGP SIGNATURE-----).*",
+ Pattern.DOTALL);
+
+ public static final int PARSE_RESULT_NO_PGP = -1;
+ public static final int PARSE_RESULT_MESSAGE = 0;
+ public static final int PARSE_RESULT_SIGNED_MESSAGE = 1;
+
+ public static int parseMessage(String message) {
+ Matcher matcherSigned = PGP_SIGNED_MESSAGE.matcher(message);
+ Matcher matcherMessage = PGP_MESSAGE.matcher(message);
+
+ if (matcherMessage.matches()) {
+ return PARSE_RESULT_MESSAGE;
+ } else if (matcherSigned.matches()) {
+ return PARSE_RESULT_SIGNED_MESSAGE;
+ } else {
+ return PARSE_RESULT_NO_PGP;
+ }
+ }
+
+ public static boolean isAvailable(Context context) {
+ Intent intent = new Intent(OpenPgpApi.SERVICE_INTENT);
+ List resInfo = context.getPackageManager().queryIntentServices(intent, 0);
+ if (!resInfo.isEmpty()) {
+ return true;
+ } else {
+ return false;
+ }
+ }
+
+ public static String convertKeyIdToHex(long keyId) {
+ return "0x" + convertKeyIdToHex32bit(keyId >> 32) + convertKeyIdToHex32bit(keyId);
+ }
+
+ private static String convertKeyIdToHex32bit(long keyId) {
+ String hexString = Long.toHexString(keyId & 0xffffffffL).toLowerCase(Locale.ENGLISH);
+ while (hexString.length() < 8) {
+ hexString = "0" + hexString;
+ }
+ return hexString;
+ }
+}
diff --git a/libs/openpgp-api-lib/src/org/openintents/openpgp/util/ParcelFileDescriptorUtil.java b/libs/openpgp-api-lib/src/org/openintents/openpgp/util/ParcelFileDescriptorUtil.java
new file mode 100644
index 000000000..4fd4b39a7
--- /dev/null
+++ b/libs/openpgp-api-lib/src/org/openintents/openpgp/util/ParcelFileDescriptorUtil.java
@@ -0,0 +1,106 @@
+/*
+ * Copyright (C) 2014 Dominik Schürmann
+ * 2013 Florian Schmaus
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.openintents.openpgp.util;
+
+import android.os.ParcelFileDescriptor;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.OutputStream;
+
+/**
+ * Partially based on Stackoverflow: Transfer InputStream to another Service (across process boundaries)
+ **/
+public class ParcelFileDescriptorUtil {
+
+ public interface IThreadListener {
+ void onThreadFinished(final Thread thread);
+ }
+
+ public static ParcelFileDescriptor pipeFrom(InputStream inputStream, IThreadListener listener)
+ throws IOException {
+ ParcelFileDescriptor[] pipe = ParcelFileDescriptor.createPipe();
+ ParcelFileDescriptor readSide = pipe[0];
+ ParcelFileDescriptor writeSide = pipe[1];
+
+ // start the transfer thread
+ new TransferThread(inputStream, new ParcelFileDescriptor.AutoCloseOutputStream(writeSide),
+ listener)
+ .start();
+
+ return readSide;
+ }
+
+ public static ParcelFileDescriptor pipeTo(OutputStream outputStream, IThreadListener listener)
+ throws IOException {
+ ParcelFileDescriptor[] pipe = ParcelFileDescriptor.createPipe();
+ ParcelFileDescriptor readSide = pipe[0];
+ ParcelFileDescriptor writeSide = pipe[1];
+
+ // start the transfer thread
+ new TransferThread(new ParcelFileDescriptor.AutoCloseInputStream(readSide), outputStream,
+ listener)
+ .start();
+
+ return writeSide;
+ }
+
+ static class TransferThread extends Thread {
+ final InputStream mIn;
+ final OutputStream mOut;
+ final IThreadListener mListener;
+
+ TransferThread(InputStream in, OutputStream out, IThreadListener listener) {
+ super("ParcelFileDescriptor Transfer Thread");
+ mIn = in;
+ mOut = out;
+ mListener = listener;
+ setDaemon(true);
+ }
+
+ @Override
+ public void run() {
+ byte[] buf = new byte[1024];
+ int len;
+
+ try {
+ while ((len = mIn.read(buf)) > 0) {
+ mOut.write(buf, 0, len);
+ }
+ mOut.flush(); // just to be safe
+ } catch (IOException e) {
+ //Log.e(OpenPgpApi.TAG, "TransferThread" + getId() + ": writing failed", e);
+ } finally {
+ try {
+ mIn.close();
+ } catch (IOException e) {
+ //Log.e(OpenPgpApi.TAG, "TransferThread" + getId(), e);
+ }
+ try {
+ mOut.close();
+ } catch (IOException e) {
+ //Log.e(OpenPgpApi.TAG, "TransferThread" + getId(), e);
+ }
+ }
+ if (mListener != null) {
+ //Log.d(OpenPgpApi.TAG, "TransferThread " + getId() + " finished!");
+ mListener.onThreadFinished(this);
+ }
+ }
+ }
+}
diff --git a/libs/otr4j-0.10.jar b/libs/otr4j-0.10.jar
deleted file mode 100644
index d4fc3a916..000000000
Binary files a/libs/otr4j-0.10.jar and /dev/null differ
diff --git a/proguard-rules.txt b/proguard-rules.txt
new file mode 100644
index 000000000..f39d07c55
--- /dev/null
+++ b/proguard-rules.txt
@@ -0,0 +1,27 @@
+# Add project specific ProGuard rules here.
+# By default, the flags in this file are appended to flags specified
+# in /home/sam/android-sdk-linux/tools/proguard/proguard-android.txt
+# You can edit the include path and order by changing the ProGuard
+# include property in project.properties.
+#
+# For more details, see
+# http://developer.android.com/guide/developing/tools/proguard.html
+
+# Add any project specific keep options here:
+
+# If your project uses WebView with JS, uncomment the following
+# and specify the fully qualified class name to the JavaScript interface
+# class:
+#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
+# public *;
+#}
+
+-dontwarn javax.naming.**
+
+-keep class * extends java.util.ListResourceBundle {
+ protected Object[][] getContents();
+}
+
+-keepnames class * implements android.os.Parcelable {
+ public static final ** CREATOR;
+}
diff --git a/settings.gradle b/settings.gradle
new file mode 100644
index 000000000..45b0e9e03
--- /dev/null
+++ b/settings.gradle
@@ -0,0 +1,5 @@
+include ':libs/MemorizingTrustManager'
+include ':libs/minidns'
+include ':libs/openpgp-api-lib'
+
+rootProject.name = 'Conversations'
diff --git a/AndroidManifest.xml b/src/main/AndroidManifest.xml
similarity index 96%
rename from AndroidManifest.xml
rename to src/main/AndroidManifest.xml
index da8d38c50..7bde645f4 100644
--- a/AndroidManifest.xml
+++ b/src/main/AndroidManifest.xml
@@ -1,13 +1,7 @@
-
-
+ package="eu.siacs.conversations">
diff --git a/src/eu/siacs/conversations/Config.java b/src/main/java/eu/siacs/conversations/Config.java
similarity index 100%
rename from src/eu/siacs/conversations/Config.java
rename to src/main/java/eu/siacs/conversations/Config.java
diff --git a/src/eu/siacs/conversations/crypto/OtrEngine.java b/src/main/java/eu/siacs/conversations/crypto/OtrEngine.java
similarity index 100%
rename from src/eu/siacs/conversations/crypto/OtrEngine.java
rename to src/main/java/eu/siacs/conversations/crypto/OtrEngine.java
diff --git a/src/eu/siacs/conversations/crypto/PgpEngine.java b/src/main/java/eu/siacs/conversations/crypto/PgpEngine.java
similarity index 100%
rename from src/eu/siacs/conversations/crypto/PgpEngine.java
rename to src/main/java/eu/siacs/conversations/crypto/PgpEngine.java
diff --git a/src/eu/siacs/conversations/entities/AbstractEntity.java b/src/main/java/eu/siacs/conversations/entities/AbstractEntity.java
similarity index 100%
rename from src/eu/siacs/conversations/entities/AbstractEntity.java
rename to src/main/java/eu/siacs/conversations/entities/AbstractEntity.java
diff --git a/src/eu/siacs/conversations/entities/Account.java b/src/main/java/eu/siacs/conversations/entities/Account.java
similarity index 100%
rename from src/eu/siacs/conversations/entities/Account.java
rename to src/main/java/eu/siacs/conversations/entities/Account.java
diff --git a/src/eu/siacs/conversations/entities/Bookmark.java b/src/main/java/eu/siacs/conversations/entities/Bookmark.java
similarity index 100%
rename from src/eu/siacs/conversations/entities/Bookmark.java
rename to src/main/java/eu/siacs/conversations/entities/Bookmark.java
diff --git a/src/eu/siacs/conversations/entities/Contact.java b/src/main/java/eu/siacs/conversations/entities/Contact.java
similarity index 100%
rename from src/eu/siacs/conversations/entities/Contact.java
rename to src/main/java/eu/siacs/conversations/entities/Contact.java
diff --git a/src/eu/siacs/conversations/entities/Conversation.java b/src/main/java/eu/siacs/conversations/entities/Conversation.java
similarity index 100%
rename from src/eu/siacs/conversations/entities/Conversation.java
rename to src/main/java/eu/siacs/conversations/entities/Conversation.java
diff --git a/src/eu/siacs/conversations/entities/Downloadable.java b/src/main/java/eu/siacs/conversations/entities/Downloadable.java
similarity index 100%
rename from src/eu/siacs/conversations/entities/Downloadable.java
rename to src/main/java/eu/siacs/conversations/entities/Downloadable.java
diff --git a/src/eu/siacs/conversations/entities/DownloadableFile.java b/src/main/java/eu/siacs/conversations/entities/DownloadableFile.java
similarity index 100%
rename from src/eu/siacs/conversations/entities/DownloadableFile.java
rename to src/main/java/eu/siacs/conversations/entities/DownloadableFile.java
diff --git a/src/eu/siacs/conversations/entities/ListItem.java b/src/main/java/eu/siacs/conversations/entities/ListItem.java
similarity index 100%
rename from src/eu/siacs/conversations/entities/ListItem.java
rename to src/main/java/eu/siacs/conversations/entities/ListItem.java
diff --git a/src/eu/siacs/conversations/entities/Message.java b/src/main/java/eu/siacs/conversations/entities/Message.java
similarity index 100%
rename from src/eu/siacs/conversations/entities/Message.java
rename to src/main/java/eu/siacs/conversations/entities/Message.java
diff --git a/src/eu/siacs/conversations/entities/MucOptions.java b/src/main/java/eu/siacs/conversations/entities/MucOptions.java
similarity index 100%
rename from src/eu/siacs/conversations/entities/MucOptions.java
rename to src/main/java/eu/siacs/conversations/entities/MucOptions.java
diff --git a/src/eu/siacs/conversations/entities/Presences.java b/src/main/java/eu/siacs/conversations/entities/Presences.java
similarity index 100%
rename from src/eu/siacs/conversations/entities/Presences.java
rename to src/main/java/eu/siacs/conversations/entities/Presences.java
diff --git a/src/eu/siacs/conversations/entities/Roster.java b/src/main/java/eu/siacs/conversations/entities/Roster.java
similarity index 100%
rename from src/eu/siacs/conversations/entities/Roster.java
rename to src/main/java/eu/siacs/conversations/entities/Roster.java
diff --git a/src/eu/siacs/conversations/generator/AbstractGenerator.java b/src/main/java/eu/siacs/conversations/generator/AbstractGenerator.java
similarity index 100%
rename from src/eu/siacs/conversations/generator/AbstractGenerator.java
rename to src/main/java/eu/siacs/conversations/generator/AbstractGenerator.java
diff --git a/src/eu/siacs/conversations/generator/IqGenerator.java b/src/main/java/eu/siacs/conversations/generator/IqGenerator.java
similarity index 100%
rename from src/eu/siacs/conversations/generator/IqGenerator.java
rename to src/main/java/eu/siacs/conversations/generator/IqGenerator.java
diff --git a/src/eu/siacs/conversations/generator/MessageGenerator.java b/src/main/java/eu/siacs/conversations/generator/MessageGenerator.java
similarity index 100%
rename from src/eu/siacs/conversations/generator/MessageGenerator.java
rename to src/main/java/eu/siacs/conversations/generator/MessageGenerator.java
diff --git a/src/eu/siacs/conversations/generator/PresenceGenerator.java b/src/main/java/eu/siacs/conversations/generator/PresenceGenerator.java
similarity index 100%
rename from src/eu/siacs/conversations/generator/PresenceGenerator.java
rename to src/main/java/eu/siacs/conversations/generator/PresenceGenerator.java
diff --git a/src/eu/siacs/conversations/http/HttpConnection.java b/src/main/java/eu/siacs/conversations/http/HttpConnection.java
similarity index 100%
rename from src/eu/siacs/conversations/http/HttpConnection.java
rename to src/main/java/eu/siacs/conversations/http/HttpConnection.java
diff --git a/src/eu/siacs/conversations/http/HttpConnectionManager.java b/src/main/java/eu/siacs/conversations/http/HttpConnectionManager.java
similarity index 100%
rename from src/eu/siacs/conversations/http/HttpConnectionManager.java
rename to src/main/java/eu/siacs/conversations/http/HttpConnectionManager.java
diff --git a/src/eu/siacs/conversations/parser/AbstractParser.java b/src/main/java/eu/siacs/conversations/parser/AbstractParser.java
similarity index 100%
rename from src/eu/siacs/conversations/parser/AbstractParser.java
rename to src/main/java/eu/siacs/conversations/parser/AbstractParser.java
diff --git a/src/eu/siacs/conversations/parser/IqParser.java b/src/main/java/eu/siacs/conversations/parser/IqParser.java
similarity index 100%
rename from src/eu/siacs/conversations/parser/IqParser.java
rename to src/main/java/eu/siacs/conversations/parser/IqParser.java
diff --git a/src/eu/siacs/conversations/parser/MessageParser.java b/src/main/java/eu/siacs/conversations/parser/MessageParser.java
similarity index 100%
rename from src/eu/siacs/conversations/parser/MessageParser.java
rename to src/main/java/eu/siacs/conversations/parser/MessageParser.java
diff --git a/src/eu/siacs/conversations/parser/PresenceParser.java b/src/main/java/eu/siacs/conversations/parser/PresenceParser.java
similarity index 100%
rename from src/eu/siacs/conversations/parser/PresenceParser.java
rename to src/main/java/eu/siacs/conversations/parser/PresenceParser.java
diff --git a/src/eu/siacs/conversations/persistance/DatabaseBackend.java b/src/main/java/eu/siacs/conversations/persistance/DatabaseBackend.java
similarity index 100%
rename from src/eu/siacs/conversations/persistance/DatabaseBackend.java
rename to src/main/java/eu/siacs/conversations/persistance/DatabaseBackend.java
diff --git a/src/eu/siacs/conversations/persistance/FileBackend.java b/src/main/java/eu/siacs/conversations/persistance/FileBackend.java
similarity index 100%
rename from src/eu/siacs/conversations/persistance/FileBackend.java
rename to src/main/java/eu/siacs/conversations/persistance/FileBackend.java
diff --git a/src/eu/siacs/conversations/persistance/OnPhoneContactsMerged.java b/src/main/java/eu/siacs/conversations/persistance/OnPhoneContactsMerged.java
similarity index 100%
rename from src/eu/siacs/conversations/persistance/OnPhoneContactsMerged.java
rename to src/main/java/eu/siacs/conversations/persistance/OnPhoneContactsMerged.java
diff --git a/src/eu/siacs/conversations/services/AbstractConnectionManager.java b/src/main/java/eu/siacs/conversations/services/AbstractConnectionManager.java
similarity index 100%
rename from src/eu/siacs/conversations/services/AbstractConnectionManager.java
rename to src/main/java/eu/siacs/conversations/services/AbstractConnectionManager.java
diff --git a/src/eu/siacs/conversations/services/AvatarService.java b/src/main/java/eu/siacs/conversations/services/AvatarService.java
similarity index 100%
rename from src/eu/siacs/conversations/services/AvatarService.java
rename to src/main/java/eu/siacs/conversations/services/AvatarService.java
diff --git a/src/eu/siacs/conversations/services/EventReceiver.java b/src/main/java/eu/siacs/conversations/services/EventReceiver.java
similarity index 100%
rename from src/eu/siacs/conversations/services/EventReceiver.java
rename to src/main/java/eu/siacs/conversations/services/EventReceiver.java
diff --git a/src/eu/siacs/conversations/services/NotificationService.java b/src/main/java/eu/siacs/conversations/services/NotificationService.java
similarity index 100%
rename from src/eu/siacs/conversations/services/NotificationService.java
rename to src/main/java/eu/siacs/conversations/services/NotificationService.java
diff --git a/src/eu/siacs/conversations/services/XmppConnectionService.java b/src/main/java/eu/siacs/conversations/services/XmppConnectionService.java
similarity index 100%
rename from src/eu/siacs/conversations/services/XmppConnectionService.java
rename to src/main/java/eu/siacs/conversations/services/XmppConnectionService.java
diff --git a/src/eu/siacs/conversations/ui/ChooseContactActivity.java b/src/main/java/eu/siacs/conversations/ui/ChooseContactActivity.java
similarity index 100%
rename from src/eu/siacs/conversations/ui/ChooseContactActivity.java
rename to src/main/java/eu/siacs/conversations/ui/ChooseContactActivity.java
diff --git a/src/eu/siacs/conversations/ui/ConferenceDetailsActivity.java b/src/main/java/eu/siacs/conversations/ui/ConferenceDetailsActivity.java
similarity index 100%
rename from src/eu/siacs/conversations/ui/ConferenceDetailsActivity.java
rename to src/main/java/eu/siacs/conversations/ui/ConferenceDetailsActivity.java
diff --git a/src/eu/siacs/conversations/ui/ContactDetailsActivity.java b/src/main/java/eu/siacs/conversations/ui/ContactDetailsActivity.java
similarity index 100%
rename from src/eu/siacs/conversations/ui/ContactDetailsActivity.java
rename to src/main/java/eu/siacs/conversations/ui/ContactDetailsActivity.java
diff --git a/src/eu/siacs/conversations/ui/ConversationActivity.java b/src/main/java/eu/siacs/conversations/ui/ConversationActivity.java
similarity index 100%
rename from src/eu/siacs/conversations/ui/ConversationActivity.java
rename to src/main/java/eu/siacs/conversations/ui/ConversationActivity.java
diff --git a/src/eu/siacs/conversations/ui/ConversationFragment.java b/src/main/java/eu/siacs/conversations/ui/ConversationFragment.java
similarity index 100%
rename from src/eu/siacs/conversations/ui/ConversationFragment.java
rename to src/main/java/eu/siacs/conversations/ui/ConversationFragment.java
diff --git a/src/eu/siacs/conversations/ui/EditAccountActivity.java b/src/main/java/eu/siacs/conversations/ui/EditAccountActivity.java
similarity index 100%
rename from src/eu/siacs/conversations/ui/EditAccountActivity.java
rename to src/main/java/eu/siacs/conversations/ui/EditAccountActivity.java
diff --git a/src/eu/siacs/conversations/ui/EditMessage.java b/src/main/java/eu/siacs/conversations/ui/EditMessage.java
similarity index 100%
rename from src/eu/siacs/conversations/ui/EditMessage.java
rename to src/main/java/eu/siacs/conversations/ui/EditMessage.java
diff --git a/src/eu/siacs/conversations/ui/ManageAccountActivity.java b/src/main/java/eu/siacs/conversations/ui/ManageAccountActivity.java
similarity index 100%
rename from src/eu/siacs/conversations/ui/ManageAccountActivity.java
rename to src/main/java/eu/siacs/conversations/ui/ManageAccountActivity.java
diff --git a/src/eu/siacs/conversations/ui/PublishProfilePictureActivity.java b/src/main/java/eu/siacs/conversations/ui/PublishProfilePictureActivity.java
similarity index 100%
rename from src/eu/siacs/conversations/ui/PublishProfilePictureActivity.java
rename to src/main/java/eu/siacs/conversations/ui/PublishProfilePictureActivity.java
diff --git a/src/eu/siacs/conversations/ui/SettingsActivity.java b/src/main/java/eu/siacs/conversations/ui/SettingsActivity.java
similarity index 100%
rename from src/eu/siacs/conversations/ui/SettingsActivity.java
rename to src/main/java/eu/siacs/conversations/ui/SettingsActivity.java
diff --git a/src/eu/siacs/conversations/ui/SettingsFragment.java b/src/main/java/eu/siacs/conversations/ui/SettingsFragment.java
similarity index 100%
rename from src/eu/siacs/conversations/ui/SettingsFragment.java
rename to src/main/java/eu/siacs/conversations/ui/SettingsFragment.java
diff --git a/src/eu/siacs/conversations/ui/ShareWithActivity.java b/src/main/java/eu/siacs/conversations/ui/ShareWithActivity.java
similarity index 100%
rename from src/eu/siacs/conversations/ui/ShareWithActivity.java
rename to src/main/java/eu/siacs/conversations/ui/ShareWithActivity.java
diff --git a/src/eu/siacs/conversations/ui/StartConversationActivity.java b/src/main/java/eu/siacs/conversations/ui/StartConversationActivity.java
similarity index 100%
rename from src/eu/siacs/conversations/ui/StartConversationActivity.java
rename to src/main/java/eu/siacs/conversations/ui/StartConversationActivity.java
diff --git a/src/eu/siacs/conversations/ui/UiCallback.java b/src/main/java/eu/siacs/conversations/ui/UiCallback.java
similarity index 100%
rename from src/eu/siacs/conversations/ui/UiCallback.java
rename to src/main/java/eu/siacs/conversations/ui/UiCallback.java
diff --git a/src/eu/siacs/conversations/ui/XmppActivity.java b/src/main/java/eu/siacs/conversations/ui/XmppActivity.java
similarity index 100%
rename from src/eu/siacs/conversations/ui/XmppActivity.java
rename to src/main/java/eu/siacs/conversations/ui/XmppActivity.java
diff --git a/src/eu/siacs/conversations/ui/adapter/AccountAdapter.java b/src/main/java/eu/siacs/conversations/ui/adapter/AccountAdapter.java
similarity index 100%
rename from src/eu/siacs/conversations/ui/adapter/AccountAdapter.java
rename to src/main/java/eu/siacs/conversations/ui/adapter/AccountAdapter.java
diff --git a/src/eu/siacs/conversations/ui/adapter/ConversationAdapter.java b/src/main/java/eu/siacs/conversations/ui/adapter/ConversationAdapter.java
similarity index 100%
rename from src/eu/siacs/conversations/ui/adapter/ConversationAdapter.java
rename to src/main/java/eu/siacs/conversations/ui/adapter/ConversationAdapter.java
diff --git a/src/eu/siacs/conversations/ui/adapter/KnownHostsAdapter.java b/src/main/java/eu/siacs/conversations/ui/adapter/KnownHostsAdapter.java
similarity index 100%
rename from src/eu/siacs/conversations/ui/adapter/KnownHostsAdapter.java
rename to src/main/java/eu/siacs/conversations/ui/adapter/KnownHostsAdapter.java
diff --git a/src/eu/siacs/conversations/ui/adapter/ListItemAdapter.java b/src/main/java/eu/siacs/conversations/ui/adapter/ListItemAdapter.java
similarity index 100%
rename from src/eu/siacs/conversations/ui/adapter/ListItemAdapter.java
rename to src/main/java/eu/siacs/conversations/ui/adapter/ListItemAdapter.java
diff --git a/src/eu/siacs/conversations/ui/adapter/MessageAdapter.java b/src/main/java/eu/siacs/conversations/ui/adapter/MessageAdapter.java
similarity index 100%
rename from src/eu/siacs/conversations/ui/adapter/MessageAdapter.java
rename to src/main/java/eu/siacs/conversations/ui/adapter/MessageAdapter.java
diff --git a/src/eu/siacs/conversations/utils/CryptoHelper.java b/src/main/java/eu/siacs/conversations/utils/CryptoHelper.java
similarity index 100%
rename from src/eu/siacs/conversations/utils/CryptoHelper.java
rename to src/main/java/eu/siacs/conversations/utils/CryptoHelper.java
diff --git a/src/eu/siacs/conversations/utils/DNSHelper.java b/src/main/java/eu/siacs/conversations/utils/DNSHelper.java
similarity index 100%
rename from src/eu/siacs/conversations/utils/DNSHelper.java
rename to src/main/java/eu/siacs/conversations/utils/DNSHelper.java
diff --git a/src/eu/siacs/conversations/utils/ExceptionHandler.java b/src/main/java/eu/siacs/conversations/utils/ExceptionHandler.java
similarity index 100%
rename from src/eu/siacs/conversations/utils/ExceptionHandler.java
rename to src/main/java/eu/siacs/conversations/utils/ExceptionHandler.java
diff --git a/src/eu/siacs/conversations/utils/ExceptionHelper.java b/src/main/java/eu/siacs/conversations/utils/ExceptionHelper.java
similarity index 100%
rename from src/eu/siacs/conversations/utils/ExceptionHelper.java
rename to src/main/java/eu/siacs/conversations/utils/ExceptionHelper.java
diff --git a/src/eu/siacs/conversations/utils/ExifHelper.java b/src/main/java/eu/siacs/conversations/utils/ExifHelper.java
similarity index 100%
rename from src/eu/siacs/conversations/utils/ExifHelper.java
rename to src/main/java/eu/siacs/conversations/utils/ExifHelper.java
diff --git a/src/eu/siacs/conversations/utils/OnPhoneContactsLoadedListener.java b/src/main/java/eu/siacs/conversations/utils/OnPhoneContactsLoadedListener.java
similarity index 100%
rename from src/eu/siacs/conversations/utils/OnPhoneContactsLoadedListener.java
rename to src/main/java/eu/siacs/conversations/utils/OnPhoneContactsLoadedListener.java
diff --git a/src/eu/siacs/conversations/utils/PRNGFixes.java b/src/main/java/eu/siacs/conversations/utils/PRNGFixes.java
similarity index 100%
rename from src/eu/siacs/conversations/utils/PRNGFixes.java
rename to src/main/java/eu/siacs/conversations/utils/PRNGFixes.java
diff --git a/src/eu/siacs/conversations/utils/PhoneHelper.java b/src/main/java/eu/siacs/conversations/utils/PhoneHelper.java
similarity index 100%
rename from src/eu/siacs/conversations/utils/PhoneHelper.java
rename to src/main/java/eu/siacs/conversations/utils/PhoneHelper.java
diff --git a/src/eu/siacs/conversations/utils/UIHelper.java b/src/main/java/eu/siacs/conversations/utils/UIHelper.java
similarity index 100%
rename from src/eu/siacs/conversations/utils/UIHelper.java
rename to src/main/java/eu/siacs/conversations/utils/UIHelper.java
diff --git a/src/eu/siacs/conversations/utils/Validator.java b/src/main/java/eu/siacs/conversations/utils/Validator.java
similarity index 100%
rename from src/eu/siacs/conversations/utils/Validator.java
rename to src/main/java/eu/siacs/conversations/utils/Validator.java
diff --git a/src/eu/siacs/conversations/utils/XmlHelper.java b/src/main/java/eu/siacs/conversations/utils/XmlHelper.java
similarity index 100%
rename from src/eu/siacs/conversations/utils/XmlHelper.java
rename to src/main/java/eu/siacs/conversations/utils/XmlHelper.java
diff --git a/src/eu/siacs/conversations/utils/zlib/ZLibInputStream.java b/src/main/java/eu/siacs/conversations/utils/zlib/ZLibInputStream.java
similarity index 100%
rename from src/eu/siacs/conversations/utils/zlib/ZLibInputStream.java
rename to src/main/java/eu/siacs/conversations/utils/zlib/ZLibInputStream.java
diff --git a/src/eu/siacs/conversations/utils/zlib/ZLibOutputStream.java b/src/main/java/eu/siacs/conversations/utils/zlib/ZLibOutputStream.java
similarity index 100%
rename from src/eu/siacs/conversations/utils/zlib/ZLibOutputStream.java
rename to src/main/java/eu/siacs/conversations/utils/zlib/ZLibOutputStream.java
diff --git a/src/eu/siacs/conversations/xml/Element.java b/src/main/java/eu/siacs/conversations/xml/Element.java
similarity index 100%
rename from src/eu/siacs/conversations/xml/Element.java
rename to src/main/java/eu/siacs/conversations/xml/Element.java
diff --git a/src/eu/siacs/conversations/xml/Tag.java b/src/main/java/eu/siacs/conversations/xml/Tag.java
similarity index 100%
rename from src/eu/siacs/conversations/xml/Tag.java
rename to src/main/java/eu/siacs/conversations/xml/Tag.java
diff --git a/src/eu/siacs/conversations/xml/TagWriter.java b/src/main/java/eu/siacs/conversations/xml/TagWriter.java
similarity index 100%
rename from src/eu/siacs/conversations/xml/TagWriter.java
rename to src/main/java/eu/siacs/conversations/xml/TagWriter.java
diff --git a/src/eu/siacs/conversations/xml/XmlReader.java b/src/main/java/eu/siacs/conversations/xml/XmlReader.java
similarity index 100%
rename from src/eu/siacs/conversations/xml/XmlReader.java
rename to src/main/java/eu/siacs/conversations/xml/XmlReader.java
diff --git a/src/eu/siacs/conversations/xmpp/OnBindListener.java b/src/main/java/eu/siacs/conversations/xmpp/OnBindListener.java
similarity index 100%
rename from src/eu/siacs/conversations/xmpp/OnBindListener.java
rename to src/main/java/eu/siacs/conversations/xmpp/OnBindListener.java
diff --git a/src/eu/siacs/conversations/xmpp/OnContactStatusChanged.java b/src/main/java/eu/siacs/conversations/xmpp/OnContactStatusChanged.java
similarity index 100%
rename from src/eu/siacs/conversations/xmpp/OnContactStatusChanged.java
rename to src/main/java/eu/siacs/conversations/xmpp/OnContactStatusChanged.java
diff --git a/src/eu/siacs/conversations/xmpp/OnIqPacketReceived.java b/src/main/java/eu/siacs/conversations/xmpp/OnIqPacketReceived.java
similarity index 100%
rename from src/eu/siacs/conversations/xmpp/OnIqPacketReceived.java
rename to src/main/java/eu/siacs/conversations/xmpp/OnIqPacketReceived.java
diff --git a/src/eu/siacs/conversations/xmpp/OnMessageAcknowledged.java b/src/main/java/eu/siacs/conversations/xmpp/OnMessageAcknowledged.java
similarity index 100%
rename from src/eu/siacs/conversations/xmpp/OnMessageAcknowledged.java
rename to src/main/java/eu/siacs/conversations/xmpp/OnMessageAcknowledged.java
diff --git a/src/eu/siacs/conversations/xmpp/OnMessagePacketReceived.java b/src/main/java/eu/siacs/conversations/xmpp/OnMessagePacketReceived.java
similarity index 100%
rename from src/eu/siacs/conversations/xmpp/OnMessagePacketReceived.java
rename to src/main/java/eu/siacs/conversations/xmpp/OnMessagePacketReceived.java
diff --git a/src/eu/siacs/conversations/xmpp/OnPresencePacketReceived.java b/src/main/java/eu/siacs/conversations/xmpp/OnPresencePacketReceived.java
similarity index 100%
rename from src/eu/siacs/conversations/xmpp/OnPresencePacketReceived.java
rename to src/main/java/eu/siacs/conversations/xmpp/OnPresencePacketReceived.java
diff --git a/src/eu/siacs/conversations/xmpp/OnStatusChanged.java b/src/main/java/eu/siacs/conversations/xmpp/OnStatusChanged.java
similarity index 100%
rename from src/eu/siacs/conversations/xmpp/OnStatusChanged.java
rename to src/main/java/eu/siacs/conversations/xmpp/OnStatusChanged.java
diff --git a/src/eu/siacs/conversations/xmpp/PacketReceived.java b/src/main/java/eu/siacs/conversations/xmpp/PacketReceived.java
similarity index 100%
rename from src/eu/siacs/conversations/xmpp/PacketReceived.java
rename to src/main/java/eu/siacs/conversations/xmpp/PacketReceived.java
diff --git a/src/eu/siacs/conversations/xmpp/XmppConnection.java b/src/main/java/eu/siacs/conversations/xmpp/XmppConnection.java
similarity index 100%
rename from src/eu/siacs/conversations/xmpp/XmppConnection.java
rename to src/main/java/eu/siacs/conversations/xmpp/XmppConnection.java
diff --git a/src/eu/siacs/conversations/xmpp/jingle/JingleCandidate.java b/src/main/java/eu/siacs/conversations/xmpp/jingle/JingleCandidate.java
similarity index 100%
rename from src/eu/siacs/conversations/xmpp/jingle/JingleCandidate.java
rename to src/main/java/eu/siacs/conversations/xmpp/jingle/JingleCandidate.java
diff --git a/src/eu/siacs/conversations/xmpp/jingle/JingleConnection.java b/src/main/java/eu/siacs/conversations/xmpp/jingle/JingleConnection.java
similarity index 100%
rename from src/eu/siacs/conversations/xmpp/jingle/JingleConnection.java
rename to src/main/java/eu/siacs/conversations/xmpp/jingle/JingleConnection.java
diff --git a/src/eu/siacs/conversations/xmpp/jingle/JingleConnectionManager.java b/src/main/java/eu/siacs/conversations/xmpp/jingle/JingleConnectionManager.java
similarity index 100%
rename from src/eu/siacs/conversations/xmpp/jingle/JingleConnectionManager.java
rename to src/main/java/eu/siacs/conversations/xmpp/jingle/JingleConnectionManager.java
diff --git a/src/eu/siacs/conversations/xmpp/jingle/JingleInbandTransport.java b/src/main/java/eu/siacs/conversations/xmpp/jingle/JingleInbandTransport.java
similarity index 100%
rename from src/eu/siacs/conversations/xmpp/jingle/JingleInbandTransport.java
rename to src/main/java/eu/siacs/conversations/xmpp/jingle/JingleInbandTransport.java
diff --git a/src/eu/siacs/conversations/xmpp/jingle/JingleSocks5Transport.java b/src/main/java/eu/siacs/conversations/xmpp/jingle/JingleSocks5Transport.java
similarity index 100%
rename from src/eu/siacs/conversations/xmpp/jingle/JingleSocks5Transport.java
rename to src/main/java/eu/siacs/conversations/xmpp/jingle/JingleSocks5Transport.java
diff --git a/src/eu/siacs/conversations/xmpp/jingle/JingleTransport.java b/src/main/java/eu/siacs/conversations/xmpp/jingle/JingleTransport.java
similarity index 100%
rename from src/eu/siacs/conversations/xmpp/jingle/JingleTransport.java
rename to src/main/java/eu/siacs/conversations/xmpp/jingle/JingleTransport.java
diff --git a/src/eu/siacs/conversations/xmpp/jingle/OnFileTransmissionStatusChanged.java b/src/main/java/eu/siacs/conversations/xmpp/jingle/OnFileTransmissionStatusChanged.java
similarity index 100%
rename from src/eu/siacs/conversations/xmpp/jingle/OnFileTransmissionStatusChanged.java
rename to src/main/java/eu/siacs/conversations/xmpp/jingle/OnFileTransmissionStatusChanged.java
diff --git a/src/eu/siacs/conversations/xmpp/jingle/OnJinglePacketReceived.java b/src/main/java/eu/siacs/conversations/xmpp/jingle/OnJinglePacketReceived.java
similarity index 100%
rename from src/eu/siacs/conversations/xmpp/jingle/OnJinglePacketReceived.java
rename to src/main/java/eu/siacs/conversations/xmpp/jingle/OnJinglePacketReceived.java
diff --git a/src/eu/siacs/conversations/xmpp/jingle/OnPrimaryCandidateFound.java b/src/main/java/eu/siacs/conversations/xmpp/jingle/OnPrimaryCandidateFound.java
similarity index 100%
rename from src/eu/siacs/conversations/xmpp/jingle/OnPrimaryCandidateFound.java
rename to src/main/java/eu/siacs/conversations/xmpp/jingle/OnPrimaryCandidateFound.java
diff --git a/src/eu/siacs/conversations/xmpp/jingle/OnTransportConnected.java b/src/main/java/eu/siacs/conversations/xmpp/jingle/OnTransportConnected.java
similarity index 100%
rename from src/eu/siacs/conversations/xmpp/jingle/OnTransportConnected.java
rename to src/main/java/eu/siacs/conversations/xmpp/jingle/OnTransportConnected.java
diff --git a/src/eu/siacs/conversations/xmpp/jingle/stanzas/Content.java b/src/main/java/eu/siacs/conversations/xmpp/jingle/stanzas/Content.java
similarity index 100%
rename from src/eu/siacs/conversations/xmpp/jingle/stanzas/Content.java
rename to src/main/java/eu/siacs/conversations/xmpp/jingle/stanzas/Content.java
diff --git a/src/eu/siacs/conversations/xmpp/jingle/stanzas/JinglePacket.java b/src/main/java/eu/siacs/conversations/xmpp/jingle/stanzas/JinglePacket.java
similarity index 100%
rename from src/eu/siacs/conversations/xmpp/jingle/stanzas/JinglePacket.java
rename to src/main/java/eu/siacs/conversations/xmpp/jingle/stanzas/JinglePacket.java
diff --git a/src/eu/siacs/conversations/xmpp/jingle/stanzas/Reason.java b/src/main/java/eu/siacs/conversations/xmpp/jingle/stanzas/Reason.java
similarity index 100%
rename from src/eu/siacs/conversations/xmpp/jingle/stanzas/Reason.java
rename to src/main/java/eu/siacs/conversations/xmpp/jingle/stanzas/Reason.java
diff --git a/src/eu/siacs/conversations/xmpp/pep/Avatar.java b/src/main/java/eu/siacs/conversations/xmpp/pep/Avatar.java
similarity index 100%
rename from src/eu/siacs/conversations/xmpp/pep/Avatar.java
rename to src/main/java/eu/siacs/conversations/xmpp/pep/Avatar.java
diff --git a/src/eu/siacs/conversations/xmpp/stanzas/AbstractStanza.java b/src/main/java/eu/siacs/conversations/xmpp/stanzas/AbstractStanza.java
similarity index 100%
rename from src/eu/siacs/conversations/xmpp/stanzas/AbstractStanza.java
rename to src/main/java/eu/siacs/conversations/xmpp/stanzas/AbstractStanza.java
diff --git a/src/eu/siacs/conversations/xmpp/stanzas/IqPacket.java b/src/main/java/eu/siacs/conversations/xmpp/stanzas/IqPacket.java
similarity index 100%
rename from src/eu/siacs/conversations/xmpp/stanzas/IqPacket.java
rename to src/main/java/eu/siacs/conversations/xmpp/stanzas/IqPacket.java
diff --git a/src/eu/siacs/conversations/xmpp/stanzas/MessagePacket.java b/src/main/java/eu/siacs/conversations/xmpp/stanzas/MessagePacket.java
similarity index 100%
rename from src/eu/siacs/conversations/xmpp/stanzas/MessagePacket.java
rename to src/main/java/eu/siacs/conversations/xmpp/stanzas/MessagePacket.java
diff --git a/src/eu/siacs/conversations/xmpp/stanzas/PresencePacket.java b/src/main/java/eu/siacs/conversations/xmpp/stanzas/PresencePacket.java
similarity index 100%
rename from src/eu/siacs/conversations/xmpp/stanzas/PresencePacket.java
rename to src/main/java/eu/siacs/conversations/xmpp/stanzas/PresencePacket.java
diff --git a/src/eu/siacs/conversations/xmpp/stanzas/csi/ActivePacket.java b/src/main/java/eu/siacs/conversations/xmpp/stanzas/csi/ActivePacket.java
similarity index 100%
rename from src/eu/siacs/conversations/xmpp/stanzas/csi/ActivePacket.java
rename to src/main/java/eu/siacs/conversations/xmpp/stanzas/csi/ActivePacket.java
diff --git a/src/eu/siacs/conversations/xmpp/stanzas/csi/InactivePacket.java b/src/main/java/eu/siacs/conversations/xmpp/stanzas/csi/InactivePacket.java
similarity index 100%
rename from src/eu/siacs/conversations/xmpp/stanzas/csi/InactivePacket.java
rename to src/main/java/eu/siacs/conversations/xmpp/stanzas/csi/InactivePacket.java
diff --git a/src/eu/siacs/conversations/xmpp/stanzas/streammgmt/AckPacket.java b/src/main/java/eu/siacs/conversations/xmpp/stanzas/streammgmt/AckPacket.java
similarity index 100%
rename from src/eu/siacs/conversations/xmpp/stanzas/streammgmt/AckPacket.java
rename to src/main/java/eu/siacs/conversations/xmpp/stanzas/streammgmt/AckPacket.java
diff --git a/src/eu/siacs/conversations/xmpp/stanzas/streammgmt/EnablePacket.java b/src/main/java/eu/siacs/conversations/xmpp/stanzas/streammgmt/EnablePacket.java
similarity index 100%
rename from src/eu/siacs/conversations/xmpp/stanzas/streammgmt/EnablePacket.java
rename to src/main/java/eu/siacs/conversations/xmpp/stanzas/streammgmt/EnablePacket.java
diff --git a/src/eu/siacs/conversations/xmpp/stanzas/streammgmt/RequestPacket.java b/src/main/java/eu/siacs/conversations/xmpp/stanzas/streammgmt/RequestPacket.java
similarity index 100%
rename from src/eu/siacs/conversations/xmpp/stanzas/streammgmt/RequestPacket.java
rename to src/main/java/eu/siacs/conversations/xmpp/stanzas/streammgmt/RequestPacket.java
diff --git a/src/eu/siacs/conversations/xmpp/stanzas/streammgmt/ResumePacket.java b/src/main/java/eu/siacs/conversations/xmpp/stanzas/streammgmt/ResumePacket.java
similarity index 100%
rename from src/eu/siacs/conversations/xmpp/stanzas/streammgmt/ResumePacket.java
rename to src/main/java/eu/siacs/conversations/xmpp/stanzas/streammgmt/ResumePacket.java
diff --git a/res/drawable-hdpi/ic_action_add_group.png b/src/main/res/drawable-hdpi/ic_action_add_group.png
similarity index 100%
rename from res/drawable-hdpi/ic_action_add_group.png
rename to src/main/res/drawable-hdpi/ic_action_add_group.png
diff --git a/res/drawable-hdpi/ic_action_add_person.png b/src/main/res/drawable-hdpi/ic_action_add_person.png
similarity index 100%
rename from res/drawable-hdpi/ic_action_add_person.png
rename to src/main/res/drawable-hdpi/ic_action_add_person.png
diff --git a/res/drawable-hdpi/ic_action_chat.png b/src/main/res/drawable-hdpi/ic_action_chat.png
similarity index 100%
rename from res/drawable-hdpi/ic_action_chat.png
rename to src/main/res/drawable-hdpi/ic_action_chat.png
diff --git a/res/drawable-hdpi/ic_action_copy.png b/src/main/res/drawable-hdpi/ic_action_copy.png
similarity index 100%
rename from res/drawable-hdpi/ic_action_copy.png
rename to src/main/res/drawable-hdpi/ic_action_copy.png
diff --git a/res/drawable-hdpi/ic_action_discard.png b/src/main/res/drawable-hdpi/ic_action_discard.png
similarity index 100%
rename from res/drawable-hdpi/ic_action_discard.png
rename to src/main/res/drawable-hdpi/ic_action_discard.png
diff --git a/res/drawable-hdpi/ic_action_edit.png b/src/main/res/drawable-hdpi/ic_action_edit.png
similarity index 100%
rename from res/drawable-hdpi/ic_action_edit.png
rename to src/main/res/drawable-hdpi/ic_action_edit.png
diff --git a/res/drawable-hdpi/ic_action_edit_dark.png b/src/main/res/drawable-hdpi/ic_action_edit_dark.png
similarity index 100%
rename from res/drawable-hdpi/ic_action_edit_dark.png
rename to src/main/res/drawable-hdpi/ic_action_edit_dark.png
diff --git a/res/drawable-hdpi/ic_action_group.png b/src/main/res/drawable-hdpi/ic_action_group.png
similarity index 100%
rename from res/drawable-hdpi/ic_action_group.png
rename to src/main/res/drawable-hdpi/ic_action_group.png
diff --git a/res/drawable-hdpi/ic_action_new.png b/src/main/res/drawable-hdpi/ic_action_new.png
similarity index 100%
rename from res/drawable-hdpi/ic_action_new.png
rename to src/main/res/drawable-hdpi/ic_action_new.png
diff --git a/res/drawable-hdpi/ic_action_new_attachment.png b/src/main/res/drawable-hdpi/ic_action_new_attachment.png
similarity index 100%
rename from res/drawable-hdpi/ic_action_new_attachment.png
rename to src/main/res/drawable-hdpi/ic_action_new_attachment.png
diff --git a/res/drawable-hdpi/ic_action_not_secure.png b/src/main/res/drawable-hdpi/ic_action_not_secure.png
similarity index 100%
rename from res/drawable-hdpi/ic_action_not_secure.png
rename to src/main/res/drawable-hdpi/ic_action_not_secure.png
diff --git a/res/drawable-hdpi/ic_action_refresh.png b/src/main/res/drawable-hdpi/ic_action_refresh.png
similarity index 100%
rename from res/drawable-hdpi/ic_action_refresh.png
rename to src/main/res/drawable-hdpi/ic_action_refresh.png
diff --git a/res/drawable-hdpi/ic_action_remove.png b/src/main/res/drawable-hdpi/ic_action_remove.png
similarity index 100%
rename from res/drawable-hdpi/ic_action_remove.png
rename to src/main/res/drawable-hdpi/ic_action_remove.png
diff --git a/res/drawable-hdpi/ic_action_search.png b/src/main/res/drawable-hdpi/ic_action_search.png
similarity index 100%
rename from res/drawable-hdpi/ic_action_search.png
rename to src/main/res/drawable-hdpi/ic_action_search.png
diff --git a/res/drawable-hdpi/ic_action_secure.png b/src/main/res/drawable-hdpi/ic_action_secure.png
similarity index 100%
rename from res/drawable-hdpi/ic_action_secure.png
rename to src/main/res/drawable-hdpi/ic_action_secure.png
diff --git a/res/drawable-hdpi/ic_action_send_now_away.png b/src/main/res/drawable-hdpi/ic_action_send_now_away.png
similarity index 100%
rename from res/drawable-hdpi/ic_action_send_now_away.png
rename to src/main/res/drawable-hdpi/ic_action_send_now_away.png
diff --git a/res/drawable-hdpi/ic_action_send_now_dnd.png b/src/main/res/drawable-hdpi/ic_action_send_now_dnd.png
similarity index 100%
rename from res/drawable-hdpi/ic_action_send_now_dnd.png
rename to src/main/res/drawable-hdpi/ic_action_send_now_dnd.png
diff --git a/res/drawable-hdpi/ic_action_send_now_offline.png b/src/main/res/drawable-hdpi/ic_action_send_now_offline.png
similarity index 100%
rename from res/drawable-hdpi/ic_action_send_now_offline.png
rename to src/main/res/drawable-hdpi/ic_action_send_now_offline.png
diff --git a/res/drawable-hdpi/ic_action_send_now_online.png b/src/main/res/drawable-hdpi/ic_action_send_now_online.png
similarity index 100%
rename from res/drawable-hdpi/ic_action_send_now_online.png
rename to src/main/res/drawable-hdpi/ic_action_send_now_online.png
diff --git a/res/drawable-hdpi/ic_activity.png b/src/main/res/drawable-hdpi/ic_activity.png
similarity index 100%
rename from res/drawable-hdpi/ic_activity.png
rename to src/main/res/drawable-hdpi/ic_activity.png
diff --git a/res/drawable-hdpi/ic_indicator.png b/src/main/res/drawable-hdpi/ic_indicator.png
similarity index 100%
rename from res/drawable-hdpi/ic_indicator.png
rename to src/main/res/drawable-hdpi/ic_indicator.png
diff --git a/res/drawable-hdpi/ic_launcher.png b/src/main/res/drawable-hdpi/ic_launcher.png
similarity index 100%
rename from res/drawable-hdpi/ic_launcher.png
rename to src/main/res/drawable-hdpi/ic_launcher.png
diff --git a/res/drawable-hdpi/ic_notification.png b/src/main/res/drawable-hdpi/ic_notification.png
similarity index 100%
rename from res/drawable-hdpi/ic_notification.png
rename to src/main/res/drawable-hdpi/ic_notification.png
diff --git a/res/drawable-hdpi/ic_profile.png b/src/main/res/drawable-hdpi/ic_profile.png
similarity index 100%
rename from res/drawable-hdpi/ic_profile.png
rename to src/main/res/drawable-hdpi/ic_profile.png
diff --git a/res/drawable-hdpi/ic_received_indicator.png b/src/main/res/drawable-hdpi/ic_received_indicator.png
similarity index 100%
rename from res/drawable-hdpi/ic_received_indicator.png
rename to src/main/res/drawable-hdpi/ic_received_indicator.png
diff --git a/res/drawable-hdpi/ic_secure_indicator.png b/src/main/res/drawable-hdpi/ic_secure_indicator.png
similarity index 100%
rename from res/drawable-hdpi/ic_secure_indicator.png
rename to src/main/res/drawable-hdpi/ic_secure_indicator.png
diff --git a/res/drawable-hdpi/tab_selected_conversations.9.png b/src/main/res/drawable-hdpi/tab_selected_conversations.9.png
similarity index 100%
rename from res/drawable-hdpi/tab_selected_conversations.9.png
rename to src/main/res/drawable-hdpi/tab_selected_conversations.9.png
diff --git a/res/drawable-hdpi/tab_selected_focused_conversations.9.png b/src/main/res/drawable-hdpi/tab_selected_focused_conversations.9.png
similarity index 100%
rename from res/drawable-hdpi/tab_selected_focused_conversations.9.png
rename to src/main/res/drawable-hdpi/tab_selected_focused_conversations.9.png
diff --git a/res/drawable-hdpi/tab_selected_pressed_conversations.9.png b/src/main/res/drawable-hdpi/tab_selected_pressed_conversations.9.png
similarity index 100%
rename from res/drawable-hdpi/tab_selected_pressed_conversations.9.png
rename to src/main/res/drawable-hdpi/tab_selected_pressed_conversations.9.png
diff --git a/res/drawable-hdpi/tab_unselected_conversations.9.png b/src/main/res/drawable-hdpi/tab_unselected_conversations.9.png
similarity index 100%
rename from res/drawable-hdpi/tab_unselected_conversations.9.png
rename to src/main/res/drawable-hdpi/tab_unselected_conversations.9.png
diff --git a/res/drawable-hdpi/tab_unselected_focused_conversations.9.png b/src/main/res/drawable-hdpi/tab_unselected_focused_conversations.9.png
similarity index 100%
rename from res/drawable-hdpi/tab_unselected_focused_conversations.9.png
rename to src/main/res/drawable-hdpi/tab_unselected_focused_conversations.9.png
diff --git a/res/drawable-hdpi/tab_unselected_pressed_conversations.9.png b/src/main/res/drawable-hdpi/tab_unselected_pressed_conversations.9.png
similarity index 100%
rename from res/drawable-hdpi/tab_unselected_pressed_conversations.9.png
rename to src/main/res/drawable-hdpi/tab_unselected_pressed_conversations.9.png
diff --git a/res/drawable-mdpi/ic_action_add_group.png b/src/main/res/drawable-mdpi/ic_action_add_group.png
similarity index 100%
rename from res/drawable-mdpi/ic_action_add_group.png
rename to src/main/res/drawable-mdpi/ic_action_add_group.png
diff --git a/res/drawable-mdpi/ic_action_add_person.png b/src/main/res/drawable-mdpi/ic_action_add_person.png
similarity index 100%
rename from res/drawable-mdpi/ic_action_add_person.png
rename to src/main/res/drawable-mdpi/ic_action_add_person.png
diff --git a/res/drawable-mdpi/ic_action_chat.png b/src/main/res/drawable-mdpi/ic_action_chat.png
similarity index 100%
rename from res/drawable-mdpi/ic_action_chat.png
rename to src/main/res/drawable-mdpi/ic_action_chat.png
diff --git a/res/drawable-mdpi/ic_action_copy.png b/src/main/res/drawable-mdpi/ic_action_copy.png
similarity index 100%
rename from res/drawable-mdpi/ic_action_copy.png
rename to src/main/res/drawable-mdpi/ic_action_copy.png
diff --git a/res/drawable-mdpi/ic_action_discard.png b/src/main/res/drawable-mdpi/ic_action_discard.png
similarity index 100%
rename from res/drawable-mdpi/ic_action_discard.png
rename to src/main/res/drawable-mdpi/ic_action_discard.png
diff --git a/res/drawable-mdpi/ic_action_edit.png b/src/main/res/drawable-mdpi/ic_action_edit.png
similarity index 100%
rename from res/drawable-mdpi/ic_action_edit.png
rename to src/main/res/drawable-mdpi/ic_action_edit.png
diff --git a/res/drawable-mdpi/ic_action_edit_dark.png b/src/main/res/drawable-mdpi/ic_action_edit_dark.png
similarity index 100%
rename from res/drawable-mdpi/ic_action_edit_dark.png
rename to src/main/res/drawable-mdpi/ic_action_edit_dark.png
diff --git a/res/drawable-mdpi/ic_action_group.png b/src/main/res/drawable-mdpi/ic_action_group.png
similarity index 100%
rename from res/drawable-mdpi/ic_action_group.png
rename to src/main/res/drawable-mdpi/ic_action_group.png
diff --git a/res/drawable-mdpi/ic_action_new.png b/src/main/res/drawable-mdpi/ic_action_new.png
similarity index 100%
rename from res/drawable-mdpi/ic_action_new.png
rename to src/main/res/drawable-mdpi/ic_action_new.png
diff --git a/res/drawable-mdpi/ic_action_new_attachment.png b/src/main/res/drawable-mdpi/ic_action_new_attachment.png
similarity index 100%
rename from res/drawable-mdpi/ic_action_new_attachment.png
rename to src/main/res/drawable-mdpi/ic_action_new_attachment.png
diff --git a/res/drawable-mdpi/ic_action_not_secure.png b/src/main/res/drawable-mdpi/ic_action_not_secure.png
similarity index 100%
rename from res/drawable-mdpi/ic_action_not_secure.png
rename to src/main/res/drawable-mdpi/ic_action_not_secure.png
diff --git a/res/drawable-mdpi/ic_action_refresh.png b/src/main/res/drawable-mdpi/ic_action_refresh.png
similarity index 100%
rename from res/drawable-mdpi/ic_action_refresh.png
rename to src/main/res/drawable-mdpi/ic_action_refresh.png
diff --git a/res/drawable-mdpi/ic_action_remove.png b/src/main/res/drawable-mdpi/ic_action_remove.png
similarity index 100%
rename from res/drawable-mdpi/ic_action_remove.png
rename to src/main/res/drawable-mdpi/ic_action_remove.png
diff --git a/res/drawable-mdpi/ic_action_search.png b/src/main/res/drawable-mdpi/ic_action_search.png
similarity index 100%
rename from res/drawable-mdpi/ic_action_search.png
rename to src/main/res/drawable-mdpi/ic_action_search.png
diff --git a/res/drawable-mdpi/ic_action_secure.png b/src/main/res/drawable-mdpi/ic_action_secure.png
similarity index 100%
rename from res/drawable-mdpi/ic_action_secure.png
rename to src/main/res/drawable-mdpi/ic_action_secure.png
diff --git a/res/drawable-mdpi/ic_action_send_now_away.png b/src/main/res/drawable-mdpi/ic_action_send_now_away.png
similarity index 100%
rename from res/drawable-mdpi/ic_action_send_now_away.png
rename to src/main/res/drawable-mdpi/ic_action_send_now_away.png
diff --git a/res/drawable-mdpi/ic_action_send_now_dnd.png b/src/main/res/drawable-mdpi/ic_action_send_now_dnd.png
similarity index 100%
rename from res/drawable-mdpi/ic_action_send_now_dnd.png
rename to src/main/res/drawable-mdpi/ic_action_send_now_dnd.png
diff --git a/res/drawable-mdpi/ic_action_send_now_offline.png b/src/main/res/drawable-mdpi/ic_action_send_now_offline.png
similarity index 100%
rename from res/drawable-mdpi/ic_action_send_now_offline.png
rename to src/main/res/drawable-mdpi/ic_action_send_now_offline.png
diff --git a/res/drawable-mdpi/ic_action_send_now_online.png b/src/main/res/drawable-mdpi/ic_action_send_now_online.png
similarity index 100%
rename from res/drawable-mdpi/ic_action_send_now_online.png
rename to src/main/res/drawable-mdpi/ic_action_send_now_online.png
diff --git a/res/drawable-mdpi/ic_activity.png b/src/main/res/drawable-mdpi/ic_activity.png
similarity index 100%
rename from res/drawable-mdpi/ic_activity.png
rename to src/main/res/drawable-mdpi/ic_activity.png
diff --git a/res/drawable-mdpi/ic_indicator.png b/src/main/res/drawable-mdpi/ic_indicator.png
similarity index 100%
rename from res/drawable-mdpi/ic_indicator.png
rename to src/main/res/drawable-mdpi/ic_indicator.png
diff --git a/res/drawable-mdpi/ic_launcher.png b/src/main/res/drawable-mdpi/ic_launcher.png
similarity index 100%
rename from res/drawable-mdpi/ic_launcher.png
rename to src/main/res/drawable-mdpi/ic_launcher.png
diff --git a/res/drawable-mdpi/ic_notification.png b/src/main/res/drawable-mdpi/ic_notification.png
similarity index 100%
rename from res/drawable-mdpi/ic_notification.png
rename to src/main/res/drawable-mdpi/ic_notification.png
diff --git a/res/drawable-mdpi/ic_profile.png b/src/main/res/drawable-mdpi/ic_profile.png
similarity index 100%
rename from res/drawable-mdpi/ic_profile.png
rename to src/main/res/drawable-mdpi/ic_profile.png
diff --git a/res/drawable-mdpi/ic_received_indicator.png b/src/main/res/drawable-mdpi/ic_received_indicator.png
similarity index 100%
rename from res/drawable-mdpi/ic_received_indicator.png
rename to src/main/res/drawable-mdpi/ic_received_indicator.png
diff --git a/res/drawable-mdpi/ic_secure_indicator.png b/src/main/res/drawable-mdpi/ic_secure_indicator.png
similarity index 100%
rename from res/drawable-mdpi/ic_secure_indicator.png
rename to src/main/res/drawable-mdpi/ic_secure_indicator.png
diff --git a/res/drawable-mdpi/tab_selected_conversations.9.png b/src/main/res/drawable-mdpi/tab_selected_conversations.9.png
similarity index 100%
rename from res/drawable-mdpi/tab_selected_conversations.9.png
rename to src/main/res/drawable-mdpi/tab_selected_conversations.9.png
diff --git a/res/drawable-mdpi/tab_selected_focused_conversations.9.png b/src/main/res/drawable-mdpi/tab_selected_focused_conversations.9.png
similarity index 100%
rename from res/drawable-mdpi/tab_selected_focused_conversations.9.png
rename to src/main/res/drawable-mdpi/tab_selected_focused_conversations.9.png
diff --git a/res/drawable-mdpi/tab_selected_pressed_conversations.9.png b/src/main/res/drawable-mdpi/tab_selected_pressed_conversations.9.png
similarity index 100%
rename from res/drawable-mdpi/tab_selected_pressed_conversations.9.png
rename to src/main/res/drawable-mdpi/tab_selected_pressed_conversations.9.png
diff --git a/res/drawable-mdpi/tab_unselected_conversations.9.png b/src/main/res/drawable-mdpi/tab_unselected_conversations.9.png
similarity index 100%
rename from res/drawable-mdpi/tab_unselected_conversations.9.png
rename to src/main/res/drawable-mdpi/tab_unselected_conversations.9.png
diff --git a/res/drawable-mdpi/tab_unselected_focused_conversations.9.png b/src/main/res/drawable-mdpi/tab_unselected_focused_conversations.9.png
similarity index 100%
rename from res/drawable-mdpi/tab_unselected_focused_conversations.9.png
rename to src/main/res/drawable-mdpi/tab_unselected_focused_conversations.9.png
diff --git a/res/drawable-mdpi/tab_unselected_pressed_conversations.9.png b/src/main/res/drawable-mdpi/tab_unselected_pressed_conversations.9.png
similarity index 100%
rename from res/drawable-mdpi/tab_unselected_pressed_conversations.9.png
rename to src/main/res/drawable-mdpi/tab_unselected_pressed_conversations.9.png
diff --git a/res/drawable-xhdpi/ic_action_add_group.png b/src/main/res/drawable-xhdpi/ic_action_add_group.png
similarity index 100%
rename from res/drawable-xhdpi/ic_action_add_group.png
rename to src/main/res/drawable-xhdpi/ic_action_add_group.png
diff --git a/res/drawable-xhdpi/ic_action_add_person.png b/src/main/res/drawable-xhdpi/ic_action_add_person.png
similarity index 100%
rename from res/drawable-xhdpi/ic_action_add_person.png
rename to src/main/res/drawable-xhdpi/ic_action_add_person.png
diff --git a/res/drawable-xhdpi/ic_action_chat.png b/src/main/res/drawable-xhdpi/ic_action_chat.png
similarity index 100%
rename from res/drawable-xhdpi/ic_action_chat.png
rename to src/main/res/drawable-xhdpi/ic_action_chat.png
diff --git a/res/drawable-xhdpi/ic_action_copy.png b/src/main/res/drawable-xhdpi/ic_action_copy.png
similarity index 100%
rename from res/drawable-xhdpi/ic_action_copy.png
rename to src/main/res/drawable-xhdpi/ic_action_copy.png
diff --git a/res/drawable-xhdpi/ic_action_discard.png b/src/main/res/drawable-xhdpi/ic_action_discard.png
similarity index 100%
rename from res/drawable-xhdpi/ic_action_discard.png
rename to src/main/res/drawable-xhdpi/ic_action_discard.png
diff --git a/res/drawable-xhdpi/ic_action_edit.png b/src/main/res/drawable-xhdpi/ic_action_edit.png
similarity index 100%
rename from res/drawable-xhdpi/ic_action_edit.png
rename to src/main/res/drawable-xhdpi/ic_action_edit.png
diff --git a/res/drawable-xhdpi/ic_action_edit_dark.png b/src/main/res/drawable-xhdpi/ic_action_edit_dark.png
similarity index 100%
rename from res/drawable-xhdpi/ic_action_edit_dark.png
rename to src/main/res/drawable-xhdpi/ic_action_edit_dark.png
diff --git a/res/drawable-xhdpi/ic_action_group.png b/src/main/res/drawable-xhdpi/ic_action_group.png
similarity index 100%
rename from res/drawable-xhdpi/ic_action_group.png
rename to src/main/res/drawable-xhdpi/ic_action_group.png
diff --git a/res/drawable-xhdpi/ic_action_new.png b/src/main/res/drawable-xhdpi/ic_action_new.png
similarity index 100%
rename from res/drawable-xhdpi/ic_action_new.png
rename to src/main/res/drawable-xhdpi/ic_action_new.png
diff --git a/res/drawable-xhdpi/ic_action_new_attachment.png b/src/main/res/drawable-xhdpi/ic_action_new_attachment.png
similarity index 100%
rename from res/drawable-xhdpi/ic_action_new_attachment.png
rename to src/main/res/drawable-xhdpi/ic_action_new_attachment.png
diff --git a/res/drawable-xhdpi/ic_action_not_secure.png b/src/main/res/drawable-xhdpi/ic_action_not_secure.png
similarity index 100%
rename from res/drawable-xhdpi/ic_action_not_secure.png
rename to src/main/res/drawable-xhdpi/ic_action_not_secure.png
diff --git a/res/drawable-xhdpi/ic_action_refresh.png b/src/main/res/drawable-xhdpi/ic_action_refresh.png
similarity index 100%
rename from res/drawable-xhdpi/ic_action_refresh.png
rename to src/main/res/drawable-xhdpi/ic_action_refresh.png
diff --git a/res/drawable-xhdpi/ic_action_remove.png b/src/main/res/drawable-xhdpi/ic_action_remove.png
similarity index 100%
rename from res/drawable-xhdpi/ic_action_remove.png
rename to src/main/res/drawable-xhdpi/ic_action_remove.png
diff --git a/res/drawable-xhdpi/ic_action_search.png b/src/main/res/drawable-xhdpi/ic_action_search.png
similarity index 100%
rename from res/drawable-xhdpi/ic_action_search.png
rename to src/main/res/drawable-xhdpi/ic_action_search.png
diff --git a/res/drawable-xhdpi/ic_action_secure.png b/src/main/res/drawable-xhdpi/ic_action_secure.png
similarity index 100%
rename from res/drawable-xhdpi/ic_action_secure.png
rename to src/main/res/drawable-xhdpi/ic_action_secure.png
diff --git a/res/drawable-xhdpi/ic_action_send_now_away.png b/src/main/res/drawable-xhdpi/ic_action_send_now_away.png
similarity index 100%
rename from res/drawable-xhdpi/ic_action_send_now_away.png
rename to src/main/res/drawable-xhdpi/ic_action_send_now_away.png
diff --git a/res/drawable-xhdpi/ic_action_send_now_dnd.png b/src/main/res/drawable-xhdpi/ic_action_send_now_dnd.png
similarity index 100%
rename from res/drawable-xhdpi/ic_action_send_now_dnd.png
rename to src/main/res/drawable-xhdpi/ic_action_send_now_dnd.png
diff --git a/res/drawable-xhdpi/ic_action_send_now_offline.png b/src/main/res/drawable-xhdpi/ic_action_send_now_offline.png
similarity index 100%
rename from res/drawable-xhdpi/ic_action_send_now_offline.png
rename to src/main/res/drawable-xhdpi/ic_action_send_now_offline.png
diff --git a/res/drawable-xhdpi/ic_action_send_now_online.png b/src/main/res/drawable-xhdpi/ic_action_send_now_online.png
similarity index 100%
rename from res/drawable-xhdpi/ic_action_send_now_online.png
rename to src/main/res/drawable-xhdpi/ic_action_send_now_online.png
diff --git a/res/drawable-xhdpi/ic_activity.png b/src/main/res/drawable-xhdpi/ic_activity.png
similarity index 100%
rename from res/drawable-xhdpi/ic_activity.png
rename to src/main/res/drawable-xhdpi/ic_activity.png
diff --git a/res/drawable-xhdpi/ic_indicator.png b/src/main/res/drawable-xhdpi/ic_indicator.png
similarity index 100%
rename from res/drawable-xhdpi/ic_indicator.png
rename to src/main/res/drawable-xhdpi/ic_indicator.png
diff --git a/res/drawable-xhdpi/ic_launcher.png b/src/main/res/drawable-xhdpi/ic_launcher.png
similarity index 100%
rename from res/drawable-xhdpi/ic_launcher.png
rename to src/main/res/drawable-xhdpi/ic_launcher.png
diff --git a/res/drawable-xhdpi/ic_notification.png b/src/main/res/drawable-xhdpi/ic_notification.png
similarity index 100%
rename from res/drawable-xhdpi/ic_notification.png
rename to src/main/res/drawable-xhdpi/ic_notification.png
diff --git a/res/drawable-xhdpi/ic_profile.png b/src/main/res/drawable-xhdpi/ic_profile.png
similarity index 100%
rename from res/drawable-xhdpi/ic_profile.png
rename to src/main/res/drawable-xhdpi/ic_profile.png
diff --git a/res/drawable-xhdpi/ic_received_indicator.png b/src/main/res/drawable-xhdpi/ic_received_indicator.png
similarity index 100%
rename from res/drawable-xhdpi/ic_received_indicator.png
rename to src/main/res/drawable-xhdpi/ic_received_indicator.png
diff --git a/res/drawable-xhdpi/ic_secure_indicator.png b/src/main/res/drawable-xhdpi/ic_secure_indicator.png
similarity index 100%
rename from res/drawable-xhdpi/ic_secure_indicator.png
rename to src/main/res/drawable-xhdpi/ic_secure_indicator.png
diff --git a/res/drawable-xhdpi/tab_selected_conversations.9.png b/src/main/res/drawable-xhdpi/tab_selected_conversations.9.png
similarity index 100%
rename from res/drawable-xhdpi/tab_selected_conversations.9.png
rename to src/main/res/drawable-xhdpi/tab_selected_conversations.9.png
diff --git a/res/drawable-xhdpi/tab_selected_focused_conversations.9.png b/src/main/res/drawable-xhdpi/tab_selected_focused_conversations.9.png
similarity index 100%
rename from res/drawable-xhdpi/tab_selected_focused_conversations.9.png
rename to src/main/res/drawable-xhdpi/tab_selected_focused_conversations.9.png
diff --git a/res/drawable-xhdpi/tab_selected_pressed_conversations.9.png b/src/main/res/drawable-xhdpi/tab_selected_pressed_conversations.9.png
similarity index 100%
rename from res/drawable-xhdpi/tab_selected_pressed_conversations.9.png
rename to src/main/res/drawable-xhdpi/tab_selected_pressed_conversations.9.png
diff --git a/res/drawable-xhdpi/tab_unselected_conversations.9.png b/src/main/res/drawable-xhdpi/tab_unselected_conversations.9.png
similarity index 100%
rename from res/drawable-xhdpi/tab_unselected_conversations.9.png
rename to src/main/res/drawable-xhdpi/tab_unselected_conversations.9.png
diff --git a/res/drawable-xhdpi/tab_unselected_focused_conversations.9.png b/src/main/res/drawable-xhdpi/tab_unselected_focused_conversations.9.png
similarity index 100%
rename from res/drawable-xhdpi/tab_unselected_focused_conversations.9.png
rename to src/main/res/drawable-xhdpi/tab_unselected_focused_conversations.9.png
diff --git a/res/drawable-xhdpi/tab_unselected_pressed_conversations.9.png b/src/main/res/drawable-xhdpi/tab_unselected_pressed_conversations.9.png
similarity index 100%
rename from res/drawable-xhdpi/tab_unselected_pressed_conversations.9.png
rename to src/main/res/drawable-xhdpi/tab_unselected_pressed_conversations.9.png
diff --git a/res/drawable-xxhdpi/ic_action_add_group.png b/src/main/res/drawable-xxhdpi/ic_action_add_group.png
similarity index 100%
rename from res/drawable-xxhdpi/ic_action_add_group.png
rename to src/main/res/drawable-xxhdpi/ic_action_add_group.png
diff --git a/res/drawable-xxhdpi/ic_action_add_person.png b/src/main/res/drawable-xxhdpi/ic_action_add_person.png
similarity index 100%
rename from res/drawable-xxhdpi/ic_action_add_person.png
rename to src/main/res/drawable-xxhdpi/ic_action_add_person.png
diff --git a/res/drawable-xxhdpi/ic_action_chat.png b/src/main/res/drawable-xxhdpi/ic_action_chat.png
similarity index 100%
rename from res/drawable-xxhdpi/ic_action_chat.png
rename to src/main/res/drawable-xxhdpi/ic_action_chat.png
diff --git a/res/drawable-xxhdpi/ic_action_copy.png b/src/main/res/drawable-xxhdpi/ic_action_copy.png
similarity index 100%
rename from res/drawable-xxhdpi/ic_action_copy.png
rename to src/main/res/drawable-xxhdpi/ic_action_copy.png
diff --git a/res/drawable-xxhdpi/ic_action_discard.png b/src/main/res/drawable-xxhdpi/ic_action_discard.png
similarity index 100%
rename from res/drawable-xxhdpi/ic_action_discard.png
rename to src/main/res/drawable-xxhdpi/ic_action_discard.png
diff --git a/res/drawable-xxhdpi/ic_action_edit.png b/src/main/res/drawable-xxhdpi/ic_action_edit.png
similarity index 100%
rename from res/drawable-xxhdpi/ic_action_edit.png
rename to src/main/res/drawable-xxhdpi/ic_action_edit.png
diff --git a/res/drawable-xxhdpi/ic_action_edit_dark.png b/src/main/res/drawable-xxhdpi/ic_action_edit_dark.png
similarity index 100%
rename from res/drawable-xxhdpi/ic_action_edit_dark.png
rename to src/main/res/drawable-xxhdpi/ic_action_edit_dark.png
diff --git a/res/drawable-xxhdpi/ic_action_group.png b/src/main/res/drawable-xxhdpi/ic_action_group.png
similarity index 100%
rename from res/drawable-xxhdpi/ic_action_group.png
rename to src/main/res/drawable-xxhdpi/ic_action_group.png
diff --git a/res/drawable-xxhdpi/ic_action_new.png b/src/main/res/drawable-xxhdpi/ic_action_new.png
similarity index 100%
rename from res/drawable-xxhdpi/ic_action_new.png
rename to src/main/res/drawable-xxhdpi/ic_action_new.png
diff --git a/res/drawable-xxhdpi/ic_action_new_attachment.png b/src/main/res/drawable-xxhdpi/ic_action_new_attachment.png
similarity index 100%
rename from res/drawable-xxhdpi/ic_action_new_attachment.png
rename to src/main/res/drawable-xxhdpi/ic_action_new_attachment.png
diff --git a/res/drawable-xxhdpi/ic_action_not_secure.png b/src/main/res/drawable-xxhdpi/ic_action_not_secure.png
similarity index 100%
rename from res/drawable-xxhdpi/ic_action_not_secure.png
rename to src/main/res/drawable-xxhdpi/ic_action_not_secure.png
diff --git a/res/drawable-xxhdpi/ic_action_refresh.png b/src/main/res/drawable-xxhdpi/ic_action_refresh.png
similarity index 100%
rename from res/drawable-xxhdpi/ic_action_refresh.png
rename to src/main/res/drawable-xxhdpi/ic_action_refresh.png
diff --git a/res/drawable-xxhdpi/ic_action_remove.png b/src/main/res/drawable-xxhdpi/ic_action_remove.png
similarity index 100%
rename from res/drawable-xxhdpi/ic_action_remove.png
rename to src/main/res/drawable-xxhdpi/ic_action_remove.png
diff --git a/res/drawable-xxhdpi/ic_action_search.png b/src/main/res/drawable-xxhdpi/ic_action_search.png
similarity index 100%
rename from res/drawable-xxhdpi/ic_action_search.png
rename to src/main/res/drawable-xxhdpi/ic_action_search.png
diff --git a/res/drawable-xxhdpi/ic_action_secure.png b/src/main/res/drawable-xxhdpi/ic_action_secure.png
similarity index 100%
rename from res/drawable-xxhdpi/ic_action_secure.png
rename to src/main/res/drawable-xxhdpi/ic_action_secure.png
diff --git a/res/drawable-xxhdpi/ic_action_send_now_away.png b/src/main/res/drawable-xxhdpi/ic_action_send_now_away.png
similarity index 100%
rename from res/drawable-xxhdpi/ic_action_send_now_away.png
rename to src/main/res/drawable-xxhdpi/ic_action_send_now_away.png
diff --git a/res/drawable-xxhdpi/ic_action_send_now_dnd.png b/src/main/res/drawable-xxhdpi/ic_action_send_now_dnd.png
similarity index 100%
rename from res/drawable-xxhdpi/ic_action_send_now_dnd.png
rename to src/main/res/drawable-xxhdpi/ic_action_send_now_dnd.png
diff --git a/res/drawable-xxhdpi/ic_action_send_now_offline.png b/src/main/res/drawable-xxhdpi/ic_action_send_now_offline.png
similarity index 100%
rename from res/drawable-xxhdpi/ic_action_send_now_offline.png
rename to src/main/res/drawable-xxhdpi/ic_action_send_now_offline.png
diff --git a/res/drawable-xxhdpi/ic_action_send_now_online.png b/src/main/res/drawable-xxhdpi/ic_action_send_now_online.png
similarity index 100%
rename from res/drawable-xxhdpi/ic_action_send_now_online.png
rename to src/main/res/drawable-xxhdpi/ic_action_send_now_online.png
diff --git a/res/drawable-xxhdpi/ic_activity.png b/src/main/res/drawable-xxhdpi/ic_activity.png
similarity index 100%
rename from res/drawable-xxhdpi/ic_activity.png
rename to src/main/res/drawable-xxhdpi/ic_activity.png
diff --git a/res/drawable-xxhdpi/ic_indicator.png b/src/main/res/drawable-xxhdpi/ic_indicator.png
similarity index 100%
rename from res/drawable-xxhdpi/ic_indicator.png
rename to src/main/res/drawable-xxhdpi/ic_indicator.png
diff --git a/res/drawable-xxhdpi/ic_launcher.png b/src/main/res/drawable-xxhdpi/ic_launcher.png
similarity index 100%
rename from res/drawable-xxhdpi/ic_launcher.png
rename to src/main/res/drawable-xxhdpi/ic_launcher.png
diff --git a/res/drawable-xxhdpi/ic_notification.png b/src/main/res/drawable-xxhdpi/ic_notification.png
similarity index 100%
rename from res/drawable-xxhdpi/ic_notification.png
rename to src/main/res/drawable-xxhdpi/ic_notification.png
diff --git a/res/drawable-xxhdpi/ic_profile.png b/src/main/res/drawable-xxhdpi/ic_profile.png
similarity index 100%
rename from res/drawable-xxhdpi/ic_profile.png
rename to src/main/res/drawable-xxhdpi/ic_profile.png
diff --git a/res/drawable-xxhdpi/ic_received_indicator.png b/src/main/res/drawable-xxhdpi/ic_received_indicator.png
similarity index 100%
rename from res/drawable-xxhdpi/ic_received_indicator.png
rename to src/main/res/drawable-xxhdpi/ic_received_indicator.png
diff --git a/res/drawable-xxhdpi/ic_secure_indicator.png b/src/main/res/drawable-xxhdpi/ic_secure_indicator.png
similarity index 100%
rename from res/drawable-xxhdpi/ic_secure_indicator.png
rename to src/main/res/drawable-xxhdpi/ic_secure_indicator.png
diff --git a/res/drawable-xxhdpi/tab_selected_conversations.9.png b/src/main/res/drawable-xxhdpi/tab_selected_conversations.9.png
similarity index 100%
rename from res/drawable-xxhdpi/tab_selected_conversations.9.png
rename to src/main/res/drawable-xxhdpi/tab_selected_conversations.9.png
diff --git a/res/drawable-xxhdpi/tab_selected_focused_conversations.9.png b/src/main/res/drawable-xxhdpi/tab_selected_focused_conversations.9.png
similarity index 100%
rename from res/drawable-xxhdpi/tab_selected_focused_conversations.9.png
rename to src/main/res/drawable-xxhdpi/tab_selected_focused_conversations.9.png
diff --git a/res/drawable-xxhdpi/tab_selected_pressed_conversations.9.png b/src/main/res/drawable-xxhdpi/tab_selected_pressed_conversations.9.png
similarity index 100%
rename from res/drawable-xxhdpi/tab_selected_pressed_conversations.9.png
rename to src/main/res/drawable-xxhdpi/tab_selected_pressed_conversations.9.png
diff --git a/res/drawable-xxhdpi/tab_unselected_conversations.9.png b/src/main/res/drawable-xxhdpi/tab_unselected_conversations.9.png
similarity index 100%
rename from res/drawable-xxhdpi/tab_unselected_conversations.9.png
rename to src/main/res/drawable-xxhdpi/tab_unselected_conversations.9.png
diff --git a/res/drawable-xxhdpi/tab_unselected_focused_conversations.9.png b/src/main/res/drawable-xxhdpi/tab_unselected_focused_conversations.9.png
similarity index 100%
rename from res/drawable-xxhdpi/tab_unselected_focused_conversations.9.png
rename to src/main/res/drawable-xxhdpi/tab_unselected_focused_conversations.9.png
diff --git a/res/drawable-xxhdpi/tab_unselected_pressed_conversations.9.png b/src/main/res/drawable-xxhdpi/tab_unselected_pressed_conversations.9.png
similarity index 100%
rename from res/drawable-xxhdpi/tab_unselected_pressed_conversations.9.png
rename to src/main/res/drawable-xxhdpi/tab_unselected_pressed_conversations.9.png
diff --git a/res/drawable/actionbar_tab_indicator.xml b/src/main/res/drawable/actionbar_tab_indicator.xml
similarity index 100%
rename from res/drawable/actionbar_tab_indicator.xml
rename to src/main/res/drawable/actionbar_tab_indicator.xml
diff --git a/res/drawable/es_slidingpane_shadow.xml b/src/main/res/drawable/es_slidingpane_shadow.xml
similarity index 100%
rename from res/drawable/es_slidingpane_shadow.xml
rename to src/main/res/drawable/es_slidingpane_shadow.xml
diff --git a/res/drawable/grey.xml b/src/main/res/drawable/grey.xml
similarity index 100%
rename from res/drawable/grey.xml
rename to src/main/res/drawable/grey.xml
diff --git a/res/drawable/greybackground.xml b/src/main/res/drawable/greybackground.xml
similarity index 100%
rename from res/drawable/greybackground.xml
rename to src/main/res/drawable/greybackground.xml
diff --git a/res/drawable/infocard_border.xml b/src/main/res/drawable/infocard_border.xml
similarity index 100%
rename from res/drawable/infocard_border.xml
rename to src/main/res/drawable/infocard_border.xml
diff --git a/res/drawable/message_border.xml b/src/main/res/drawable/message_border.xml
similarity index 100%
rename from res/drawable/message_border.xml
rename to src/main/res/drawable/message_border.xml
diff --git a/res/drawable/snackbar.xml b/src/main/res/drawable/snackbar.xml
similarity index 100%
rename from res/drawable/snackbar.xml
rename to src/main/res/drawable/snackbar.xml
diff --git a/res/layout-w360dp/fragment_conversations_overview.xml b/src/main/res/layout-w360dp/fragment_conversations_overview.xml
similarity index 100%
rename from res/layout-w360dp/fragment_conversations_overview.xml
rename to src/main/res/layout-w360dp/fragment_conversations_overview.xml
diff --git a/res/layout-w384dp/fragment_conversations_overview.xml b/src/main/res/layout-w384dp/fragment_conversations_overview.xml
similarity index 100%
rename from res/layout-w384dp/fragment_conversations_overview.xml
rename to src/main/res/layout-w384dp/fragment_conversations_overview.xml
diff --git a/res/layout-w600dp/fragment_conversations_overview.xml b/src/main/res/layout-w600dp/fragment_conversations_overview.xml
similarity index 100%
rename from res/layout-w600dp/fragment_conversations_overview.xml
rename to src/main/res/layout-w600dp/fragment_conversations_overview.xml
diff --git a/res/layout-w960dp/fragment_conversations_overview.xml b/src/main/res/layout-w960dp/fragment_conversations_overview.xml
similarity index 100%
rename from res/layout-w960dp/fragment_conversations_overview.xml
rename to src/main/res/layout-w960dp/fragment_conversations_overview.xml
diff --git a/res/layout/account_row.xml b/src/main/res/layout/account_row.xml
similarity index 100%
rename from res/layout/account_row.xml
rename to src/main/res/layout/account_row.xml
diff --git a/res/layout/actionview_search.xml b/src/main/res/layout/actionview_search.xml
similarity index 100%
rename from res/layout/actionview_search.xml
rename to src/main/res/layout/actionview_search.xml
diff --git a/res/layout/activity_choose_contact.xml b/src/main/res/layout/activity_choose_contact.xml
similarity index 100%
rename from res/layout/activity_choose_contact.xml
rename to src/main/res/layout/activity_choose_contact.xml
diff --git a/res/layout/activity_contact_details.xml b/src/main/res/layout/activity_contact_details.xml
similarity index 100%
rename from res/layout/activity_contact_details.xml
rename to src/main/res/layout/activity_contact_details.xml
diff --git a/res/layout/activity_edit_account.xml b/src/main/res/layout/activity_edit_account.xml
similarity index 100%
rename from res/layout/activity_edit_account.xml
rename to src/main/res/layout/activity_edit_account.xml
diff --git a/res/layout/activity_muc_details.xml b/src/main/res/layout/activity_muc_details.xml
similarity index 100%
rename from res/layout/activity_muc_details.xml
rename to src/main/res/layout/activity_muc_details.xml
diff --git a/res/layout/activity_publish_profile_picture.xml b/src/main/res/layout/activity_publish_profile_picture.xml
similarity index 100%
rename from res/layout/activity_publish_profile_picture.xml
rename to src/main/res/layout/activity_publish_profile_picture.xml
diff --git a/res/layout/activity_start_conversation.xml b/src/main/res/layout/activity_start_conversation.xml
similarity index 100%
rename from res/layout/activity_start_conversation.xml
rename to src/main/res/layout/activity_start_conversation.xml
diff --git a/res/layout/contact.xml b/src/main/res/layout/contact.xml
similarity index 100%
rename from res/layout/contact.xml
rename to src/main/res/layout/contact.xml
diff --git a/res/layout/contact_key.xml b/src/main/res/layout/contact_key.xml
similarity index 100%
rename from res/layout/contact_key.xml
rename to src/main/res/layout/contact_key.xml
diff --git a/res/layout/conversation_list_row.xml b/src/main/res/layout/conversation_list_row.xml
similarity index 100%
rename from res/layout/conversation_list_row.xml
rename to src/main/res/layout/conversation_list_row.xml
diff --git a/res/layout/create_contact_dialog.xml b/src/main/res/layout/create_contact_dialog.xml
similarity index 100%
rename from res/layout/create_contact_dialog.xml
rename to src/main/res/layout/create_contact_dialog.xml
diff --git a/res/layout/dialog_clear_history.xml b/src/main/res/layout/dialog_clear_history.xml
similarity index 100%
rename from res/layout/dialog_clear_history.xml
rename to src/main/res/layout/dialog_clear_history.xml
diff --git a/res/layout/dialog_verify_otr.xml b/src/main/res/layout/dialog_verify_otr.xml
similarity index 100%
rename from res/layout/dialog_verify_otr.xml
rename to src/main/res/layout/dialog_verify_otr.xml
diff --git a/res/layout/fragment_conversation.xml b/src/main/res/layout/fragment_conversation.xml
similarity index 100%
rename from res/layout/fragment_conversation.xml
rename to src/main/res/layout/fragment_conversation.xml
diff --git a/res/layout/fragment_conversations_overview.xml b/src/main/res/layout/fragment_conversations_overview.xml
similarity index 100%
rename from res/layout/fragment_conversations_overview.xml
rename to src/main/res/layout/fragment_conversations_overview.xml
diff --git a/res/layout/join_conference_dialog.xml b/src/main/res/layout/join_conference_dialog.xml
similarity index 100%
rename from res/layout/join_conference_dialog.xml
rename to src/main/res/layout/join_conference_dialog.xml
diff --git a/res/layout/manage_accounts.xml b/src/main/res/layout/manage_accounts.xml
similarity index 100%
rename from res/layout/manage_accounts.xml
rename to src/main/res/layout/manage_accounts.xml
diff --git a/res/layout/message_null.xml b/src/main/res/layout/message_null.xml
similarity index 100%
rename from res/layout/message_null.xml
rename to src/main/res/layout/message_null.xml
diff --git a/res/layout/message_received.xml b/src/main/res/layout/message_received.xml
similarity index 100%
rename from res/layout/message_received.xml
rename to src/main/res/layout/message_received.xml
diff --git a/res/layout/message_sent.xml b/src/main/res/layout/message_sent.xml
similarity index 100%
rename from res/layout/message_sent.xml
rename to src/main/res/layout/message_sent.xml
diff --git a/res/layout/message_status.xml b/src/main/res/layout/message_status.xml
similarity index 100%
rename from res/layout/message_status.xml
rename to src/main/res/layout/message_status.xml
diff --git a/res/layout/quickedit.xml b/src/main/res/layout/quickedit.xml
similarity index 100%
rename from res/layout/quickedit.xml
rename to src/main/res/layout/quickedit.xml
diff --git a/res/layout/share_with.xml b/src/main/res/layout/share_with.xml
similarity index 100%
rename from res/layout/share_with.xml
rename to src/main/res/layout/share_with.xml
diff --git a/res/menu/attachment_choices.xml b/src/main/res/menu/attachment_choices.xml
similarity index 100%
rename from res/menu/attachment_choices.xml
rename to src/main/res/menu/attachment_choices.xml
diff --git a/res/menu/choose_contact.xml b/src/main/res/menu/choose_contact.xml
similarity index 100%
rename from res/menu/choose_contact.xml
rename to src/main/res/menu/choose_contact.xml
diff --git a/res/menu/conference_context.xml b/src/main/res/menu/conference_context.xml
similarity index 100%
rename from res/menu/conference_context.xml
rename to src/main/res/menu/conference_context.xml
diff --git a/res/menu/contact_context.xml b/src/main/res/menu/contact_context.xml
similarity index 100%
rename from res/menu/contact_context.xml
rename to src/main/res/menu/contact_context.xml
diff --git a/res/menu/contact_details.xml b/src/main/res/menu/contact_details.xml
similarity index 100%
rename from res/menu/contact_details.xml
rename to src/main/res/menu/contact_details.xml
diff --git a/res/menu/conversations.xml b/src/main/res/menu/conversations.xml
similarity index 100%
rename from res/menu/conversations.xml
rename to src/main/res/menu/conversations.xml
diff --git a/res/menu/encryption_choices.xml b/src/main/res/menu/encryption_choices.xml
similarity index 100%
rename from res/menu/encryption_choices.xml
rename to src/main/res/menu/encryption_choices.xml
diff --git a/res/menu/manageaccounts.xml b/src/main/res/menu/manageaccounts.xml
similarity index 100%
rename from res/menu/manageaccounts.xml
rename to src/main/res/menu/manageaccounts.xml
diff --git a/res/menu/manageaccounts_context.xml b/src/main/res/menu/manageaccounts_context.xml
similarity index 100%
rename from res/menu/manageaccounts_context.xml
rename to src/main/res/menu/manageaccounts_context.xml
diff --git a/res/menu/message_context.xml b/src/main/res/menu/message_context.xml
similarity index 100%
rename from res/menu/message_context.xml
rename to src/main/res/menu/message_context.xml
diff --git a/res/menu/muc_details.xml b/src/main/res/menu/muc_details.xml
similarity index 100%
rename from res/menu/muc_details.xml
rename to src/main/res/menu/muc_details.xml
diff --git a/res/menu/share_with.xml b/src/main/res/menu/share_with.xml
similarity index 100%
rename from res/menu/share_with.xml
rename to src/main/res/menu/share_with.xml
diff --git a/res/menu/start_conversation.xml b/src/main/res/menu/start_conversation.xml
similarity index 100%
rename from res/menu/start_conversation.xml
rename to src/main/res/menu/start_conversation.xml
diff --git a/res/values-ca/arrays.xml b/src/main/res/values-ca/arrays.xml
similarity index 100%
rename from res/values-ca/arrays.xml
rename to src/main/res/values-ca/arrays.xml
diff --git a/res/values-ca/strings.xml b/src/main/res/values-ca/strings.xml
similarity index 100%
rename from res/values-ca/strings.xml
rename to src/main/res/values-ca/strings.xml
diff --git a/res/values-cs/arrays.xml b/src/main/res/values-cs/arrays.xml
similarity index 100%
rename from res/values-cs/arrays.xml
rename to src/main/res/values-cs/arrays.xml
diff --git a/res/values-cs/strings.xml b/src/main/res/values-cs/strings.xml
similarity index 100%
rename from res/values-cs/strings.xml
rename to src/main/res/values-cs/strings.xml
diff --git a/res/values-de/arrays.xml b/src/main/res/values-de/arrays.xml
similarity index 100%
rename from res/values-de/arrays.xml
rename to src/main/res/values-de/arrays.xml
diff --git a/res/values-de/strings.xml b/src/main/res/values-de/strings.xml
similarity index 100%
rename from res/values-de/strings.xml
rename to src/main/res/values-de/strings.xml
diff --git a/res/values-es/arrays.xml b/src/main/res/values-es/arrays.xml
similarity index 100%
rename from res/values-es/arrays.xml
rename to src/main/res/values-es/arrays.xml
diff --git a/res/values-es/strings.xml b/src/main/res/values-es/strings.xml
similarity index 100%
rename from res/values-es/strings.xml
rename to src/main/res/values-es/strings.xml
diff --git a/res/values-eu/arrays.xml b/src/main/res/values-eu/arrays.xml
similarity index 100%
rename from res/values-eu/arrays.xml
rename to src/main/res/values-eu/arrays.xml
diff --git a/res/values-eu/strings.xml b/src/main/res/values-eu/strings.xml
similarity index 100%
rename from res/values-eu/strings.xml
rename to src/main/res/values-eu/strings.xml
diff --git a/res/values-fr/arrays.xml b/src/main/res/values-fr/arrays.xml
similarity index 100%
rename from res/values-fr/arrays.xml
rename to src/main/res/values-fr/arrays.xml
diff --git a/res/values-fr/strings.xml b/src/main/res/values-fr/strings.xml
similarity index 100%
rename from res/values-fr/strings.xml
rename to src/main/res/values-fr/strings.xml
diff --git a/res/values-gl/arrays.xml b/src/main/res/values-gl/arrays.xml
similarity index 100%
rename from res/values-gl/arrays.xml
rename to src/main/res/values-gl/arrays.xml
diff --git a/res/values-gl/strings.xml b/src/main/res/values-gl/strings.xml
similarity index 100%
rename from res/values-gl/strings.xml
rename to src/main/res/values-gl/strings.xml
diff --git a/res/values-it/arrays.xml b/src/main/res/values-it/arrays.xml
similarity index 100%
rename from res/values-it/arrays.xml
rename to src/main/res/values-it/arrays.xml
diff --git a/res/values-it/strings.xml b/src/main/res/values-it/strings.xml
similarity index 100%
rename from res/values-it/strings.xml
rename to src/main/res/values-it/strings.xml
diff --git a/res/values-iw/arrays.xml b/src/main/res/values-iw/arrays.xml
similarity index 100%
rename from res/values-iw/arrays.xml
rename to src/main/res/values-iw/arrays.xml
diff --git a/res/values-iw/strings.xml b/src/main/res/values-iw/strings.xml
similarity index 100%
rename from res/values-iw/strings.xml
rename to src/main/res/values-iw/strings.xml
diff --git a/res/values-nl/arrays.xml b/src/main/res/values-nl/arrays.xml
similarity index 100%
rename from res/values-nl/arrays.xml
rename to src/main/res/values-nl/arrays.xml
diff --git a/res/values-nl/strings.xml b/src/main/res/values-nl/strings.xml
similarity index 100%
rename from res/values-nl/strings.xml
rename to src/main/res/values-nl/strings.xml
diff --git a/res/values-ru/arrays.xml b/src/main/res/values-ru/arrays.xml
similarity index 100%
rename from res/values-ru/arrays.xml
rename to src/main/res/values-ru/arrays.xml
diff --git a/res/values-ru/strings.xml b/src/main/res/values-ru/strings.xml
similarity index 100%
rename from res/values-ru/strings.xml
rename to src/main/res/values-ru/strings.xml
diff --git a/res/values-sv/arrays.xml b/src/main/res/values-sv/arrays.xml
similarity index 100%
rename from res/values-sv/arrays.xml
rename to src/main/res/values-sv/arrays.xml
diff --git a/res/values-sv/strings.xml b/src/main/res/values-sv/strings.xml
similarity index 100%
rename from res/values-sv/strings.xml
rename to src/main/res/values-sv/strings.xml
diff --git a/res/values-zh-rCN/arrays.xml b/src/main/res/values-zh-rCN/arrays.xml
similarity index 100%
rename from res/values-zh-rCN/arrays.xml
rename to src/main/res/values-zh-rCN/arrays.xml
diff --git a/res/values-zh-rCN/strings.xml b/src/main/res/values-zh-rCN/strings.xml
similarity index 100%
rename from res/values-zh-rCN/strings.xml
rename to src/main/res/values-zh-rCN/strings.xml
diff --git a/res/values-zh-rTW/arrays.xml b/src/main/res/values-zh-rTW/arrays.xml
similarity index 100%
rename from res/values-zh-rTW/arrays.xml
rename to src/main/res/values-zh-rTW/arrays.xml
diff --git a/res/values-zh-rTW/strings.xml b/src/main/res/values-zh-rTW/strings.xml
similarity index 100%
rename from res/values-zh-rTW/strings.xml
rename to src/main/res/values-zh-rTW/strings.xml
diff --git a/res/values/arrays.xml b/src/main/res/values/arrays.xml
similarity index 100%
rename from res/values/arrays.xml
rename to src/main/res/values/arrays.xml
diff --git a/res/values/attrs.xml b/src/main/res/values/attrs.xml
similarity index 100%
rename from res/values/attrs.xml
rename to src/main/res/values/attrs.xml
diff --git a/res/values/colors.xml b/src/main/res/values/colors.xml
similarity index 100%
rename from res/values/colors.xml
rename to src/main/res/values/colors.xml
diff --git a/res/values/strings.xml b/src/main/res/values/strings.xml
similarity index 100%
rename from res/values/strings.xml
rename to src/main/res/values/strings.xml
diff --git a/res/values/styles.xml b/src/main/res/values/styles.xml
similarity index 100%
rename from res/values/styles.xml
rename to src/main/res/values/styles.xml
diff --git a/res/values/themes.xml b/src/main/res/values/themes.xml
similarity index 100%
rename from res/values/themes.xml
rename to src/main/res/values/themes.xml
diff --git a/res/xml/preferences.xml b/src/main/res/xml/preferences.xml
similarity index 100%
rename from res/xml/preferences.xml
rename to src/main/res/xml/preferences.xml