Skip to content

Commit 6ad7e5c

Browse files
committed
fix lint errors
1 parent b7d5983 commit 6ad7e5c

File tree

4 files changed

+11
-6
lines changed

4 files changed

+11
-6
lines changed

WordPressUtils/build.gradle

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,14 +18,16 @@ repositories {
1818
dependencies {
1919
compile 'commons-lang:commons-lang:2.6'
2020
compile 'com.mcxiaoke.volley:library:1.0.10'
21-
compile 'com.android.support:support-v13:22.2.0'
21+
compile 'com.android.support:support-v13:23.0.0'
2222
}
2323

2424
android {
25+
useLibrary 'org.apache.http.legacy'
26+
2527
publishNonDefault true
2628

27-
compileSdkVersion 22
28-
buildToolsVersion '22.0.1'
29+
compileSdkVersion 23
30+
buildToolsVersion '23.0.0'
2931

3032
defaultConfig {
3133
versionName "1.5.0"
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
33
package="org.wordpress.android.util">
4-
4+
<uses-permission android:name="android.permission.GET_ACCOUNTS" />
55
</manifest>

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55
import android.content.Context;
66
import android.util.Patterns;
77

8+
import org.wordpress.android.util.AppLog.T;
9+
810
import java.util.regex.Pattern;
911

1012
public class UserEmailUtils {
@@ -29,6 +31,7 @@ public static String getPrimaryEmail(Context context) {
2931
return "";
3032
} catch (SecurityException e) {
3133
// exception will occur if app doesn't have GET_ACCOUNTS permission
34+
AppLog.e(T.UTILS, "SecurityException - missing GET_ACCOUNTS permission");
3235
return "";
3336
}
3437
}

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@ public void init(Activity activity, CustomSwipeRefreshLayout swipeRefreshLayout,
2828
mSwipeRefreshLayout.setOnRefreshListener(this);
2929
final TypedArray styleAttrs = obtainStyledAttrsFromThemeAttr(activity, R.attr.swipeToRefreshStyle,
3030
R.styleable.RefreshIndicator);
31-
int color = styleAttrs.getColor(R.styleable.RefreshIndicator_refreshIndicatorColor,
32-
android.R.color.holo_blue_dark);
31+
int color = styleAttrs.getColor(R.styleable.RefreshIndicator_refreshIndicatorColor, activity.getResources()
32+
.getColor(android.R.color.holo_blue_dark));
3333
mSwipeRefreshLayout.setColorSchemeColors(color, color, color, color);
3434
}
3535

0 commit comments

Comments
 (0)