ResolveInfosSorter.java 1.13 KB
package com.bitstrips.imoji.ui;

import android.content.pm.ActivityInfo;
import android.content.pm.ResolveInfo;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Comparator;
import java.util.List;
import java.util.Map;

public class ResolveInfosSorter
{
  public static List<ResolveInfo> sort(List<ResolveInfo> paramList, Map<String, Integer> paramMap)
  {
    paramList = new ArrayList(paramList);
    Collections.sort(paramList, new a(paramMap));
    return paramList;
  }
  
  static final class a
    implements Comparator<ResolveInfo>
  {
    private Map<String, Integer> a;
    
    a(Map<String, Integer> paramMap)
    {
      this.a = paramMap;
    }
    
    private int a(ResolveInfo paramResolveInfo)
    {
      paramResolveInfo = paramResolveInfo.activityInfo.packageName;
      if (this.a.containsKey(paramResolveInfo)) {
        return ((Integer)this.a.get(paramResolveInfo)).intValue();
      }
      return 0;
    }
  }
}


/* Location:              /home/merong/decompile/hackery-dex2jar.jar!/com/bitstrips/imoji/ui/ResolveInfosSorter.class
 * Java compiler version: 6 (50.0)
 * JD-Core Version:       0.7.1
 */