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 android.net.Uri;
|
||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* For Android < 4: Default Installer using the public PackageManager API of
|
* 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
|
@Override
|
||||||
protected void deletePackageInternal(String packageName) throws AndroidNotCompatibleException {
|
protected void deletePackageInternal(String packageName) throws AndroidNotCompatibleException {
|
||||||
try {
|
try {
|
||||||
@ -103,10 +97,4 @@ public class DefaultInstaller extends Installer {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean supportsUnattendedOperations() {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -29,7 +29,6 @@ import android.net.Uri;
|
|||||||
import android.os.Build;
|
import android.os.Build;
|
||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* For Android >= 4.0: Default Installer using the public PackageManager API of
|
* 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
|
@Override
|
||||||
protected void deletePackageInternal(String packageName) throws AndroidNotCompatibleException {
|
protected void deletePackageInternal(String packageName) throws AndroidNotCompatibleException {
|
||||||
try {
|
try {
|
||||||
@ -129,10 +123,4 @@ public class DefaultSdk14Installer extends Installer {
|
|||||||
return false;
|
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 org.fdroid.fdroid.privileged.install.InstallExtensionDialogActivity;
|
||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Abstract Installer class. Also provides static methods to automatically
|
* Abstract Installer class. Also provides static methods to automatically
|
||||||
@ -53,20 +52,9 @@ public abstract class Installer {
|
|||||||
|
|
||||||
private static final long serialVersionUID = -8343133906463328027L;
|
private static final long serialVersionUID = -8343133906463328027L;
|
||||||
|
|
||||||
public AndroidNotCompatibleException() {
|
|
||||||
}
|
|
||||||
|
|
||||||
public AndroidNotCompatibleException(String message) {
|
|
||||||
super(message);
|
|
||||||
}
|
|
||||||
|
|
||||||
public AndroidNotCompatibleException(Throwable cause) {
|
public AndroidNotCompatibleException(Throwable cause) {
|
||||||
super(cause);
|
super(cause);
|
||||||
}
|
}
|
||||||
|
|
||||||
public AndroidNotCompatibleException(String message, Throwable cause) {
|
|
||||||
super(message, cause);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -175,18 +163,6 @@ public abstract class Installer {
|
|||||||
installPackageInternal(apkFile);
|
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 {
|
public void deletePackage(String packageName) throws AndroidNotCompatibleException {
|
||||||
// check if package exists before proceeding...
|
// check if package exists before proceeding...
|
||||||
try {
|
try {
|
||||||
@ -218,13 +194,8 @@ public abstract class Installer {
|
|||||||
protected abstract void installPackageInternal(File apkFile)
|
protected abstract void installPackageInternal(File apkFile)
|
||||||
throws AndroidNotCompatibleException;
|
throws AndroidNotCompatibleException;
|
||||||
|
|
||||||
protected abstract void installPackageInternal(List<File> apkFiles)
|
|
||||||
throws AndroidNotCompatibleException;
|
|
||||||
|
|
||||||
protected abstract void deletePackageInternal(String packageName)
|
protected abstract void deletePackageInternal(String packageName)
|
||||||
throws AndroidNotCompatibleException;
|
throws AndroidNotCompatibleException;
|
||||||
|
|
||||||
public abstract boolean handleOnActivityResult(int requestCode, int resultCode, Intent data);
|
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 org.fdroid.fdroid.privileged.views.InstallConfirmActivity;
|
||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Installer based on using internal hidden APIs of the Android OS, which are
|
* 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);
|
Context.BIND_AUTO_CREATE);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
protected void installPackageInternal(List<File> apkFiles)
|
|
||||||
throws AndroidNotCompatibleException {
|
|
||||||
// not used
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void deletePackageInternal(final String packageName)
|
protected void deletePackageInternal(final String packageName)
|
||||||
throws AndroidNotCompatibleException {
|
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;
|
public static final int INSTALL_REPLACE_EXISTING = 2;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
x
Reference in New Issue
Block a user