Remove some unused code
This commit is contained in:
parent
ae5fb8e8fc
commit
e34192573d
@ -115,10 +115,6 @@ public class FDroidApp extends Application {
|
|||||||
activity.setTheme(getCurThemeResId());
|
activity.setTheme(getCurThemeResId());
|
||||||
}
|
}
|
||||||
|
|
||||||
public static Theme getCurTheme() {
|
|
||||||
return curTheme;
|
|
||||||
}
|
|
||||||
|
|
||||||
public static int getCurThemeResId() {
|
public static int getCurThemeResId() {
|
||||||
switch (curTheme) {
|
switch (curTheme) {
|
||||||
case light:
|
case light:
|
||||||
|
@ -32,12 +32,4 @@ public class Permission {
|
|||||||
return Character.toUpperCase(label.charAt(0)) + label.substring(1);
|
return Character.toUpperCase(label.charAt(0)) + label.substring(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
public CharSequence getDescription() {
|
|
||||||
return this.permissionInfo.loadDescription(this.packageManager);
|
|
||||||
}
|
|
||||||
|
|
||||||
public Drawable getIcon() {
|
|
||||||
return this.permissionInfo.loadIcon(this.packageManager);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -414,10 +414,6 @@ public final class Utils {
|
|||||||
return new Locale(languageTag);
|
return new Locale(languageTag);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static String getApkUrl(Apk apk) {
|
|
||||||
return getApkUrl(apk.repoAddress, apk);
|
|
||||||
}
|
|
||||||
|
|
||||||
public static String getApkUrl(String repoAddress, Apk apk) {
|
public static String getApkUrl(String repoAddress, Apk apk) {
|
||||||
return repoAddress + "/" + apk.apkName.replace(" ", "%20");
|
return repoAddress + "/" + apk.apkName.replace(" ", "%20");
|
||||||
}
|
}
|
||||||
|
@ -1,78 +0,0 @@
|
|||||||
package org.fdroid.fdroid.compat;
|
|
||||||
|
|
||||||
import android.annotation.TargetApi;
|
|
||||||
|
|
||||||
public abstract class LayoutCompat extends Compatibility {
|
|
||||||
|
|
||||||
public static LayoutCompat create() {
|
|
||||||
if (hasApi(17)) {
|
|
||||||
return new JellyBeanMr1LayoutCompatImpl();
|
|
||||||
}
|
|
||||||
return new OldLayoutCompatImpl();
|
|
||||||
}
|
|
||||||
|
|
||||||
private static final LayoutCompat impl = LayoutCompat.create();
|
|
||||||
|
|
||||||
protected abstract int relativeLayoutStartOf();
|
|
||||||
|
|
||||||
protected abstract int relativeLayoutEndOf();
|
|
||||||
|
|
||||||
protected abstract int relativeLayoutAlignParentStart();
|
|
||||||
|
|
||||||
protected abstract int relativeLayoutAlignParentEnd();
|
|
||||||
|
|
||||||
public static class RelativeLayout {
|
|
||||||
public static final int START_OF = impl.relativeLayoutStartOf();
|
|
||||||
public static final int END_OF = impl.relativeLayoutEndOf();
|
|
||||||
public static final int ALIGN_PARENT_START = impl.relativeLayoutAlignParentStart();
|
|
||||||
public static final int ALIGN_PARENT_END = impl.relativeLayoutAlignParentEnd();
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
class OldLayoutCompatImpl extends LayoutCompat {
|
|
||||||
|
|
||||||
@Override
|
|
||||||
protected int relativeLayoutStartOf() {
|
|
||||||
return android.widget.RelativeLayout.LEFT_OF;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
protected int relativeLayoutEndOf() {
|
|
||||||
return android.widget.RelativeLayout.RIGHT_OF;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
protected int relativeLayoutAlignParentStart() {
|
|
||||||
return android.widget.RelativeLayout.ALIGN_PARENT_LEFT;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
protected int relativeLayoutAlignParentEnd() {
|
|
||||||
return android.widget.RelativeLayout.ALIGN_PARENT_RIGHT;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@TargetApi(17)
|
|
||||||
class JellyBeanMr1LayoutCompatImpl extends LayoutCompat {
|
|
||||||
|
|
||||||
@Override
|
|
||||||
protected int relativeLayoutStartOf() {
|
|
||||||
return android.widget.RelativeLayout.START_OF;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
protected int relativeLayoutEndOf() {
|
|
||||||
return android.widget.RelativeLayout.END_OF;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
protected int relativeLayoutAlignParentStart() {
|
|
||||||
return android.widget.RelativeLayout.ALIGN_PARENT_START;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
protected int relativeLayoutAlignParentEnd() {
|
|
||||||
return android.widget.RelativeLayout.ALIGN_PARENT_END;
|
|
||||||
}
|
|
||||||
}
|
|
@ -100,7 +100,7 @@ public class HttpDownloader extends Downloader {
|
|||||||
|
|
||||||
connection = (HttpURLConnection) sourceUrl.openConnection();
|
connection = (HttpURLConnection) sourceUrl.openConnection();
|
||||||
if (credentials != null) {
|
if (credentials != null) {
|
||||||
credentials.authenticate((HttpURLConnection) connection);
|
credentials.authenticate(connection);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -42,7 +42,6 @@ import java.util.Locale;
|
|||||||
public class RepoDetailsActivity extends ActionBarActivity {
|
public class RepoDetailsActivity extends ActionBarActivity {
|
||||||
private static final String TAG = "RepoDetailsActivity";
|
private static final String TAG = "RepoDetailsActivity";
|
||||||
|
|
||||||
public static final String MIME_TYPE = "application/vnd.org.fdroid.fdroid.repo";
|
|
||||||
public static final String ARG_REPO_ID = "repo_id";
|
public static final String ARG_REPO_ID = "repo_id";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
x
Reference in New Issue
Block a user