ResolveInfosSorter.java
1.13 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
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
*/