Raise minSdk to 5, UIL requires it
This commit is contained in:
parent
f4e23bb2ed
commit
e8d3a7a4ef
@ -6,7 +6,7 @@
|
|||||||
android:versionName="@string/version_name" >
|
android:versionName="@string/version_name" >
|
||||||
|
|
||||||
<uses-sdk
|
<uses-sdk
|
||||||
android:minSdkVersion="4"
|
android:minSdkVersion="5"
|
||||||
android:targetSdkVersion="19" />
|
android:targetSdkVersion="19" />
|
||||||
|
|
||||||
<supports-screens
|
<supports-screens
|
||||||
|
@ -348,38 +348,14 @@ public class DB {
|
|||||||
|
|
||||||
// Call isCompatible(apk) on an instance of this class to
|
// Call isCompatible(apk) on an instance of this class to
|
||||||
// check if an APK is compatible with the user's device.
|
// check if an APK is compatible with the user's device.
|
||||||
public static abstract class CompatibilityChecker extends Compatibility {
|
private static class CompatibilityChecker extends Compatibility {
|
||||||
|
|
||||||
public abstract boolean isCompatible(Apk apk);
|
|
||||||
|
|
||||||
public static CompatibilityChecker getChecker(Context ctx) {
|
|
||||||
CompatibilityChecker checker;
|
|
||||||
if (hasApi(5))
|
|
||||||
checker = new EclairChecker(ctx);
|
|
||||||
else
|
|
||||||
checker = new BasicChecker();
|
|
||||||
Log.d("FDroid", "Compatibility checker for API level "
|
|
||||||
+ getApi() + ": " + checker.getClass().getName());
|
|
||||||
return checker;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private static class BasicChecker extends CompatibilityChecker {
|
|
||||||
@Override
|
|
||||||
public boolean isCompatible(Apk apk) {
|
|
||||||
return hasApi(apk.minSdkVersion);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@TargetApi(5)
|
|
||||||
private static class EclairChecker extends CompatibilityChecker {
|
|
||||||
|
|
||||||
private HashSet<String> features;
|
private HashSet<String> features;
|
||||||
private List<String> cpuAbis;
|
private List<String> cpuAbis;
|
||||||
private boolean ignoreTouchscreen;
|
private boolean ignoreTouchscreen;
|
||||||
|
|
||||||
@SuppressLint("NewApi")
|
//@SuppressLint("NewApi")
|
||||||
public EclairChecker(Context ctx) {
|
public CompatibilityChecker(Context ctx) {
|
||||||
|
|
||||||
SharedPreferences prefs = PreferenceManager
|
SharedPreferences prefs = PreferenceManager
|
||||||
.getDefaultSharedPreferences(ctx);
|
.getDefaultSharedPreferences(ctx);
|
||||||
@ -416,7 +392,6 @@ public class DB {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean isCompatible(Apk apk) {
|
public boolean isCompatible(Apk apk) {
|
||||||
if (!hasApi(apk.minSdkVersion))
|
if (!hasApi(apk.minSdkVersion))
|
||||||
return false;
|
return false;
|
||||||
@ -1181,8 +1156,9 @@ public class DB {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Lazy initialise this...
|
// Lazy initialise this...
|
||||||
if (compatChecker == null)
|
if (compatChecker == null) {
|
||||||
compatChecker = Apk.CompatibilityChecker.getChecker(mContext);
|
compatChecker = new Apk.CompatibilityChecker(mContext);
|
||||||
|
}
|
||||||
|
|
||||||
// See if it's compatible (by which we mean if it has at least one
|
// See if it's compatible (by which we mean if it has at least one
|
||||||
// compatible apk)
|
// compatible apk)
|
||||||
|
@ -272,10 +272,10 @@ public class FDroid extends FragmentActivity {
|
|||||||
if ((resultCode & PreferencesActivity.RESULT_RESTART) != 0) {
|
if ((resultCode & PreferencesActivity.RESULT_RESTART) != 0) {
|
||||||
((FDroidApp) getApplication()).reloadTheme();
|
((FDroidApp) getApplication()).reloadTheme();
|
||||||
final Intent intent = getIntent();
|
final Intent intent = getIntent();
|
||||||
if (Build.VERSION.SDK_INT >= 5) overridePendingTransition(0, 0);
|
overridePendingTransition(0, 0);
|
||||||
intent.addFlags(Intent.FLAG_ACTIVITY_NO_ANIMATION);
|
intent.addFlags(Intent.FLAG_ACTIVITY_NO_ANIMATION);
|
||||||
finish();
|
finish();
|
||||||
if (Build.VERSION.SDK_INT >= 5) overridePendingTransition(0, 0);
|
overridePendingTransition(0, 0);
|
||||||
startActivity(intent);
|
startActivity(intent);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user