Increase root installer timeout from 5 to 30s. Fixes Issue #74.
The superuser shell has a timeout that can be specified. The timeout was set to 5 seconds, thus the exit code from the shell is -1 (a reserved exit code used by libsuperuse to indicate timeout). By my estimate, it is more likely that a user will hit this error message and get annoyed, compared to actually hitting a genuine timeout because of some issue with superuser. Especially when we factor in slow devices and large apps to install. Thus, the timeout has been bumped to a more generous 30 seconds.
This commit is contained in:
parent
3a3ea52077
commit
82fed66a8a
@ -19,15 +19,15 @@
|
||||
|
||||
package org.fdroid.fdroid.installer;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import eu.chainfire.libsuperuser.Shell;
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.content.pm.PackageManager;
|
||||
import android.util.Log;
|
||||
import eu.chainfire.libsuperuser.Shell;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Installer using a root shell and "pm install", "pm uninstall" commands
|
||||
@ -45,8 +45,8 @@ public class RootInstaller extends Installer {
|
||||
Shell.Builder shellBuilder = new Shell.Builder()
|
||||
.useSU()
|
||||
.setWantSTDERR(true)
|
||||
.setWatchdogTimeout(5)
|
||||
.setMinimalLogging(true);
|
||||
.setWatchdogTimeout(30)
|
||||
.setMinimalLogging(false);
|
||||
|
||||
return shellBuilder;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user