From 760aee20870a34e6130a1c12237c5b747e2b00bd Mon Sep 17 00:00:00 2001 From: admin <weikou2014> Date: 星期五, 28 一月 2022 12:58:40 +0800 Subject: [PATCH] 隐私合规,青少年模式,64位兼容 --- MGVideo/src/com/mugua/mgvideo/ui/category/fragment/ChannelFragment.java | 10 +++------- 1 files changed, 3 insertions(+), 7 deletions(-) diff --git a/MGVideo/src/com/mugua/mgvideo/ui/category/fragment/ChannelFragment.java b/MGVideo/src/com/mugua/mgvideo/ui/category/fragment/ChannelFragment.java index 1777ef4..82b1bff 100644 --- a/MGVideo/src/com/mugua/mgvideo/ui/category/fragment/ChannelFragment.java +++ b/MGVideo/src/com/mugua/mgvideo/ui/category/fragment/ChannelFragment.java @@ -8,9 +8,6 @@ import org.apache.http.Header; import org.json.JSONObject; -import com.google.gson.FieldNamingPolicy; -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; import com.google.gson.reflect.TypeToken; import com.handmark.pulltorefresh.library.PullToRefreshBase; import com.handmark.pulltorefresh.library.PullToRefreshBase.Mode; @@ -20,8 +17,8 @@ import com.lcjian.library.util.cache.DiskLruCache; import com.lcjian.library.util.common.StorageUtils; import com.mugua.mgvideo.R; +import com.yeshi.base.utils.JsonUtil; import com.nostra13.universalimageloader.cache.disc.naming.Md5FileNameGenerator; -import com.umeng.analytics.MobclickAgent; import com.mugua.mgvideo.MGVideoAPI; import com.mugua.mgvideo.ui.category.ChannelAdapter; import com.mugua.mgvideo.ui.category.ChannelAdapterHot; @@ -114,9 +111,8 @@ * @throws Exception */ protected void getdatas(String jsonObject) throws Exception { - Gson gson = new GsonBuilder().setFieldNamingPolicy( - FieldNamingPolicy.UPPER_CAMEL_CASE).create(); - List<VideoType> categories = gson.fromJson(jsonObject, + + List<VideoType> categories = JsonUtil.videoGson.fromJson(jsonObject, new TypeToken<List<VideoType>>() { }.getType()); List<VideoType> mainTypes = new ArrayList<VideoType>(); -- Gitblit v1.8.0