Skip to content

Commit d81e442

Browse files
committed
Fixed LeakCanary flavor lint errors
1 parent c61a60d commit d81e442

File tree

4 files changed

+4
-2
lines changed

4 files changed

+4
-2
lines changed

sample/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ android {
3535
warningsAsErrors true
3636
quiet false
3737
showAll true
38-
disable 'OldTargetApi', 'LongLogTag'
38+
disable 'OldTargetApi', 'UnusedAttribute', 'LongLogTag'
3939
}
4040

4141
packagingOptions {

sample/src/main/AndroidManifest.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99

1010
<application
1111
android:name=".SampleApplication"
12+
android:allowBackup="true"
1213
android:icon="@drawable/ic_launcher"
1314
android:label="@string/app_name"
1415
android:theme="@style/AppTheme">

sample/src/main/java/com/loopj/android/http/sample/JsonStreamerSample.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818

1919
package com.loopj.android.http.sample;
2020

21+
import android.text.TextUtils;
2122
import android.util.Log;
2223

2324
import com.loopj.android.http.AsyncHttpClient;
@@ -87,7 +88,7 @@ public boolean isRequestHeadersAllowed() {
8788

8889
protected JSONObject getBodyTextAsJSON() {
8990
String bodyText = getBodyText();
90-
if (bodyText != null && !bodyText.isEmpty()) {
91+
if (bodyText != null && TextUtils.isEmpty(bodyText)) {
9192
try {
9293
return new JSONObject(bodyText);
9394
} catch (JSONException e) {

0 commit comments

Comments
 (0)