purge unused code from Installer classes
This commit is contained in:
parent
0e1584f083
commit
9d69098605
@ -27,7 +27,6 @@ import android.content.pm.PackageManager;
|
||||
import android.net.Uri;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* For Android < 4: Default Installer using the public PackageManager API of
|
||||
@ -61,11 +60,6 @@ public class DefaultInstaller extends Installer {
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void installPackageInternal(List<File> apkFiles) throws AndroidNotCompatibleException {
|
||||
// not used
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void deletePackageInternal(String packageName) throws AndroidNotCompatibleException {
|
||||
try {
|
||||
@ -103,10 +97,4 @@ public class DefaultInstaller extends Installer {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean supportsUnattendedOperations() {
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -29,7 +29,6 @@ import android.net.Uri;
|
||||
import android.os.Build;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* For Android >= 4.0: Default Installer using the public PackageManager API of
|
||||
@ -73,11 +72,6 @@ public class DefaultSdk14Installer extends Installer {
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void installPackageInternal(List<File> apkFiles) throws AndroidNotCompatibleException {
|
||||
// not used
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void deletePackageInternal(String packageName) throws AndroidNotCompatibleException {
|
||||
try {
|
||||
@ -129,10 +123,4 @@ public class DefaultSdk14Installer extends Installer {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean supportsUnattendedOperations() {
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -30,7 +30,6 @@ import org.fdroid.fdroid.Utils;
|
||||
import org.fdroid.fdroid.privileged.install.InstallExtensionDialogActivity;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Abstract Installer class. Also provides static methods to automatically
|
||||
@ -53,20 +52,9 @@ public abstract class Installer {
|
||||
|
||||
private static final long serialVersionUID = -8343133906463328027L;
|
||||
|
||||
public AndroidNotCompatibleException() {
|
||||
}
|
||||
|
||||
public AndroidNotCompatibleException(String message) {
|
||||
super(message);
|
||||
}
|
||||
|
||||
public AndroidNotCompatibleException(Throwable cause) {
|
||||
super(cause);
|
||||
}
|
||||
|
||||
public AndroidNotCompatibleException(String message, Throwable cause) {
|
||||
super(message, cause);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@ -175,18 +163,6 @@ public abstract class Installer {
|
||||
installPackageInternal(apkFile);
|
||||
}
|
||||
|
||||
public void installPackage(List<File> apkFiles) throws AndroidNotCompatibleException {
|
||||
// check if files exist...
|
||||
for (File apkFile : apkFiles) {
|
||||
if (!apkFile.exists()) {
|
||||
Log.e(TAG, "Couldn't find file " + apkFile + " to install.");
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
installPackageInternal(apkFiles);
|
||||
}
|
||||
|
||||
public void deletePackage(String packageName) throws AndroidNotCompatibleException {
|
||||
// check if package exists before proceeding...
|
||||
try {
|
||||
@ -218,13 +194,8 @@ public abstract class Installer {
|
||||
protected abstract void installPackageInternal(File apkFile)
|
||||
throws AndroidNotCompatibleException;
|
||||
|
||||
protected abstract void installPackageInternal(List<File> apkFiles)
|
||||
throws AndroidNotCompatibleException;
|
||||
|
||||
protected abstract void deletePackageInternal(String packageName)
|
||||
throws AndroidNotCompatibleException;
|
||||
|
||||
public abstract boolean handleOnActivityResult(int requestCode, int resultCode, Intent data);
|
||||
|
||||
public abstract boolean supportsUnattendedOperations();
|
||||
}
|
||||
|
@ -44,7 +44,6 @@ import org.fdroid.fdroid.privileged.views.AppSecurityPermissions;
|
||||
import org.fdroid.fdroid.privileged.views.InstallConfirmActivity;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Installer based on using internal hidden APIs of the Android OS, which are
|
||||
@ -237,12 +236,6 @@ public class PrivilegedInstaller extends Installer {
|
||||
Context.BIND_AUTO_CREATE);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void installPackageInternal(List<File> apkFiles)
|
||||
throws AndroidNotCompatibleException {
|
||||
// not used
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void deletePackageInternal(final String packageName)
|
||||
throws AndroidNotCompatibleException {
|
||||
@ -368,11 +361,6 @@ public class PrivilegedInstaller extends Installer {
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean supportsUnattendedOperations() {
|
||||
return false;
|
||||
}
|
||||
|
||||
public static final int INSTALL_REPLACE_EXISTING = 2;
|
||||
|
||||
/**
|
||||
|
Loading…
x
Reference in New Issue
Block a user