Skip to content

Commit

Permalink
Merge pull request #68 from CruGlobal/v4.1.3
Browse files Browse the repository at this point in the history
v4.1.3 Support Release
  • Loading branch information
ryancarlson committed Oct 23, 2015
2 parents aa1887e + e7ce5dd commit d6a0242
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 11 deletions.
6 changes: 3 additions & 3 deletions AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="org.keynote.godtools.android"
android:versionCode="18"
android:versionName="4.1.2"
android:versionCode="19"
android:versionName="4.1.3"
android:installLocation="preferExternal">

<application
Expand Down Expand Up @@ -140,7 +140,7 @@

<uses-sdk
android:minSdkVersion="10"
android:targetSdkVersion="19" />
android:targetSdkVersion="22" />
<supports-screens
android:smallScreens="false"
android:resizeable="false" />
Expand Down
6 changes: 3 additions & 3 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ repositories {
dependencies {
// some dependencies will not be updated as these particular versions are needed by the app.
//noinspection GradleDynamicVersion,GradleDependency
compile 'com.android.support:appcompat-v7:19.1.+'
compile 'com.android.support:appcompat-v7:22.2.0'
compile fileTree(dir: 'libs', include: '*.jar')
//noinspection GradleDependency
compile 'com.google.android.gms:play-services:4.3.23'
Expand All @@ -32,8 +32,8 @@ dependencies {
}

android {
compileSdkVersion 19
buildToolsVersion '19.1.0'
compileSdkVersion 22
buildToolsVersion '22.0.1'
sourceSets {
main {
manifest.srcFile 'AndroidManifest.xml'
Expand Down
4 changes: 2 additions & 2 deletions res/layout-v14/settings.xml → res/layout/settings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@
android:layout_alignParentStart="true"
android:background="#ffffffff"/>

<Switch
<android.support.v7.widget.SwitchCompat
android:background="#00ffffff"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
Expand Down Expand Up @@ -274,7 +274,7 @@
android:layout_alignParentStart="true"
android:background="#ffffffff"/>

<Switch
<android.support.v7.widget.SwitchCompat
android:background="#00ffffff"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
Expand Down
21 changes: 18 additions & 3 deletions src/org/keynote/godtools/android/http/DownloadTask.java
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,6 @@
import java.net.URL;
import java.util.List;

import io.fabric.sdk.android.services.common.Crash;

public class DownloadTask extends AsyncTask<Object, Void, Boolean> {

private DownloadTaskHandler mTaskHandler;
Expand All @@ -50,19 +48,28 @@ protected Boolean doInBackground(Object... params) {
tag = params[2].toString();
String authorization = (String) params[3];
langCode = params[4].toString();
int downloadResponseCode = -1;
int downloadContentLength = -1;

try {

HttpURLConnection connection = getHttpURLConnection(url, authorization);

connection.connect();

downloadResponseCode = connection.getResponseCode();
downloadContentLength = connection.getContentLength();

DataInputStream dis = new DataInputStream(connection.getInputStream());

File zipfile = new File(filePath);
String parentDir = zipfile.getParent();
File unzipDir = new File(parentDir);
unzipDir.mkdirs();

if(!(unzipDir.mkdirs() && unzipDir.isDirectory()))
{
throw new RuntimeException("Unable to create directory");
}

byte[] buffer = new byte[2048];
int length;
Expand Down Expand Up @@ -130,6 +137,14 @@ protected Boolean doInBackground(Object... params) {
return true;

} catch (Exception e) {
Crashlytics.setString("url", url);
Crashlytics.setString("filePath", filePath);
Crashlytics.setString("tag", tag);
Crashlytics.setString("authorization", authorization);
Crashlytics.setString("langCode", langCode);
Crashlytics.setString("downloadResponseStatus", Integer.toString(downloadResponseCode));
Crashlytics.setString("downloadContentLength", Integer.toString(downloadContentLength));

Crashlytics.logException(e);
return false;
}
Expand Down

0 comments on commit d6a0242

Please sign in to comment.