Cleanup installer code
This commit is contained in:
parent
e1d9e0f3b1
commit
d250ac727b
@ -48,18 +48,6 @@ public class DefaultInstaller extends Installer {
|
|||||||
private static final int REQUEST_CODE_INSTALL = 0;
|
private static final int REQUEST_CODE_INSTALL = 0;
|
||||||
private static final int REQUEST_CODE_DELETE = 1;
|
private static final int REQUEST_CODE_DELETE = 1;
|
||||||
|
|
||||||
// TODO: check before installation?
|
|
||||||
// int result = Settings.Secure.getInt(getContentResolver(),
|
|
||||||
// Settings.Secure.INSTALL_NON_MARKET_APPS, 0);
|
|
||||||
// if (result == 0) {
|
|
||||||
// // show some dialog here
|
|
||||||
// // ...
|
|
||||||
// // and may be show application settings dialog manually
|
|
||||||
// Intent intent = new Intent();
|
|
||||||
// intent.setAction(Settings.ACTION_APPLICATION_SETTINGS);
|
|
||||||
// startActivity(intent);
|
|
||||||
// }
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void installPackage(File apkFile) throws AndroidNotCompatibleException {
|
public void installPackage(File apkFile) throws AndroidNotCompatibleException {
|
||||||
super.installPackage(apkFile);
|
super.installPackage(apkFile);
|
||||||
|
@ -62,10 +62,8 @@ public class RootInstaller extends Installer {
|
|||||||
@Override
|
@Override
|
||||||
public void onCommandResult(int commandCode, int exitCode, List<String> output) {
|
public void onCommandResult(int commandCode, int exitCode, List<String> output) {
|
||||||
if (exitCode != Shell.OnCommandResultListener.SHELL_RUNNING) {
|
if (exitCode != Shell.OnCommandResultListener.SHELL_RUNNING) {
|
||||||
// TODO
|
// NOTE: Additional exit codes:
|
||||||
// wrong uid
|
|
||||||
// Shell.OnCommandResultListener.SHELL_WRONG_UID
|
// Shell.OnCommandResultListener.SHELL_WRONG_UID
|
||||||
// exec failed
|
|
||||||
// Shell.OnCommandResultListener.SHELL_EXEC_FAILED
|
// Shell.OnCommandResultListener.SHELL_EXEC_FAILED
|
||||||
|
|
||||||
Log.e(TAG, "Error opening root shell with exitCode " + exitCode);
|
Log.e(TAG, "Error opening root shell with exitCode " + exitCode);
|
||||||
@ -89,10 +87,8 @@ public class RootInstaller extends Installer {
|
|||||||
@Override
|
@Override
|
||||||
public void onCommandResult(int commandCode, int exitCode, List<String> output) {
|
public void onCommandResult(int commandCode, int exitCode, List<String> output) {
|
||||||
if (exitCode != Shell.OnCommandResultListener.SHELL_RUNNING) {
|
if (exitCode != Shell.OnCommandResultListener.SHELL_RUNNING) {
|
||||||
// TODO
|
// NOTE: Additional exit codes:
|
||||||
// wrong uid
|
|
||||||
// Shell.OnCommandResultListener.SHELL_WRONG_UID
|
// Shell.OnCommandResultListener.SHELL_WRONG_UID
|
||||||
// exec failed
|
|
||||||
// Shell.OnCommandResultListener.SHELL_EXEC_FAILED
|
// Shell.OnCommandResultListener.SHELL_EXEC_FAILED
|
||||||
|
|
||||||
Log.e(TAG, "Error opening root shell with exitCode " + exitCode);
|
Log.e(TAG, "Error opening root shell with exitCode " + exitCode);
|
||||||
@ -116,10 +112,8 @@ public class RootInstaller extends Installer {
|
|||||||
@Override
|
@Override
|
||||||
public void onCommandResult(int commandCode, int exitCode, List<String> output) {
|
public void onCommandResult(int commandCode, int exitCode, List<String> output) {
|
||||||
if (exitCode != Shell.OnCommandResultListener.SHELL_RUNNING) {
|
if (exitCode != Shell.OnCommandResultListener.SHELL_RUNNING) {
|
||||||
// TODO
|
// NOTE: Additional exit codes:
|
||||||
// wrong uid
|
|
||||||
// Shell.OnCommandResultListener.SHELL_WRONG_UID
|
// Shell.OnCommandResultListener.SHELL_WRONG_UID
|
||||||
// exec failed
|
|
||||||
// Shell.OnCommandResultListener.SHELL_EXEC_FAILED
|
// Shell.OnCommandResultListener.SHELL_EXEC_FAILED
|
||||||
|
|
||||||
Log.e(TAG, "Error opening root shell with exitCode " + exitCode);
|
Log.e(TAG, "Error opening root shell with exitCode " + exitCode);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user