More cleanup in installer classes

This commit is contained in:
Dominik Schürmann 2014-05-11 11:16:26 +02:00
parent aeae0bcec3
commit 91ddc838a7
4 changed files with 27 additions and 26 deletions

View File

@ -50,7 +50,7 @@ public class DefaultInstaller extends Installer {
private static final int REQUEST_CODE_DELETE = 1;
@Override
public void installPackageInternal(File apkFile) throws AndroidNotCompatibleException {
protected void installPackageInternal(File apkFile) throws AndroidNotCompatibleException {
Intent intent = new Intent();
intent.setAction(Intent.ACTION_VIEW);
intent.setDataAndType(Uri.fromFile(apkFile),
@ -63,7 +63,13 @@ public class DefaultInstaller extends Installer {
}
@Override
public void deletePackageInternal(String packageName) throws AndroidNotCompatibleException {
protected void installPackageInternal(List<File> apkFiles) throws AndroidNotCompatibleException {
// TODO Auto-generated method stub
}
@Override
protected void deletePackageInternal(String packageName) throws AndroidNotCompatibleException {
PackageInfo pkgInfo = null;
try {
pkgInfo = mPm.getPackageInfo(packageName, 0);
@ -106,10 +112,4 @@ public class DefaultInstaller extends Installer {
return false;
}
@Override
protected void installPackageInternal(List<File> apkFiles) throws AndroidNotCompatibleException {
// TODO Auto-generated method stub
}
}

View File

@ -54,7 +54,7 @@ public class DefaultInstallerSdk14 extends Installer {
@SuppressWarnings("deprecation")
@Override
public void installPackageInternal(File apkFile) throws AndroidNotCompatibleException {
protected void installPackageInternal(File apkFile) throws AndroidNotCompatibleException {
Intent intent = new Intent();
intent.setAction(Intent.ACTION_INSTALL_PACKAGE);
intent.setData(Uri.fromFile(apkFile));
@ -75,7 +75,13 @@ public class DefaultInstallerSdk14 extends Installer {
}
@Override
public void deletePackageInternal(String packageName) throws AndroidNotCompatibleException {
protected void installPackageInternal(List<File> apkFiles) throws AndroidNotCompatibleException {
// TODO Auto-generated method stub
}
@Override
protected void deletePackageInternal(String packageName) throws AndroidNotCompatibleException {
PackageInfo pkgInfo = null;
try {
pkgInfo = mPm.getPackageInfo(packageName, 0);
@ -130,10 +136,4 @@ public class DefaultInstallerSdk14 extends Installer {
return false;
}
@Override
protected void installPackageInternal(List<File> apkFiles) throws AndroidNotCompatibleException {
// TODO Auto-generated method stub
}
}

View File

@ -52,7 +52,7 @@ public class RootInstaller extends Installer {
}
@Override
public void installPackageInternal(final File apkFile) throws AndroidNotCompatibleException {
protected void installPackageInternal(final File apkFile) throws AndroidNotCompatibleException {
rootSession = createShellBuilder().open(new Shell.OnCommandResultListener() {
// Callback to report whether the shell was successfully
@ -75,7 +75,7 @@ public class RootInstaller extends Installer {
}
@Override
public void installPackageInternal(final List<File> apkFiles)
protected void installPackageInternal(final List<File> apkFiles)
throws AndroidNotCompatibleException {
rootSession = createShellBuilder().open(new Shell.OnCommandResultListener() {
@ -99,7 +99,7 @@ public class RootInstaller extends Installer {
}
@Override
public void deletePackageInternal(final String packageName)
protected void deletePackageInternal(final String packageName)
throws AndroidNotCompatibleException {
rootSession = createShellBuilder().open(new Shell.OnCommandResultListener() {

View File

@ -125,7 +125,7 @@ public class SystemPermissionInstaller extends Installer {
}
@Override
public void installPackageInternal(File apkFile) throws AndroidNotCompatibleException {
protected void installPackageInternal(File apkFile) throws AndroidNotCompatibleException {
Uri packageURI = Uri.fromFile(apkFile);
try {
mInstallMethod.invoke(mPm, new Object[] {
@ -137,7 +137,13 @@ public class SystemPermissionInstaller extends Installer {
}
@Override
public void deletePackageInternal(String packageName) throws AndroidNotCompatibleException {
protected void installPackageInternal(List<File> apkFiles) throws AndroidNotCompatibleException {
// TODO Auto-generated method stub
}
@Override
protected void deletePackageInternal(String packageName) throws AndroidNotCompatibleException {
try {
mDeleteMethod.invoke(mPm, new Object[] {
packageName, mDeleteObserver, 0
@ -464,9 +470,4 @@ public class SystemPermissionInstaller extends Installer {
*/
public static final int DELETE_FAILED_USER_RESTRICTED = -3;
@Override
protected void installPackageInternal(List<File> apkFiles) throws AndroidNotCompatibleException {
// TODO Auto-generated method stub
}
}