Replace HashSet types with Set
This commit is contained in:
parent
50ee88fbc7
commit
510e8e1ba5
@ -30,6 +30,7 @@ import java.util.Collections;
|
||||
import java.util.Date;
|
||||
import java.util.Formatter;
|
||||
import java.util.HashMap;
|
||||
import java.util.Set;
|
||||
import java.util.HashSet;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
@ -325,8 +326,8 @@ public class DB {
|
||||
// check if an APK is compatible with the user's device.
|
||||
private static class CompatibilityChecker extends Compatibility {
|
||||
|
||||
private HashSet<String> features;
|
||||
private HashSet<String> cpuAbis;
|
||||
private Set<String> features;
|
||||
private Set<String> cpuAbis;
|
||||
private String cpuAbisDesc;
|
||||
private boolean ignoreTouchscreen;
|
||||
|
||||
|
@ -1,5 +1,6 @@
|
||||
package org.fdroid.fdroid.compat;
|
||||
|
||||
import java.util.Set;
|
||||
import java.util.HashSet;
|
||||
|
||||
import android.annotation.TargetApi;
|
||||
@ -8,21 +9,21 @@ import android.os.Build;
|
||||
|
||||
public class SupportedArchitectures extends Compatibility {
|
||||
|
||||
private static HashSet<String> getOneAbi() {
|
||||
HashSet<String> abis = new HashSet<String>(1);
|
||||
private static Set<String> getOneAbi() {
|
||||
Set<String> abis = new HashSet<String>(1);
|
||||
abis.add(Build.CPU_ABI);
|
||||
return abis;
|
||||
}
|
||||
|
||||
@TargetApi(8)
|
||||
private static HashSet<String> getTwoAbis() {
|
||||
HashSet<String> abis = new HashSet<String>(2);
|
||||
private static Set<String> getTwoAbis() {
|
||||
Set<String> abis = new HashSet<String>(2);
|
||||
abis.add(Build.CPU_ABI);
|
||||
abis.add(Build.CPU_ABI2);
|
||||
return abis;
|
||||
}
|
||||
|
||||
public static HashSet<String> getAbis() {
|
||||
public static Set<String> getAbis() {
|
||||
if (hasApi(8)) return getTwoAbis();
|
||||
return getOneAbi();
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user