Skip to content

Commit 650e224

Browse files
committed
Merge branch 'develop' into feature/site-settings-review
2 parents ad9ee4e + 0504208 commit 650e224

File tree

4 files changed

+11
-6
lines changed

4 files changed

+11
-6
lines changed

WordPressUtils/build.gradle

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ buildscript {
33
jcenter()
44
}
55
dependencies {
6-
classpath 'com.android.tools.build:gradle:1.3.1'
6+
classpath 'com.android.tools.build:gradle:1.5.0'
77
}
88
}
99

@@ -20,7 +20,7 @@ dependencies {
2020
exclude group: 'commons-logging'
2121
}
2222
compile 'com.mcxiaoke.volley:library:1.0.18'
23-
compile 'com.android.support:support-v13:23.0.1'
23+
compile 'com.android.support:support-v13:23.1.1'
2424
}
2525

2626
android {
@@ -29,7 +29,7 @@ android {
2929
publishNonDefault true
3030

3131
compileSdkVersion 23
32-
buildToolsVersion '23.0.1'
32+
buildToolsVersion "23.0.2"
3333

3434
defaultConfig {
3535
versionName "1.5.0"

WordPressUtils/src/main/java/org/wordpress/android/util/MediaUtils.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ public static boolean isVideo(String url) {
6868
}
6969
return url.endsWith(".ogv") || url.endsWith(".mp4") || url.endsWith(".m4v") || url.endsWith(".mov") ||
7070
url.endsWith(".wmv") || url.endsWith(".avi") || url.endsWith(".mpg") || url.endsWith(".3gp") ||
71-
url.endsWith(".3g2");
71+
url.endsWith(".3g2") || url.contains("video");
7272
}
7373

7474
public static boolean isAudio(String url) {

WordPressUtils/src/main/java/org/wordpress/android/util/SqlUtils.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,7 @@ public static boolean dropAllTables(SQLiteDatabase db) throws SQLiteException {
118118
return true;
119119
} finally {
120120
db.endTransaction();
121+
closeCursor(cursor);
121122
}
122123
}
123124

WordPressUtils/src/main/java/org/wordpress/android/util/helpers/LocationHelper.java

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
//This Handy-Dandy class acquired and tweaked from http://stackoverflow.com/a/3145655/309558
22
package org.wordpress.android.util.helpers;
33

4+
import android.annotation.SuppressLint;
45
import android.app.Activity;
56
import android.content.Context;
67
import android.location.Location;
@@ -18,9 +19,8 @@ public class LocationHelper {
1819
boolean mGpsEnabled = false;
1920
boolean mNetworkEnabled = false;
2021

22+
@SuppressLint("MissingPermission")
2123
public boolean getLocation(Activity activity, LocationResult result) {
22-
23-
2424
mLocationResult = result;
2525
if (mLocationManager == null) {
2626
mLocationManager = (LocationManager) activity.getSystemService(Context.LOCATION_SERVICE);
@@ -55,6 +55,7 @@ public boolean getLocation(Activity activity, LocationResult result) {
5555
}
5656

5757
LocationListener locationListenerGps = new LocationListener() {
58+
@SuppressLint("MissingPermission")
5859
public void onLocationChanged(Location location) {
5960
mTimer.cancel();
6061
mLocationResult.gotLocation(location);
@@ -73,6 +74,7 @@ public void onStatusChanged(String provider, int status, Bundle extras) {
7374
};
7475

7576
LocationListener locationListenerNetwork = new LocationListener() {
77+
@SuppressLint("MissingPermission")
7678
public void onLocationChanged(Location location) {
7779
mTimer.cancel();
7880
mLocationResult.gotLocation(location);
@@ -92,6 +94,7 @@ public void onStatusChanged(String provider, int status, Bundle extras) {
9294

9395
class GetLastLocation extends TimerTask {
9496
@Override
97+
@SuppressLint("MissingPermission")
9598
public void run() {
9699
mLocationManager.removeUpdates(locationListenerGps);
97100
mLocationManager.removeUpdates(locationListenerNetwork);
@@ -130,6 +133,7 @@ public static abstract class LocationResult {
130133
public abstract void gotLocation(Location location);
131134
}
132135

136+
@SuppressLint("MissingPermission")
133137
public void cancelTimer() {
134138
if (mTimer != null) {
135139
mTimer.cancel();

0 commit comments

Comments
 (0)