调整书架更新逻辑
This commit is contained in:
		
							parent
							
								
									c92fd2e52d
								
							
						
					
					
						commit
						da8acff50b
					
				|  | @ -242,10 +242,10 @@ void initTabs(){ | ||||||
|         int novelId = novel.getNovelId(); |         int novelId = novel.getNovelId(); | ||||||
|         long id = novel.getId(); |         long id = novel.getId(); | ||||||
|         Log.d(TAG, String.format("prepare book %s ,start to loading book info from host ",novel.getName())); |         Log.d(TAG, String.format("prepare book %s ,start to loading book info from host ",novel.getName())); | ||||||
|       //  showProgressDialog(false,"正在加载..."); |         showProgressDialog(false,"正在加载..."); | ||||||
|         PageFactory pageFactory =PageFactory.getInstance(activity ) ; |         PageFactory pageFactory =PageFactory.getInstance(activity ) ; | ||||||
|         pageFactory.initBookUtil(); |         pageFactory.initBookUtil(); | ||||||
|         ReadActivity.openBook(novel ,activity); |       //  ReadActivity.openBook(novel ,activity); | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
|         BookSubscribe.getNovel(novel.getNovelId(),new OnSuccessAndFaultSub(new OnSuccessAndFaultListener() { |         BookSubscribe.getNovel(novel.getNovelId(),new OnSuccessAndFaultSub(new OnSuccessAndFaultListener() { | ||||||
|  | @ -272,13 +272,25 @@ void initTabs(){ | ||||||
| 
 | 
 | ||||||
|                     } |                     } | ||||||
|                 }.start();*/ |                 }.start();*/ | ||||||
|               //  ReadActivity.openBook(nv ,activity); | 
 | ||||||
|              //    PageFactory.getInstance(activity.getApplicationContext()).prepareBook(nv ); //打开本地小说内容 |              //    PageFactory.getInstance(activity.getApplicationContext()).prepareBook(nv ); //打开本地小说内容 | ||||||
|                 //PageFactory.getInstance(activity ).prepareBook(nv ); //打开本地小说内容 |                 //PageFactory.getInstance(activity ).prepareBook(nv ); //打开本地小说内容 | ||||||
|                 pageFactory.prepareBook(nv ); |                 pageFactory.prepareBook(nv ); | ||||||
|                 Log.d(TAG, String.format("prepare book %s 开始open book.",nv.getName()) ); |                 Log.d(TAG, String.format("prepare book %s 开始open book.",nv.getName()) ); | ||||||
|  |                 ReadActivity.openBook(nv ,activity); | ||||||
|  |                      new Thread(){ | ||||||
|  |                     @Override | ||||||
|  |                     public void run() { | ||||||
|  |                         super.run(); | ||||||
|  |                         try { | ||||||
|  |                             sleep(500); | ||||||
|  |                         } catch (InterruptedException e) { | ||||||
|  |                             e.printStackTrace(); | ||||||
|  |                         } | ||||||
|  |                         handler.sendEmptyMessage(99); | ||||||
|  |                     } | ||||||
|  |                 }.start(); | ||||||
| 
 | 
 | ||||||
|                 handler.sendEmptyMessage(99); |  | ||||||
|             } |             } | ||||||
| 
 | 
 | ||||||
|             @Override |             @Override | ||||||
|  | @ -306,6 +318,7 @@ void initTabs(){ | ||||||
|         if(NetUtil.isNetworkConnected()) |         if(NetUtil.isNetworkConnected()) | ||||||
|         if(mSwipeRefresh ==null ||  !mSwipeRefresh.isRefreshing()) { |         if(mSwipeRefresh ==null ||  !mSwipeRefresh.isRefreshing()) { | ||||||
|             ((Activity_base) getActivity()).showProgressDialog(flag,msg); |             ((Activity_base) getActivity()).showProgressDialog(flag,msg); | ||||||
|  |             Log.d(TAG, "progress: progress shown"); | ||||||
|         } |         } | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
|  | @ -318,6 +331,13 @@ void initTabs(){ | ||||||
|             mSwipeRefresh.setRefreshing(false); |             mSwipeRefresh.setRefreshing(false); | ||||||
|         } |         } | ||||||
|         ((Activity_base) getActivity()).hideProgress(); |         ((Activity_base) getActivity()).hideProgress(); | ||||||
|  |         Log.d(TAG, "progress: progress hided"); | ||||||
|  |         /*try{ | ||||||
|  |             throw new Exception("who hide"); | ||||||
|  |         }catch (Exception e){ | ||||||
|  |             Log.e(TAG, "progress: ",e ); | ||||||
|  |         }*/ | ||||||
|  | 
 | ||||||
| 
 | 
 | ||||||
|     } |     } | ||||||
|     void initSwipeRefreshLayout(){ |     void initSwipeRefreshLayout(){ | ||||||
|  | @ -484,7 +504,7 @@ void initTabs(){ | ||||||
|     @Override |     @Override | ||||||
|     public void onPause(){ |     public void onPause(){ | ||||||
|         super.onPause(); |         super.onPause(); | ||||||
|         hideProgress(); | //        hideProgress(); | ||||||
|         //    MobclickAgent.onPageEnd(TAG); |         //    MobclickAgent.onPageEnd(TAG); | ||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
|  | @ -122,7 +122,8 @@ public class Fragment_Shelf extends BasicFragment { | ||||||
|         noveIds = ""; |         noveIds = ""; | ||||||
|         int i=0; |         int i=0; | ||||||
|         for (Novel novel : bookLists) { |         for (Novel novel : bookLists) { | ||||||
|              if (novel.isFinished() || novel.isLocalBook()  || (novel.isUpdated() && (new Date().getTime() - novel.getLastVisit() > 1*3600*1000 ))) { |              if (novel.isFinished() || novel.isLocalBook() || novel.isUpdated()  && (new Date().getTime() - novel.getLastVisit() > 1*3600*1000 ) ) { | ||||||
|  |                 // if(!novel.getName().equals("暗月纪元")) | ||||||
|                 continue; |                 continue; | ||||||
|             } |             } | ||||||
|             if(i>Constants.MAX_SHELF_CNT){ |             if(i>Constants.MAX_SHELF_CNT){ | ||||||
|  |  | ||||||
|  | @ -147,7 +147,12 @@ public class Fragment_bangdans extends BasicFragment { | ||||||
|         mViewpager.setAdapter(mAdapter); |         mViewpager.setAdapter(mAdapter); | ||||||
|         tabLayout.setupWithViewPager(mViewpager); |         tabLayout.setupWithViewPager(mViewpager); | ||||||
|         //  tabLayout.setViewPager(mViewpager, mTitle, activity, mFragments); |         //  tabLayout.setViewPager(mViewpager, mTitle, activity, mFragments); | ||||||
|       //  mViewpager.setCurrentItem(0); |        //  mViewpager.setCurrentItem(0); | ||||||
|  |         if(mFragments.size()>0) { | ||||||
|  |             tabLayout.setTabSelected(0); | ||||||
|  |          //   mViewpager.setCurrentItem(0); | ||||||
|  | 
 | ||||||
|  |         } | ||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
|  | @ -92,6 +92,7 @@ public class Fragment_bookStore extends BasicFragment { | ||||||
|             mAdapter.notifyDataSetChanged();*/ |             mAdapter.notifyDataSetChanged();*/ | ||||||
| 
 | 
 | ||||||
|         } |         } | ||||||
|  |         Log.d(TAG, "setSexOption: to  reload 3 fragment data"  ); | ||||||
|         fragment_jingxuan.initData(); |         fragment_jingxuan.initData(); | ||||||
|         fragmentCates.initData(); |         fragmentCates.initData(); | ||||||
|         fragment_bangdans.initData() ; |         fragment_bangdans.initData() ; | ||||||
|  |  | ||||||
|  | @ -234,6 +234,7 @@ public class Fragment_booklist extends BasicFragment { | ||||||
|                         e.printStackTrace(); |                         e.printStackTrace(); | ||||||
|                         Log.e(TAG, "onSuccess: 解析失败",e ); |                         Log.e(TAG, "onSuccess: 解析失败",e ); | ||||||
|                     } |                     } | ||||||
|  |                     Log.d(TAG, "progress: progress to  hide"); | ||||||
|                     handler.sendEmptyMessage(1); |                     handler.sendEmptyMessage(1); | ||||||
| 
 | 
 | ||||||
|                 } |                 } | ||||||
|  |  | ||||||
|  | @ -479,7 +479,6 @@ private  int bottomSelectedIndex; | ||||||
| 
 | 
 | ||||||
|          //   Log.d(TAG, "onResume: set botoomNav selection to 0"); |          //   Log.d(TAG, "onResume: set botoomNav selection to 0"); | ||||||
|         } |         } | ||||||
| 
 |  | ||||||
|     } |     } | ||||||
|      |      | ||||||
|      |      | ||||||
|  | @ -492,18 +491,28 @@ private  int bottomSelectedIndex; | ||||||
| 
 | 
 | ||||||
|     private void setSexOption(){ |     private void setSexOption(){ | ||||||
|     int  s = rgSex.getCheckedRadioButtonId() == R.id.radioButtonBoy ?1:2; |     int  s = rgSex.getCheckedRadioButtonId() == R.id.radioButtonBoy ?1:2; | ||||||
|  |         Log.d(TAG, "setSexOption: new sex option:" +s); | ||||||
|     if(s!= Constants.SEX){ |     if(s!= Constants.SEX){ | ||||||
|          TTAdManagerHolder.initOnSexChange(MyApp.applicationContext); |          TTAdManagerHolder.initOnSexChange(MyApp.applicationContext); | ||||||
|         Constants.SEX=s; |         Constants.SEX=s; | ||||||
|         config.setSexOption(s); |         config.setSexOption(s); | ||||||
|         Fragment current = getSupportFragmentManager().findFragmentById(R.id.realtabcontent); |         Fragment current = getSupportFragmentManager().findFragmentById(R.id.realtabcontent); | ||||||
|  | 
 | ||||||
|  |         Log.e(TAG, "setSexOption: current fragment is null ?" + (current == null ) ); | ||||||
|         if (current != null && current instanceof BasicFragment){ |         if (current != null && current instanceof BasicFragment){ | ||||||
| 
 | 
 | ||||||
|             ((Fragment_bookStore)current).onSexSwitch(); |             ((Fragment_bookStore)current).onSexSwitch(); | ||||||
| 
 | 
 | ||||||
|  |         }else if(current ==null ){ | ||||||
|  |             Log.e(TAG, "setSexOption: current fragment is null , recreate 3 fragments" ); | ||||||
|  |             Fragment_bookStore fragment  =new Fragment_bookStore(); | ||||||
|  |             showFragment(fragment , Fragment_bookStore.TAG); | ||||||
|  |             swithToolbarItems(); | ||||||
|         } |         } | ||||||
| 
 | 
 | ||||||
|  | 
 | ||||||
|     } |     } | ||||||
|  | 
 | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
|     @OnClick({R.id.radioButtonBoy,R.id.radioButtonGirl}) |     @OnClick({R.id.radioButtonBoy,R.id.radioButtonGirl}) | ||||||
|  |  | ||||||
|  | @ -300,7 +300,7 @@ public  class BookListAdapter extends RecyclerView.Adapter< RecyclerView.ViewHol | ||||||
| 
 | 
 | ||||||
|             if (holder.tvLastRead != null) holder.tvLastRead.setText(CommonUtil.getDateString( novel.getLastVisit() )); |             if (holder.tvLastRead != null) holder.tvLastRead.setText(CommonUtil.getDateString( novel.getLastVisit() )); | ||||||
|           //  if (holder.tvProgress != null) holder.tvProgress.setText( String.format("上次看到第 %s 章,共%s章",mDatas.get(position).getLastReadChapt(),mDatas.get(position).getChaptCnt())       ); |           //  if (holder.tvProgress != null) holder.tvProgress.setText( String.format("上次看到第 %s 章,共%s章",mDatas.get(position).getLastReadChapt(),mDatas.get(position).getChaptCnt())       ); | ||||||
|             if (holder.tvProgress != null) holder.tvProgress.setText( String.format("上次看到第 %s 章",novel.getLastReadChapt(),novel.getChaptCnt())       ); |             if (holder.tvProgress != null) holder.tvProgress.setText( String.format("%s",novel.getLastReadChaptName())       ); | ||||||
|             if (holder.tvReadtime != null) holder.tvReadtime.setText( "总计阅读了 "+CommonUtil.getTimeCnt4Read( novel.getReadtime() ,true) ); |             if (holder.tvReadtime != null) holder.tvReadtime.setText( "总计阅读了 "+CommonUtil.getTimeCnt4Read( novel.getReadtime() ,true) ); | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
|  | @ -330,25 +330,40 @@ public void testUpdate(){ | ||||||
| } | } | ||||||
|     public int checkAndUpdate(){ |     public int checkAndUpdate(){ | ||||||
|         Novel nv =  getNovelBySvrId(novelId); |         Novel nv =  getNovelBySvrId(novelId); | ||||||
|  |         if(nv==null){ | ||||||
|  |             return 0; | ||||||
|  |         } | ||||||
|       /*  if(lastUpdateTime > nv.lastVisit && lastUpdateTime > nv.lastUpdateTime){ |       /*  if(lastUpdateTime > nv.lastVisit && lastUpdateTime > nv.lastUpdateTime){ | ||||||
|             isUpdated =true; |             isUpdated =true; | ||||||
|         }*/ |         }*/ | ||||||
|         isUpdated = lastUpdateTime > nv.lastVisit || lastUpdateTime > nv.lastUpdateTime; |        // isUpdated = lastUpdateTime > nv.lastVisit && lastUpdateTime > nv.lastUpdateTime; | ||||||
|         Log.d("Novel", String.format("book %s  server lastUpdateTime %s, local lastupdatetime %s, local lastvist %s" + |         isUpdated =   lastUpdateTime > nv.lastUpdateTime; | ||||||
|  |         Log.d("Novel", String.format("book %s  server lastUpdateTime %s, local lastupdatetime %s, local lastvist %s," + | ||||||
|                         "is updated %s, lastUpdateTime - nv.lastVisit %s,lastUpdateTime - nv.lastUpdateTime %s   " |                         "is updated %s, lastUpdateTime - nv.lastVisit %s,lastUpdateTime - nv.lastUpdateTime %s   " | ||||||
|                 ,name ,lastUpdateTime,nv.lastUpdateTime,nv.lastVisit,isUpdated, |                 ,name ,CommonUtil.getDateString(lastUpdateTime) ,CommonUtil.getDateString(nv.lastUpdateTime) ,CommonUtil.getDateString(nv.lastVisit) ,isUpdated, | ||||||
|                 lastUpdateTime - nv.lastVisit, |                 lastUpdateTime - nv.lastVisit, | ||||||
|                 lastUpdateTime - nv.lastUpdateTime |                 lastUpdateTime - nv.lastUpdateTime | ||||||
| 
 | 
 | ||||||
|         ) ); |         ) ); | ||||||
|         /* boolean isLastReadchaptUpdated =  TextUtils.isEmpty(nv.lastReadChaptName) || !(chapterName.equals(nv.lastReadChaptName)); //没看过最新章节 |  | ||||||
|         boolean isLastChaptUpdated = !TextUtils.isEmpty(chapterName) && !TextUtils.isEmpty(nv.chapterName) && !(chapterName.equals(nv.chapterName)); |  | ||||||
|         Log.d("Novel", String.format( " server lastUpdateTime  ,server chaptername %s,chaptername %s,lastreadchapt %s" , chapterName,nv.chapterName,nv.lastReadChaptName ) ); |  | ||||||
| 
 | 
 | ||||||
|  | 
 | ||||||
|  |          boolean isLastReadchaptUpdated =  TextUtils.isEmpty(nv.lastReadChaptName) || !(chapterName.equals(nv.lastReadChaptName)); //没看过最新章节 | ||||||
|  |        boolean isLastChaptUpdated = !TextUtils.isEmpty(chapterName) && !TextUtils.isEmpty(nv.chapterName) && !(chapterName.equals(nv.chapterName)); | ||||||
|  |         Log.d("Novel", String.format( " server lastUpdateTime  ,server chaptername %s,chaptername %s,lastreadchapt %s" , chapterName,nv.chapterName,nv.lastReadChaptName ) ); | ||||||
|  | /* | ||||||
|         isUpdated = isUpdated  && isLastReadchaptUpdated ||   isLastChaptUpdated ; |         isUpdated = isUpdated  && isLastReadchaptUpdated ||   isLastChaptUpdated ; | ||||||
| 
 | 
 | ||||||
|  |       boolean isLastChaptUpdated = !TextUtils.isEmpty(chapterName) && !TextUtils.isEmpty(nv.chapterName) && !(chapterName.equals(nv.chapterName)); | ||||||
|  |  */ | ||||||
|         Log.d("Novel", String.format( " isupdated %s, server lastUpdateTime  isLastReadchaptUpdated %s,isLastChaptUpdated %s" ,isUpdated,isLastReadchaptUpdated,isLastChaptUpdated ) ); |         Log.d("Novel", String.format( " isupdated %s, server lastUpdateTime  isLastReadchaptUpdated %s,isLastChaptUpdated %s" ,isUpdated,isLastReadchaptUpdated,isLastChaptUpdated ) ); | ||||||
|        */ | 
 | ||||||
|  |         Log.d("Novel", String.format( " server lastUpdateTime  ,server chaptername %s,chaptername %s,lastreadchapt %s" , chapterName,nv.chapterName,nv.lastReadChaptName ) ); | ||||||
|  | 
 | ||||||
|  |         isUpdated = isUpdated  && isLastChaptUpdated || lastUpdateTime > nv.lastVisit; | ||||||
|  | 
 | ||||||
|  |         isUpdated = isUpdated && isLastReadchaptUpdated; | ||||||
|  | 
 | ||||||
|  | 
 | ||||||
| 
 | 
 | ||||||
|         if(!isUpdated){ |         if(!isUpdated){ | ||||||
|             setToDefault("isUpdated"); |             setToDefault("isUpdated"); | ||||||
|  |  | ||||||
|  | @ -464,17 +464,17 @@ public class BookUtil { | ||||||
|         String msg = String.format("{\"type\":%s, \"id\":%s ,\"name\":\"%s\",\"site\":\"%s\",\"url\":\"%s\",\"content\":\"%s\",\"requestHeader\":\"%s\",\"httpStatus\":\"%s\"}," , |         String msg = String.format("{\"type\":%s, \"id\":%s ,\"name\":\"%s\",\"site\":\"%s\",\"url\":\"%s\",\"content\":\"%s\",\"requestHeader\":\"%s\",\"httpStatus\":\"%s\"}," , | ||||||
|                 reportType ,mNovel.getId(),mNovel.getName(),mSite.getDomain(),url ,content,headers,httpStatus); |                 reportType ,mNovel.getId(),mNovel.getName(),mSite.getDomain(),url ,content,headers,httpStatus); | ||||||
| 
 | 
 | ||||||
|         msg = String.format("{\"type\":%s, \"novelId\":%s ,\"site\":\"%s\",\"url\":\"%s\",\"httpStatus\":\"%s\",\"content\":\"%s\"}," , |         msg = String.format("{\"type\":\"%s\", \"novelId\":%s ,\"site\":\"%s\",\"url\":\"%s\",\"httpStatus\":\"%s\",\"content\":\"%s\"}" , | ||||||
|                 reportType ,mNovel.getNovelId(),mSite.getDomain(),url ,httpStatus,content); |                 reportType ,mNovel.getNovelId(),mSite.getDomain(),url ,httpStatus,content); | ||||||
| 
 | 
 | ||||||
|         BookSubscribe.reportMsg(reportType  ,msg); |         BookSubscribe.reportMsg(reportType  ,msg); | ||||||
|     } |     } | ||||||
|     private void checkLastUpdatedChapter() { |     private void checkLastUpdatedChapter() { | ||||||
|         if(BuildConfig.LOG_DEBUG) { |        /* if(BuildConfig.LOG_DEBUG) { | ||||||
|             if(mChapters.size()>1) { |             if(mChapters.size()>1) { | ||||||
|                 reportMsg(Constants.REPORT_NEW_UPDATE, mChapters.get(mChapters.size() - 1).getChapterUrl(), mNovel.getChapterName(), "", ""); |                 reportMsg(Constants.REPORT_NEW_UPDATE,"", mNovel.getChapterName()+" 测试用例", "", ""); | ||||||
|             } |             } | ||||||
|         } |         }*/ | ||||||
|            for (int i=mChapters.size()-1;i>0;i--) { |            for (int i=mChapters.size()-1;i>0;i--) { | ||||||
|             if(mChapters.get(i).getChapterName().equals(mNovel.getChapterName())){ |             if(mChapters.get(i).getChapterName().equals(mNovel.getChapterName())){ | ||||||
|                 if(i<mChapters.size()-1){ |                 if(i<mChapters.size()-1){ | ||||||
|  | @ -482,7 +482,7 @@ public class BookUtil { | ||||||
|                     mNovel.setChapterName(mChapters.get(mChapters.size()-1).getChapterName()); |                     mNovel.setChapterName(mChapters.get(mChapters.size()-1).getChapterName()); | ||||||
|                     Log.d(TAG, "prepare book: set novel lastchaptname " + mNovel.getLastReadChapt()); |                     Log.d(TAG, "prepare book: set novel lastchaptname " + mNovel.getLastReadChapt()); | ||||||
| 
 | 
 | ||||||
|                     reportMsg(Constants.REPORT_NEW_UPDATE,mChapters.get(mChapters.size()-1).getChapterUrl(),mNovel.getChapterName(),"",""); |                     reportMsg(Constants.REPORT_NEW_UPDATE,"",mNovel.getChapterName(),"",""); | ||||||
|                     break; |                     break; | ||||||
|                 } |                 } | ||||||
|             } |             } | ||||||
|  | @ -944,7 +944,6 @@ int muluRetryCount =0; | ||||||
|                 if (mNovelSites.getSites().length == 1) { //仅有一个rule,且失败了 |                 if (mNovelSites.getSites().length == 1) { //仅有一个rule,且失败了 | ||||||
| 
 | 
 | ||||||
|                   //  mMuluStatus = MuluStatus.failed; |                   //  mMuluStatus = MuluStatus.failed; | ||||||
| 
 |  | ||||||
|                     reportMsg( Constants.REPORT_REX_MULU_ERROR,url,"",getRequestHeader(request), ""); |                     reportMsg( Constants.REPORT_REX_MULU_ERROR,url,"",getRequestHeader(request), ""); | ||||||
|                     return; |                     return; | ||||||
|                 } |                 } | ||||||
|  | @ -983,9 +982,9 @@ int muluRetryCount =0; | ||||||
|             @Override |             @Override | ||||||
|             public void onResponse(Call call, Response response){ |             public void onResponse(Call call, Response response){ | ||||||
|                 ResponseBody body = response.body(); |                 ResponseBody body = response.body(); | ||||||
|                 if(BuildConfig.LOG_DEBUG) { |              /*   if(BuildConfig.LOG_DEBUG) { | ||||||
|                     reportMsg( Constants.REPORT_REX_MULU_ERROR,url,"",getRequestHeader(request),response.code()+""); |                     reportMsg( Constants.REPORT_REX_MULU_ERROR,url,"",getRequestHeader(request),response.code()+""); | ||||||
|                 } |                 }*/ | ||||||
|                 if(response.code()!=200){ |                 if(response.code()!=200){ | ||||||
|                     Log.d(TAG,String.format("prepare book loadChapts----failed,  %s  目录 from %s,return code %s",  mNovel.getName()  ,url,response.code() )); |                     Log.d(TAG,String.format("prepare book loadChapts----failed,  %s  目录 from %s,return code %s",  mNovel.getName()  ,url,response.code() )); | ||||||
|                   //  handler.sendEmptyMessage(3); |                   //  handler.sendEmptyMessage(3); | ||||||
|  | @ -1892,13 +1891,13 @@ private void loadChaptContent(final int chapterIndex) throws JSONException, Inte | ||||||
|                     } |                     } | ||||||
|                  //   Log.d( TAG,String.format("prepare book   encoded content %s", bodyStr   )); |                  //   Log.d( TAG,String.format("prepare book   encoded content %s", bodyStr   )); | ||||||
|                     bodyStr = NovelParseUtil.getChapterContent(bodyStr, siteJson); |                     bodyStr = NovelParseUtil.getChapterContent(bodyStr, siteJson); | ||||||
|                     if(BuildConfig.LOG_DEBUG)  { |                    /* if(BuildConfig.LOG_DEBUG)  { | ||||||
|                         reportMsg(Constants.REPORT_REX_CHAPTER_CONTENT_ERROR, mSite.getMuluUrl(),"",getRequestHeader(request),200+"");//TODO: remove |                         reportMsg(Constants.REPORT_REX_CHAPTER_CONTENT_ERROR, url,"",getRequestHeader(request),200+"");//TODO: remove | ||||||
|                     } |                     }*/ | ||||||
|                   if(TextUtils.isEmpty(bodyStr) || bodyStr.trim().length()<10 ){ |                   if(TextUtils.isEmpty(bodyStr) || bodyStr.trim().length()<10 ){ | ||||||
|                       Log.d( TAG,String.format("prepare book  loadChaptContent %s isEmpty,retry....", index,   Thread.currentThread().getName())); |                       Log.d( TAG,String.format("prepare book  loadChaptContent %s isEmpty,reporting empty ....", index )); | ||||||
| 
 | 
 | ||||||
|                       reportMsg(Constants.REPORT_REX_CHAPTER_CONTENT_ERROR, mSite.getMuluUrl(),bodyStr,getRequestHeader(request),200+""); |                       reportMsg(Constants.REPORT_REX_CHAPTER_CONTENT_ERROR, url,bodyStr,getRequestHeader(request),200+""); | ||||||
|                     //  bodyStr +=  Constants.BAD_CHAR +Constants.BAD_CHAR  +"内容正在搜索中,请稍后刷新内容"; |                     //  bodyStr +=  Constants.BAD_CHAR +Constants.BAD_CHAR  +"内容正在搜索中,请稍后刷新内容"; | ||||||
|                       return; |                       return; | ||||||
|                   } |                   } | ||||||
|  |  | ||||||
|  | @ -107,6 +107,7 @@ | ||||||
|       <excludeFolder url="file://$MODULE_DIR$/build/intermediates/legacy_multidex_aapt_derived_proguard_rules" /> |       <excludeFolder url="file://$MODULE_DIR$/build/intermediates/legacy_multidex_aapt_derived_proguard_rules" /> | ||||||
|       <excludeFolder url="file://$MODULE_DIR$/build/intermediates/legacy_multidex_main_dex_list" /> |       <excludeFolder url="file://$MODULE_DIR$/build/intermediates/legacy_multidex_main_dex_list" /> | ||||||
|       <excludeFolder url="file://$MODULE_DIR$/build/intermediates/manifest-checker" /> |       <excludeFolder url="file://$MODULE_DIR$/build/intermediates/manifest-checker" /> | ||||||
|  |       <excludeFolder url="file://$MODULE_DIR$/build/intermediates/merged-not-compiled-resources" /> | ||||||
|       <excludeFolder url="file://$MODULE_DIR$/build/intermediates/merged_assets" /> |       <excludeFolder url="file://$MODULE_DIR$/build/intermediates/merged_assets" /> | ||||||
|       <excludeFolder url="file://$MODULE_DIR$/build/intermediates/merged_jni_libs" /> |       <excludeFolder url="file://$MODULE_DIR$/build/intermediates/merged_jni_libs" /> | ||||||
|       <excludeFolder url="file://$MODULE_DIR$/build/intermediates/merged_manifests" /> |       <excludeFolder url="file://$MODULE_DIR$/build/intermediates/merged_manifests" /> | ||||||
|  | @ -114,8 +115,11 @@ | ||||||
|       <excludeFolder url="file://$MODULE_DIR$/build/intermediates/metadata_feature_manifest" /> |       <excludeFolder url="file://$MODULE_DIR$/build/intermediates/metadata_feature_manifest" /> | ||||||
|       <excludeFolder url="file://$MODULE_DIR$/build/intermediates/prebuild" /> |       <excludeFolder url="file://$MODULE_DIR$/build/intermediates/prebuild" /> | ||||||
|       <excludeFolder url="file://$MODULE_DIR$/build/intermediates/processed_res" /> |       <excludeFolder url="file://$MODULE_DIR$/build/intermediates/processed_res" /> | ||||||
|  |       <excludeFolder url="file://$MODULE_DIR$/build/intermediates/proguard-files" /> | ||||||
|  |       <excludeFolder url="file://$MODULE_DIR$/build/intermediates/proguard-rules" /> | ||||||
|       <excludeFolder url="file://$MODULE_DIR$/build/intermediates/reload-dex" /> |       <excludeFolder url="file://$MODULE_DIR$/build/intermediates/reload-dex" /> | ||||||
|       <excludeFolder url="file://$MODULE_DIR$/build/intermediates/res" /> |       <excludeFolder url="file://$MODULE_DIR$/build/intermediates/res" /> | ||||||
|  |       <excludeFolder url="file://$MODULE_DIR$/build/intermediates/res_stripped" /> | ||||||
|       <excludeFolder url="file://$MODULE_DIR$/build/intermediates/resources" /> |       <excludeFolder url="file://$MODULE_DIR$/build/intermediates/resources" /> | ||||||
|       <excludeFolder url="file://$MODULE_DIR$/build/intermediates/shader_assets" /> |       <excludeFolder url="file://$MODULE_DIR$/build/intermediates/shader_assets" /> | ||||||
|       <excludeFolder url="file://$MODULE_DIR$/build/intermediates/signing_config" /> |       <excludeFolder url="file://$MODULE_DIR$/build/intermediates/signing_config" /> | ||||||
|  | @ -124,6 +128,7 @@ | ||||||
|       <excludeFolder url="file://$MODULE_DIR$/build/intermediates/transforms" /> |       <excludeFolder url="file://$MODULE_DIR$/build/intermediates/transforms" /> | ||||||
|       <excludeFolder url="file://$MODULE_DIR$/build/intermediates/validate_signing_config" /> |       <excludeFolder url="file://$MODULE_DIR$/build/intermediates/validate_signing_config" /> | ||||||
|       <excludeFolder url="file://$MODULE_DIR$/build/outputs" /> |       <excludeFolder url="file://$MODULE_DIR$/build/outputs" /> | ||||||
|  |       <excludeFolder url="file://$MODULE_DIR$/build/reports" /> | ||||||
|       <excludeFolder url="file://$MODULE_DIR$/build/tmp" /> |       <excludeFolder url="file://$MODULE_DIR$/build/tmp" /> | ||||||
|     </content> |     </content> | ||||||
|     <orderEntry type="jdk" jdkName="Android API 28 Platform" jdkType="Android SDK" /> |     <orderEntry type="jdk" jdkName="Android API 28 Platform" jdkType="Android SDK" /> | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue