Browse Source

关闭日志,去除跳过内存操作

Shangyp 4 weeks ago
parent
commit
cb433cf8b6

+ 1 - 1
app/src/main/java/com/hanghui/senic/baiduface/BaiduFaceMainActivity.java

@@ -440,7 +440,7 @@ public class BaiduFaceMainActivity extends BaseActivity {
     **/
     private void initLog() {
         boolean isScreenLogOpen = (boolean) SharedPreferencesUtils.getParam(MyAppliction.getContext(), "is_screen_log_open", DevelopUtil.isScreenLogOpen);
-        DevelopUtil.setScreenLogOpen(true);
+        DevelopUtil.setScreenLogOpen(false);
     }
 
 

+ 3 - 9
app/src/main/java/com/hanghui/senic/utils/ImageLoaderUtils.java

@@ -45,9 +45,7 @@ public class ImageLoaderUtils {
         if (requestOptions == null) {
             loadNetworkPic(imageView.getContext(), imageUrl, imageView);
         } else {
-            Glide.with(imageView.getContext()).asBitmap().load(imageUrl).dontAnimate().apply(requestOptions)
-                    .apply(new RequestOptions().skipMemoryCache(true)) // 跳过内存缓存
-                    .into(imageView);
+            Glide.with(imageView.getContext()).asBitmap().load(imageUrl).dontAnimate().apply(requestOptions).into(imageView);
         }
     }
 
@@ -58,9 +56,7 @@ public class ImageLoaderUtils {
         if(context instanceof Activity && ((Activity) context).isFinishing()) {
             return;
         }
-        Glide.with(context).asBitmap().load(pic).dontAnimate().centerCrop()
-                .apply(new RequestOptions().skipMemoryCache(true)) // 跳过内存缓存
-                .into(iv);
+        Glide.with(context).asBitmap().load(pic).dontAnimate().centerCrop().into(iv);
     }
 
     public static void loadRes(@DrawableRes int res, ImageView imageView ){
@@ -70,9 +66,7 @@ public class ImageLoaderUtils {
         if(imageView.getContext() instanceof Activity && ((Activity) imageView.getContext()).isFinishing()){
             return;
         }
-        Glide.with(imageView.getContext()).asBitmap().load(res).dontAnimate().centerCrop()
-                .apply(new RequestOptions().skipMemoryCache(true)) // 跳过内存缓存
-                .placeholder(res).into(imageView);
+        Glide.with(imageView.getContext()).asBitmap().load(res).dontAnimate().centerCrop().placeholder(res).into(imageView);
     }