Ejemplo n.º 1
0
 public List<RecommendItemNode> getLstBanner()
 {
   insertBannerAdvertisement();
   loadAudioAdvertisement();
   int i = InfoManager.getInstance().root().getCatIdBySecId(this.sectionId);
   insertAdvFromThirdParty(ThirdAdv.getInstance().getRecommendNodes(i));
   return this.lstBanner;
 }
Ejemplo n.º 2
0
 public boolean insertBannerAdvertisement()
 {
   final int j;
   Object localObject1;
   int k;
   int i;
   label121: int m;
   Object localObject2;
   if ((this.lstBanner != null) && (this.lstBanner.size() > 0) && (!this.hasInsertedBannerAdvertisement))
   {
     int i2 = this.lstBanner.size();
     if (isFrontpage())
     {
       j = 0;
       localObject1 = ThirdAdv.getInstance().getRecommendNodes(j);
       if ((localObject1 == null) || (((List)localObject1).size() == 0))
       {
         InfoManager.getInstance().loadAdvFromThirdParty(j);
         if ((InfoManager.getInstance().enableAdvBaidu()) && (InfoManager.getInstance().enableAdvBaiduCategory(j)))
           BaiduApi.request(new BaiduApi.BDResponseListener()
           {
             public void onResponse(BDResponse paramAnonymousBDResponse)
             {
               if (paramAnonymousBDResponse != null)
               {
                 paramAnonymousBDResponse = paramAnonymousBDResponse.getAdvNodes();
                 if ((paramAnonymousBDResponse != null) && (paramAnonymousBDResponse.size() > 0))
                 {
                   ThirdAdv.getInstance().setAdv(((AdvertisementItemNode)paramAnonymousBDResponse.get(0)).convertToRecommendItem(j), j, "4");
                   RecommendCategoryNode.this.insertAdvFromThirdParty(ThirdAdv.getInstance().getRecommendNodes(j));
                 }
               }
             }
           });
       }
       if (j < 0)
         break label510;
       k = 0;
       i = 0;
       m = i;
       if (k > i2)
         break label513;
       localObject1 = InfoManager.getInstance().root().mAdvertisementInfoNode.getBannerAdPos(j, k);
       if (localObject1 == null)
         break label533;
       ((AdPos)localObject1).parent = this;
       localObject2 = InfoManager.getInstance().root().mAdvertisementInfoNode.getAdvertisement(((AdPos)localObject1).posid);
       if (localObject2 == null)
         break label476;
       localObject2 = ((AdvertisementItemNode)localObject2).convertToRecommendItem(j);
       if (localObject2 != null)
       {
         String str1 = ((RecommendItemNode)localObject2).getApproximativeThumb();
         m = 0;
         label198: if (m >= this.lstBanner.size())
           break label527;
         String str2 = ((RecommendItemNode)this.lstBanner.get(m)).getApproximativeThumb();
         if ((!((RecommendItemNode)this.lstBanner.get(m)).isAds) || (str2 == null) || (str1 == null) || (!str2.equalsIgnoreCase(str1)))
           break label348;
         m = 1;
         label272: if (m == 0)
         {
           if ((((AdPos)localObject1).bannerPos >= this.lstBanner.size()) || (((AdPos)localObject1).bannerPos < 0))
             break label462;
           if (((AdPos)localObject1).bannerPos != 0)
             break label357;
           this.lstBanner.add(((AdPos)localObject1).bannerPos, localObject2);
         }
       }
     }
   }
   label513: label527: label533: 
   while (true)
   {
     k += 1;
     break label121;
     j = InfoManager.getInstance().root().getCatIdBySecId(this.sectionId);
     break;
     label348: m += 1;
     break label198;
     label357: m = 0;
     int i1;
     for (int n = 0; ; n = i1)
     {
       if (m >= this.lstBanner.size())
         break label460;
       i1 = n;
       if (!((RecommendItemNode)this.lstBanner.get(m)).isAds)
         i1 = n + 1;
       if ((i1 == ((AdPos)localObject1).bannerPos) && (m + 1 < this.lstBanner.size()))
       {
         this.lstBanner.add(m + 1, localObject2);
         break;
       }
       m += 1;
     }
     label460: continue;
     label462: this.lstBanner.add(localObject2);
     continue;
     label476: InfoManager.getInstance().loadAdvertisement((AdPos)localObject1, -1, null);
     if (ThirdAdv.getInstance().getRecommendNodes(j) == null)
       InfoManager.getInstance().loadAdvFromThirdParty(j);
     i = 1;
     continue;
     label510: m = 0;
     if (m == 0)
     {
       this.hasInsertedBannerAdvertisement = true;
       return true;
     }
     return false;
     m = 0;
     break label272;
   }
 }