Remove some unused code

This commit is contained in:
Daniel Martí 2016-01-02 19:04:11 +01:00
parent ae5fb8e8fc
commit e34192573d
6 changed files with 1 additions and 96 deletions

View File

@ -115,10 +115,6 @@ public class FDroidApp extends Application {
activity.setTheme(getCurThemeResId());
}
public static Theme getCurTheme() {
return curTheme;
}
public static int getCurThemeResId() {
switch (curTheme) {
case light:

View File

@ -32,12 +32,4 @@ public class Permission {
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);
}
}

View File

@ -414,10 +414,6 @@ public final class Utils {
return new Locale(languageTag);
}
public static String getApkUrl(Apk apk) {
return getApkUrl(apk.repoAddress, apk);
}
public static String getApkUrl(String repoAddress, Apk apk) {
return repoAddress + "/" + apk.apkName.replace(" ", "%20");
}

View File

@ -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;
}
}

View File

@ -100,7 +100,7 @@ public class HttpDownloader extends Downloader {
connection = (HttpURLConnection) sourceUrl.openConnection();
if (credentials != null) {
credentials.authenticate((HttpURLConnection) connection);
credentials.authenticate(connection);
}
}
}

View File

@ -42,7 +42,6 @@ import java.util.Locale;
public class RepoDetailsActivity extends ActionBarActivity {
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";
/**