示例#1
0
 protected int getScreenColumns() {
   Resources localResources = getResources();
   MusicPreferences localMusicPreferences = getPreferences();
   return ViewUtils.getScreenColumnCount(localResources, localMusicPreferences);
 }
示例#2
0
 public void bindViewToMediaListItem(View paramView, Context paramContext, Cursor paramCursor, long paramLong)
 {
   ViewHolder localViewHolder = (ViewHolder)paramView.getTag();
   Document localDocument = localViewHolder.document;
   TrackListAdapter localTrackListAdapter = this;
   Cursor localCursor1 = paramCursor;
   localTrackListAdapter.populateDocumentFromCursor(localDocument, localCursor1);
   int i = this.mTitleIdx;
   CharArrayBuffer localCharArrayBuffer1 = localViewHolder.titleBuffer;
   Cursor localCursor2 = paramCursor;
   CharArrayBuffer localCharArrayBuffer2 = localCharArrayBuffer1;
   localCursor2.copyStringToBuffer(i, localCharArrayBuffer2);
   StatefulShadowTextView localStatefulShadowTextView1 = localViewHolder.title;
   char[] arrayOfChar = localViewHolder.titleBuffer.data;
   int j = localViewHolder.titleBuffer.sizeCopied;
   localStatefulShadowTextView1.setText(arrayOfChar, 0, j);
   boolean bool1 = this.mSongList instanceof SharedSongList;
   boolean bool2;
   label183: int n;
   label226: label248: boolean bool3;
   label277: boolean bool4;
   if (localViewHolder.contextMenu != null)
   {
     if (bool1)
       localViewHolder.contextMenu.setVisibility(4);
   }
   else
   {
     bool2 = isShowingNowPlaying();
     if (localViewHolder.play_indicator != null)
     {
       bool2 = false;
       if (canShowPlaybackIndicator())
       {
         if (!bool2)
           break label787;
         int k = paramCursor.getPosition();
         int m = this.mCurrentPlayPosition;
         if (k == m)
           break label781;
         bool2 = true;
         if ((!bool2) && (((this.mSongList instanceof PlaylistSongList)) || ((this.mSongList instanceof SelectedSongList))))
           bool2 = false;
       }
       PlayingIndicator localPlayingIndicator = localViewHolder.play_indicator;
       if (!bool2)
         break label839;
       n = 0;
       localPlayingIndicator.setVisibility(n);
       if (!bool2)
         break label846;
       localViewHolder.title.setTypeface(null, 1);
     }
     if (!UIStateManager.getInstance().isStreamingEnabled())
     {
       int i1 = this.mIsLocalIdx;
       if (paramCursor.getInt(i1) == 0)
         break label859;
     }
     bool3 = true;
     localViewHolder.isAvailable = bool3;
     int i2 = this.mHasRemoteIdx;
     if (paramCursor.getInt(i2) == 0)
       break label865;
     bool4 = true;
     label304: localViewHolder.hasRemote = bool4;
     StatefulShadowTextView localStatefulShadowTextView2 = localViewHolder.title;
     boolean bool5 = true;
     localStatefulShadowTextView2.setPrimaryAndOnline(bool5, bool3);
     if (localViewHolder.duration != null)
     {
       StatefulShadowTextView localStatefulShadowTextView3 = localViewHolder.duration;
       boolean bool6 = true;
       localStatefulShadowTextView3.setPrimaryAndOnline(bool6, bool3);
     }
     if (localViewHolder.artist != null)
     {
       StatefulShadowTextView localStatefulShadowTextView4 = localViewHolder.artist;
       boolean bool7 = false;
       localStatefulShadowTextView4.setPrimaryAndOnline(bool7, bool3);
     }
     if (localViewHolder.album != null)
     {
       StatefulShadowTextView localStatefulShadowTextView5 = localViewHolder.album;
       boolean bool8 = true;
       localStatefulShadowTextView5.setPrimaryAndOnline(bool8, bool3);
     }
     if (localViewHolder.year != null)
     {
       StatefulShadowTextView localStatefulShadowTextView6 = localViewHolder.year;
       boolean bool9 = true;
       localStatefulShadowTextView6.setPrimaryAndOnline(bool9, bool3);
     }
     if ((localViewHolder.year != null) && (this.mYearIdx >= 0))
     {
       int i3 = this.mYearIdx;
       int i4 = paramCursor.getInt(i3);
       if (i4 <= 0)
         break label871;
       StatefulShadowTextView localStatefulShadowTextView7 = localViewHolder.year;
       String str1 = Integer.toString(i4);
       localStatefulShadowTextView7.setText(str1);
       localViewHolder.year.setVisibility(0);
     }
     label504: if (localViewHolder.album != null)
     {
       StatefulShadowTextView localStatefulShadowTextView8 = localViewHolder.album;
       String str2 = localViewHolder.document.getAlbumName();
       localStatefulShadowTextView8.setText(str2);
     }
     if (localViewHolder.artist != null)
     {
       if (!this.mShowTrackArtist)
         break label883;
       StatefulShadowTextView localStatefulShadowTextView9 = localViewHolder.artist;
       String str3 = localViewHolder.document.getArtistName();
       localStatefulShadowTextView9.setText(str3);
       localViewHolder.artist.setVisibility(0);
     }
     label584: if (localViewHolder.duration != null)
     {
       int i5 = this.mDurationIdx;
       int i6 = paramCursor.getInt(i5) / 1000;
       StatefulShadowTextView localStatefulShadowTextView10 = localViewHolder.duration;
       Context localContext = getContext();
       long l1 = i6;
       String str4 = MusicUtils.makeTimeString(localContext, l1);
       localStatefulShadowTextView10.setText(str4);
     }
     if (localViewHolder.icon != null)
     {
       if ((this.mShowAlbumArt) && (!bool1))
         break label896;
       localViewHolder.icon.setVisibility(8);
     }
     label676: if (bool2)
     {
       if (!isInInfiniteMixMode())
         break label985;
       int i7 = paramCursor.getCount();
       int i8 = paramCursor.getPosition();
       ViewUtils.fadeViewForPosition(paramView, i7, i8, 4);
     }
   }
   while (true)
   {
     if (!this.mEditMode)
       break label995;
     int i9 = paramView.getPaddingLeft();
     int i10 = paramView.getPaddingTop();
     int i11 = paramView.getPaddingRight();
     int i12 = paramView.getPaddingBottom();
     Drawable localDrawable = this.mDragHandleBG;
     paramView.setBackgroundDrawable(localDrawable);
     paramView.setPadding(i9, i10, i11, i12);
     return;
     localViewHolder.contextMenu.setVisibility(0);
     break;
     label781: bool2 = false;
     break label183;
     label787: if (this.mCurrentAudioId == null)
       break label183;
     int i13 = this.mAudioIdIdx;
     long l2 = paramCursor.getLong(i13);
     long l3 = this.mCurrentAudioId.getId();
     if (l2 == l3);
     for (bool2 = true; ; bool2 = false)
       break;
     label839: n = 8;
     break label226;
     label846: localViewHolder.title.setTypeface(null, 0);
     break label248;
     label859: bool3 = false;
     break label277;
     label865: bool4 = false;
     break label304;
     label871: localViewHolder.year.setVisibility(4);
     break label504;
     label883: localViewHolder.artist.setVisibility(8);
     break label584;
     label896: localViewHolder.icon.setVisibility(0);
     localViewHolder.icon.setAvailable(bool3);
     if (!TextUtils.isEmpty(localViewHolder.document.getArtUrl()))
     {
       AsyncAlbumArtImageView localAsyncAlbumArtImageView1 = localViewHolder.icon;
       String str5 = localViewHolder.document.getArtUrl();
       localAsyncAlbumArtImageView1.setExternalAlbumArt(str5);
       break label676;
     }
     AsyncAlbumArtImageView localAsyncAlbumArtImageView2 = localViewHolder.icon;
     long l4 = localViewHolder.document.getAlbumId();
     localAsyncAlbumArtImageView2.setAlbumId(l4, null, null);
     break label676;
     label985: ViewUtils.setAlpha(paramView, 1.0F);
   }
   label995: paramView.setBackgroundDrawable(null);
 }