Commit 91ae722c authored by Romain Hunault's avatar Romain Hunault

Merge branch 'sprint_cordoba' into 'master'

[RELEASE] Sprint cordoba

See merge request !14
parents 73bf73bc b7c34be4
Pipeline #34287 passed with stage
in 13 minutes and 41 seconds
......@@ -17,7 +17,7 @@ build:
stage: build
script:
- |
./gradlew build
./gradlew assemble
retval=$?
if [$retval -ne 0]; then
echo "error on building, exit code: "$retval
......
......@@ -9,12 +9,12 @@ notifications:
env:
global:
- COMPILE_API_LEVEL=27
- COMPILE_API_LEVEL=29
- EMULATOR_API_LEVEL=24 # It seems emulator levels 25,26,27 from main repos have google_apis by default, and do not support armeabi-v7a. Check commit comment.
- EMULATOR_TAG=default # Possible values are default, google_apis, android-tv, android-wear, android-wear-cn
- EMULATOR_ABI=armeabi-v7a # Default is armeabi-v7a, possible options are: x86, x86_64, mips, arm64-v8a, armeabi-v7a. Note: check commit comment
- EMULATOR_NAME=qksms3
- ANDROID_BUILD_TOOLS_VERSION=27.0.2 # Match build-tools version used in build.gradle
- ANDROID_BUILD_TOOLS_VERSION=29.0.2 # Match build-tools version used in build.gradle
- EMULATOR="system-images;android-${EMULATOR_API_LEVEL};${EMULATOR_TAG};${EMULATOR_ABI}" # Used to install/create emulator
android:
......@@ -36,8 +36,9 @@ android:
# Set up Android-sdk and the emulator
before_install:
# Decrypt keystore
- openssl aes-256-cbc -K $encrypted_4d1d940e2c65_key -iv $encrypted_4d1d940e2c65_iv -in keystore.enc -out keystore -d
# Decrypt keystore and google-services.json
- openssl aes-256-cbc -K $encrypted_4d1d940e2c65_key -iv $encrypted_4d1d940e2c65_iv -in secrets.tar.enc -out secrets.tar -d
- tar xvf secrets.tar
- echo 'count=0' > /home/travis/.android/repositories.cfg # Avoid warning
- ls -lar $HOME/**/*
......@@ -49,7 +50,7 @@ before_install:
- yes | sdkmanager "platforms;android-${EMULATOR_API_LEVEL}" # Android platform required by emulator
- yes | sdkmanager "platforms;android-${COMPILE_API_LEVEL}" # Android platform required by compiler
- yes | sdkmanager "build-tools;${ANDROID_BUILD_TOOLS_VERSION}" # Android build tools
- yes | sdkmanager "${EMULATOR}" # Install emulator system image
- yes | sdkmanager "${EMULATOR}" # Install emulator system image
- sdkmanager --list || true # Print out package list for debug purposes
# Run the emulator
......@@ -75,7 +76,7 @@ before_script:
# Build APK
script:
- |
./gradlew :presentation:assembleWithAnalyticsRelease assembleAndroidTest -PtestCoverageEnabled='true'
./gradlew :presentation:assembleWithAnalyticsRelease :presentation:bundleWithAnalyticsRelease assembleAndroidTest -PtestCoverageEnabled='true'
retval=$?
if [$retval -ne 0]; then
echo "error on assembling, exit code: "$retval
......@@ -90,9 +91,8 @@ deploy:
api_key:
secure: XF7V/I02gpyOzCAFXEFyrThXVUUnKjSaWQ8lppO50mVtdugimjWIPtHrcYASaJQf9INhqo0lamk+khPxtKxc1BSCp8o+c22UKcpczyjD4kK27a3zKfuNQWteBRjCH34vIGnrRFSHSWYLIgeuoIK3q5Lq4IBK/Od3mfpRaDt1ER+IqMzR3L205x1H8dW3MVuxXgdnq3jHlRpq86oOe293+dnblVCtWUvAzwhZPnnbBc4JUaNomMI7dLJ/pAigByCoHHmG9pc2Cky1yyWVAnTZFAlf2PbzPDLRRnXmHuYKfHxiZgd/l8JTiZdhky9cXgFoSxvJyDABRqqLxVNfXt2ZwgdtiulZml8RB1FB0L37qL72mxWgi6y9IbQgt/FG20K2QpSBglk0bCGLS+h5Yz3kV4fhsBY7llpWGw14BvlAx9sUfl3Ej+IUsWoJgA00TFNGDG8sMyOFoCQVz/sB4Dv4h+JfynJZcmm8okcfYrWBHOoHY7cH3chBWp/2A736f2A/aqnBd6z8a03toe2ILC9eSOiIhrVxPyqLmEKBD1rCduVFNteqGwm9G9YwKpvFibTqu0gqEtfF7cmuMH6M5PYExI5EzoewZTYmgp02+lBuFAEMvycVvXcu8VfeeT6cgeLlmz2hsbo93UfoSQyP+gSojMOOkVUsl6mIp1STLiJ5IRY=
file:
- /home/travis/build/moezbhatti/qksms/presentation/build/outputs/apk/withAnalytics/release/presentation-withAnalytics-arm64-v8a-release.apk
- /home/travis/build/moezbhatti/qksms/presentation/build/outputs/apk/withAnalytics/release/presentation-withAnalytics-armeabi-v7a-release.apk
- /home/travis/build/moezbhatti/qksms/presentation/build/outputs/apk/withAnalytics/release/presentation-withAnalytics-universal-release.apk
- /home/travis/build/moezbhatti/qksms/presentation/build/outputs/bundle/withAnalyticsRelease/presentation.aab
- /home/travis/build/moezbhatti/qksms/presentation/build/outputs/apk/withAnalytics/release/presentation-withAnalytics-release.apk
on:
repo: moezbhatti/qksms
tags: true
\ No newline at end of file
......@@ -38,7 +38,6 @@ android {
dependencies {
implementation "com.jakewharton.timber:timber:$timber_version"
implementation 'com.klinkerapps:logger:1.0.3'
implementation 'com.squareup.okhttp:okhttp:2.5.0'
implementation 'com.squareup.okhttp:okhttp-urlconnection:2.5.0'
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
......
......@@ -23,15 +23,14 @@ import android.content.Context;
import android.database.Cursor;
import android.net.Uri;
import android.widget.Toast;
import com.klinker.android.logger.Log;
import org.jetbrains.annotations.Nullable;
import timber.log.Timber;
/**
* @hide
*/
public final class SqliteWrapper {
private static final String TAG = "SqliteWrapper";
private static final String SQLITE_EXCEPTION_DETAIL_MESSAGE
= "unable to open database file";
......@@ -59,7 +58,7 @@ public final class SqliteWrapper {
try {
return resolver.query(uri, projection, selection, selectionArgs, sortOrder);
} catch (SQLiteException e) {
Log.e(TAG, "Catch a SQLiteException when query: ", e);
Timber.e(e, "Catch a SQLiteException when query: ");
checkSQLiteException(context, e);
return null;
}
......@@ -70,7 +69,7 @@ public final class SqliteWrapper {
try {
return resolver.update(uri, values, where, selectionArgs);
} catch (SQLiteException e) {
Log.e(TAG, "Catch a SQLiteException when update: ", e);
Timber.e(e, "Catch a SQLiteException when update: ");
checkSQLiteException(context, e);
return -1;
}
......@@ -81,7 +80,7 @@ public final class SqliteWrapper {
try {
return resolver.delete(uri, where, selectionArgs);
} catch (SQLiteException e) {
Log.e(TAG, "Catch a SQLiteException when delete: ", e);
Timber.e(e, "Catch a SQLiteException when delete: ");
checkSQLiteException(context, e);
return -1;
}
......@@ -92,7 +91,7 @@ public final class SqliteWrapper {
try {
return resolver.insert(uri, values);
} catch (SQLiteException e) {
Log.e(TAG, "Catch a SQLiteException when insert: ", e);
Timber.e(e, "Catch a SQLiteException when insert: ");
checkSQLiteException(context, e);
return null;
}
......
......@@ -17,7 +17,7 @@
package android.net;
import android.text.TextUtils;
import com.klinker.android.logger.Log;
import timber.log.Timber;
import java.net.Inet4Address;
import java.net.InetAddress;
......@@ -32,7 +32,6 @@ import java.util.Collections;
* @hide
*/
public class DhcpInfoInternal {
private final static String TAG = "DhcpInfoInternal";
public String ipAddress;
public int prefixLength;
......@@ -96,7 +95,7 @@ public class DhcpInfoInternal {
public LinkAddress makeLinkAddress() {
if (TextUtils.isEmpty(ipAddress)) {
Log.e(TAG, "makeLinkAddress with empty ipAddress");
Timber.e("makeLinkAddress with empty ipAddress");
return null;
}
return new LinkAddress(NetworkUtilsHelper.numericToInetAddress(ipAddress), prefixLength);
......@@ -112,12 +111,12 @@ public class DhcpInfoInternal {
if (TextUtils.isEmpty(dns1) == false) {
p.addDns(NetworkUtilsHelper.numericToInetAddress(dns1));
} else {
Log.d(TAG, "makeLinkProperties with empty dns1!");
Timber.d("makeLinkProperties with empty dns1!");
}
if (TextUtils.isEmpty(dns2) == false) {
p.addDns(NetworkUtilsHelper.numericToInetAddress(dns2));
} else {
Log.d(TAG, "makeLinkProperties with empty dns2!");
Timber.d("makeLinkProperties with empty dns2!");
}
return p;
}
......
......@@ -18,7 +18,7 @@ package android.net;
import android.os.Parcel;
import android.os.Parcelable;
import com.klinker.android.logger.Log;
import timber.log.Timber;
import java.util.Collection;
import java.util.HashMap;
......@@ -32,7 +32,6 @@ import java.util.Set;
* @hide
*/
public class LinkCapabilities implements Parcelable {
private static final String TAG = "LinkCapabilities";
private static final boolean DBG = false;
/**
......@@ -388,6 +387,6 @@ public class LinkCapabilities implements Parcelable {
* Debug logging
*/
protected static void log(String s) {
Log.d(TAG, s);
Timber.d(s);
}
}
......@@ -16,7 +16,7 @@
package android.net;
import com.klinker.android.logger.Log;
import timber.log.Timber;
import java.net.Inet4Address;
import java.net.Inet6Address;
......@@ -31,8 +31,6 @@ import java.util.Collection;
*/
public class NetworkUtilsHelper {
private static final String TAG = "NetworkUtils";
/**
* Bring the named network interface up.
*/
......@@ -255,7 +253,7 @@ public class NetworkUtilsHelper {
addrHexString.substring(16, 20), addrHexString.substring(20, 24),
addrHexString.substring(24, 28), addrHexString.substring(28, 32)));
} catch (Exception e) {
Log.e("NetworkUtils", "error in hexToInet6Address(" + addrHexString + "): " + e);
Timber.e("error in hexToInet6Address(" + addrHexString + "): " + e);
throw new IllegalArgumentException(e);
}
}
......
......@@ -18,7 +18,7 @@ package android.net;
import android.os.Parcel;
import android.os.Parcelable;
import com.klinker.android.logger.Log;
import timber.log.Timber;
import java.net.Inet4Address;
import java.net.Inet6Address;
......@@ -32,7 +32,6 @@ import java.util.Collection;
* @hide
*/
public class RouteInfo implements Parcelable {
private static final String TAG = "RouteInfo";
/**
* The IP destination address for this route.
*/
......@@ -54,14 +53,14 @@ public class RouteInfo implements Parcelable {
destination = new LinkAddress(Inet4Address.getLocalHost(), 0);
} catch (UnknownHostException e) {
// TODO Auto-generated catch block
Log.e(TAG, "exception thrown", e);
Timber.e(e, "exception thrown");
}
} else {
try {
destination = new LinkAddress(Inet6Address.getLocalHost(), 0);
} catch (UnknownHostException e) {
// TODO Auto-generated catch block
Log.e(TAG, "exception thrown", e);
Timber.e(e, "exception thrown");
}
}
} else {
......@@ -75,14 +74,14 @@ public class RouteInfo implements Parcelable {
gateway = Inet4Address.getLocalHost();
} catch (UnknownHostException e) {
// TODO Auto-generated catch block
Log.e(TAG, "exception thrown", e);
Timber.e(e, "exception thrown");
}
} else {
try {
gateway = Inet6Address.getLocalHost();
} catch (UnknownHostException e) {
// TODO Auto-generated catch block
Log.e(TAG, "exception thrown", e);
Timber.e(e, "exception thrown");
}
}
}
......
......@@ -18,15 +18,14 @@ package com.android.mms;
import android.content.Context;
import android.content.res.XmlResourceParser;
import com.klinker.android.logger.Log;
import com.klinker.android.send_message.R;
import org.xmlpull.v1.XmlPullParser;
import org.xmlpull.v1.XmlPullParserException;
import timber.log.Timber;
import java.io.IOException;
public class MmsConfig {
private static final String TAG = "MmsConfig";
private static final boolean DEBUG = true;
private static final boolean LOCAL_LOGV = false;
......@@ -107,7 +106,7 @@ public class MmsConfig {
public static void init(Context context) {
if (LOCAL_LOGV) {
Log.v(TAG, "MmsConfig.init()");
Timber.v("MmsConfig.init()");
}
// Always put the mnc/mcc in the log so we can tell which mms_config.xml was loaded.
......@@ -120,7 +119,7 @@ public class MmsConfig {
public static int getMaxMessageSize() {
if (LOCAL_LOGV) {
Log.v(TAG, "MmsConfig.getMaxMessageSize(): " + mMaxMessageSize);
Timber.v("MmsConfig.getMaxMessageSize(): " + mMaxMessageSize);
}
return mMaxMessageSize;
}
......@@ -209,7 +208,7 @@ public class MmsConfig {
}
if (DEBUG) {
Log.v(TAG, "tag: " + tag + " value: " + value + " - " +
Timber.v("tag: " + tag + " value: " + value + " - " +
text);
}
if ("name".equalsIgnoreCase(name)) {
......@@ -297,11 +296,11 @@ public class MmsConfig {
}
}
} catch (XmlPullParserException e) {
Log.e(TAG, "loadMmsSettings caught ", e);
Timber.e(e, "loadMmsSettings caught ");
} catch (NumberFormatException e) {
Log.e(TAG, "loadMmsSettings caught ", e);
Timber.e(e, "loadMmsSettings caught ");
} catch (IOException e) {
Log.e(TAG, "loadMmsSettings caught ", e);
Timber.e(e, "loadMmsSettings caught ");
} finally {
parser.close();
}
......@@ -316,7 +315,7 @@ public class MmsConfig {
String err =
String.format("MmsConfig.loadMmsSettings mms_config.xml missing %s setting",
errorStr);
Log.e(TAG, err);
Timber.e(err);
}
}
......
......@@ -16,17 +16,15 @@
package com.android.mms.dom.events;
import com.android.mms.logs.LogTag;
import com.klinker.android.logger.Log;
import org.w3c.dom.events.Event;
import org.w3c.dom.events.EventException;
import org.w3c.dom.events.EventListener;
import org.w3c.dom.events.EventTarget;
import timber.log.Timber;
import java.util.ArrayList;
public class EventTargetImpl implements EventTarget {
private static final String TAG = LogTag.TAG;
private ArrayList<EventListenerEntry> mListenerEntries;
private EventTarget mNodeTarget;
......@@ -98,7 +96,7 @@ public class EventTargetImpl implements EventTarget {
catch (Exception e) {
// Any exceptions thrown inside an EventListener will
// not stop propagation of the event
Log.w(TAG, "Catched EventListener exception", e);
Timber.w(e, "Catched EventListener exception");
}
}
}
......
......@@ -16,18 +16,16 @@
package com.android.mms.dom.smil;
import com.android.mms.logs.LogTag;
import com.klinker.android.logger.Log;
import org.w3c.dom.DOMException;
import org.w3c.dom.smil.ElementTime;
import org.w3c.dom.smil.SMILElement;
import org.w3c.dom.smil.Time;
import org.w3c.dom.smil.TimeList;
import timber.log.Timber;
import java.util.ArrayList;
public abstract class ElementTimeImpl implements ElementTime {
private static final String TAG = LogTag.TAG;
private static final String FILL_REMOVE_ATTRIBUTE = "remove";
private static final String FILL_FREEZE_ATTRIBUTE = "freeze";
......@@ -131,7 +129,7 @@ public abstract class ElementTimeImpl implements ElementTime {
getEndConstraints()));
} catch (IllegalArgumentException e) {
// Ignore badly formatted times
Log.e(TAG, "Malformed time value.", e);
Timber.e(e, "Malformed time value.");
}
}
}
......
......@@ -17,23 +17,19 @@
package com.android.mms.dom.smil;
import com.android.mms.dom.events.EventImpl;
import com.android.mms.logs.LogTag;
import com.klinker.android.logger.Log;
import org.w3c.dom.DOMException;
import org.w3c.dom.events.DocumentEvent;
import org.w3c.dom.events.Event;
import org.w3c.dom.smil.ElementTime;
import org.w3c.dom.smil.SMILMediaElement;
import org.w3c.dom.smil.TimeList;
import timber.log.Timber;
public class SmilMediaElementImpl extends SmilElementImpl implements
SMILMediaElement {
public class SmilMediaElementImpl extends SmilElementImpl implements SMILMediaElement {
public final static String SMIL_MEDIA_START_EVENT = "SmilMediaStart";
public final static String SMIL_MEDIA_END_EVENT = "SmilMediaEnd";
public final static String SMIL_MEDIA_PAUSE_EVENT = "SmilMediaPause";
public final static String SMIL_MEDIA_SEEK_EVENT = "SmilMediaSeek";
private final static String TAG = LogTag.TAG;
private static final boolean DEBUG = false;
private static final boolean LOCAL_LOGV = false;
ElementTime mElementTime = new ElementTimeImpl(this) {
......@@ -43,7 +39,7 @@ public class SmilMediaElementImpl extends SmilElementImpl implements
Event event = doc.createEvent("Event");
event.initEvent(eventType, false, false);
if (LOCAL_LOGV) {
Log.v(TAG, "Dispatching 'begin' event to "
Timber.v("Dispatching 'begin' event to "
+ SmilMediaElementImpl.this.getTagName() + " "
+ SmilMediaElementImpl.this.getSrc() + " at "
+ System.currentTimeMillis());
......@@ -57,7 +53,7 @@ public class SmilMediaElementImpl extends SmilElementImpl implements
EventImpl event = (EventImpl) doc.createEvent("Event");
event.initEvent(eventType, false, false, seekTo);
if (LOCAL_LOGV) {
Log.v(TAG, "Dispatching 'begin' event to "
Timber.v("Dispatching 'begin' event to "
+ SmilMediaElementImpl.this.getTagName() + " "
+ SmilMediaElementImpl.this.getSrc() + " at "
+ System.currentTimeMillis());
......@@ -106,7 +102,7 @@ public class SmilMediaElementImpl extends SmilElementImpl implements
// Discrete media
dur = 0;
} else {
Log.w(TAG, "Unknown media type");
Timber.w("Unknown media type");
}
}
return dur;
......
......@@ -16,11 +16,10 @@
package com.android.mms.dom.smil;
import com.android.mms.logs.LogTag;
import com.klinker.android.logger.Log;
import org.w3c.dom.DOMException;
import org.w3c.dom.smil.SMILDocument;
import org.w3c.dom.smil.SMILRegionElement;
import timber.log.Timber;
public class SmilRegionElementImpl extends SmilElementImpl implements
SMILRegionElement {
......@@ -45,8 +44,6 @@ public class SmilRegionElementImpl extends SmilElementImpl implements
private static final String RIGHT_ATTRIBUTE_NAME = "right";
private static final String BOTTOM_ATTRIBUTE_NAME = "bottom";
private static final String FIT_ATTRIBUTE_NAME = "fit";
private static final String TAG = LogTag.TAG;
private static final boolean DEBUG = false;
private static final boolean LOCAL_LOGV = false;
SmilRegionElementImpl(SmilDocumentImpl owner, String tagName) {
......@@ -77,7 +74,7 @@ public class SmilRegionElementImpl extends SmilElementImpl implements
return parseRegionLength(getAttribute(LEFT_ATTRIBUTE_NAME), true);
} catch (NumberFormatException e) {
if (LOCAL_LOGV) {
Log.v(TAG, "Left attribute is not set or incorrect.");
Timber.v("Left attribute is not set or incorrect.");
}
}