Explorar o código

Merge remote-tracking branch 'origin/sheep_develop' into sheep_develop

zengjiebin %!s(int64=7) %!d(string=hai) anos
pai
achega
903f4fbf6c

+ 5 - 0
app/build.gradle

@@ -142,6 +142,11 @@ configurations.all {
 }
 
 dependencies {
+    debugImplementation 'com.squareup.leakcanary:leakcanary-android:1.6.2'
+    releaseImplementation 'com.squareup.leakcanary:leakcanary-android-no-op:1.6.2'
+    // Optional, if you use support library fragments:
+    debugImplementation 'com.squareup.leakcanary:leakcanary-support-fragment:1.6.2'
+
     //noinspection GradleCompatible
     implementation "com.android.support:cardview-v7:$supportLibVersion"
     implementation ("com.android.support:design:$supportLibVersion") {

+ 3 - 1
app/src/main/java/com/sheep/gamegroup/view/adapter/TaskdetailSonListviewAdp.java

@@ -306,7 +306,9 @@ public class TaskdetailSonListviewAdp extends BaseAdapter {
                         GlideImageLoader.downLoadImage(name, taskReleaseEty.getTask().getQr_code(), new Action1<File>() {
                             @Override
                             public void call(File file) {
-                                G.showToast("保存成功,图片路径:" + file.getAbsolutePath());
+                                if (file != null) {
+                                    G.showToast("保存成功,图片路径:" + file.getAbsolutePath());
+                                }
                             }
                         });
                     }

+ 10 - 0
app/src/main/java/com/sheep/jiuyan/samllsheep/SheepApp.java

@@ -44,6 +44,8 @@ import com.sheep.jiuyan.samllsheep.service.DownloadService;
 import com.sheep.jiuyan.samllsheep.service.FloatShotScreenService;
 import com.sheep.jiuyan.samllsheep.utils.G;
 import com.sheep.jiuyan.samllsheep.utils.SpUtils;
+import com.squareup.leakcanary.LeakCanary;
+import com.squareup.leakcanary.RefWatcher;
 import com.tencent.bugly.Bugly;
 import com.tencent.bugly.beta.Beta;
 import com.tencent.smtt.sdk.QbSdk;
@@ -146,6 +148,12 @@ public class SheepApp extends MultiDexApplication {
         }
     }
 
+    private RefWatcher refWatcher;
+
+    public static RefWatcher getRefWatcher() {
+        return mSheepApp.refWatcher;
+    }
+
     @Override
     public void onCreate() {
         super.onCreate();
@@ -157,6 +165,8 @@ public class SheepApp extends MultiDexApplication {
             initUtils();
             detectFileUriExposure();
             ChannelContent.getInstance().initChannelContent(this);
+
+            refWatcher = LeakCanary.install(this);
         }
     }
 

+ 1 - 1
small_sheep_android.iml

@@ -13,7 +13,7 @@
     <content url="file://$MODULE_DIR$">
       <excludeFolder url="file://$MODULE_DIR$/.gradle" />
     </content>
-    <orderEntry type="inheritedJdk" />
+    <orderEntry type="jdk" jdkName="1.8" jdkType="JavaSDK" />
     <orderEntry type="sourceFolder" forTests="false" />
   </component>
 </module>