Merge pull request #158 from Redirion/patch-1
Avoid using su on Android if not required
This commit is contained in:
commit
68e102cca3
|
@ -378,7 +378,8 @@ public final class SerialPort
|
||||||
try { Thread.sleep(safetySleepTime); } catch (Exception e) {}
|
try { Thread.sleep(safetySleepTime); } catch (Exception e) {}
|
||||||
|
|
||||||
// If this is an Android root application, we must explicitly allow serial port access to the library
|
// If this is an Android root application, we must explicitly allow serial port access to the library
|
||||||
if (isAndroid)
|
File portFile = isAndroid ? new File(comPort) : null;
|
||||||
|
if (portFile != null && (!portFile.canRead() || !portFile.canWrite()))
|
||||||
{
|
{
|
||||||
Process process = null;
|
Process process = null;
|
||||||
try
|
try
|
||||||
|
|
Loading…
Reference in New Issue