Examples of AndroidExecutionException


Examples of org.jboss.arquillian.android.api.AndroidExecutionException

    @Override
    public String getProperty(String name) throws IOException, AndroidExecutionException {
        try {
            return delegate.getPropertyCacheOrSync(name);
        } catch (TimeoutException e) {
            throw new AndroidExecutionException("Unable to get property '" + name + "' value in given timeout", e);
        } catch (AdbCommandRejectedException e) {
            throw new AndroidExecutionException("Unable to get property '" + name + "' value, command was rejected", e);
        } catch (ShellCommandUnresponsiveException e) {
            throw new AndroidExecutionException("Unable to get property '" + name + "' value, shell is not responsive", e);
        }
    }
View Full Code Here

Examples of org.jboss.arquillian.android.api.AndroidExecutionException

    public void executeShellCommand(String command, AndroidDeviceOutputReciever reciever) throws AndroidExecutionException
    {
        try {
            delegate.executeShellCommand(command, new AndroidRecieverDelegate(reciever));
        } catch (TimeoutException e) {
            throw new AndroidExecutionException("Unable to execute command '" + command + "' within given timeout", e);
        } catch (AdbCommandRejectedException e) {
            throw new AndroidExecutionException("Unable to execute command '" + command + "', command was rejected", e);
        } catch (ShellCommandUnresponsiveException e) {
            throw new AndroidExecutionException("Unable to execute command '" + command + "', shell is not responsive", e);
        } catch (IOException e) {
            throw new AndroidExecutionException("Unable to execute command '" + command + "'", e);
        }

    }
View Full Code Here

Examples of org.jboss.arquillian.android.api.AndroidExecutionException

    @Override
    public void createPortForwarding(int localPort, int remotePort) throws AndroidExecutionException {
        try {
            delegate.createForward(localPort, remotePort);
        } catch (TimeoutException e) {
            throw new AndroidExecutionException("Unable to forward port (" + localPort + " to " + remotePort
                    + ") within given timeout", e);
        } catch (AdbCommandRejectedException e) {
            throw new AndroidExecutionException("Unable to forward port (" + localPort + " to " + remotePort
                    + "), command was rejected", e);
        } catch (IOException e) {
            throw new AndroidExecutionException("Unable to forward port (" + localPort + " to " + remotePort
                    + ").", e);
        }
    }
View Full Code Here

Examples of org.jboss.arquillian.android.api.AndroidExecutionException

    @Override
    public void removePortForwarding(int localPort, int remotePort) throws AndroidExecutionException {
        try {
            delegate.removeForward(localPort, remotePort);
        } catch (TimeoutException e) {
            throw new AndroidExecutionException("Unable to remove port forwarding (" + localPort + " to " + remotePort
                    + ") within given timeout", e);
        } catch (AdbCommandRejectedException e) {
            throw new AndroidExecutionException("Unable to remove port forwarding (" + localPort + " to " + remotePort
                    + "), command was rejected", e);
        } catch (IOException e) {
            throw new AndroidExecutionException("Unable to remove port forwarding (" + localPort + " to " + remotePort
                    + ").", e);
        }
    }
View Full Code Here

Examples of org.jboss.arquillian.android.api.AndroidExecutionException

    public void installPackage(File packageFilePath, boolean reinstall, String... extraArgs) throws AndroidExecutionException {
        Validate.isReadable(packageFilePath, "File " + packageFilePath + " must represent a readable APK file");
        try {
            String retval = delegate.installPackage(packageFilePath.getAbsolutePath(), reinstall, extraArgs);
            if (retval != null) {
                throw new AndroidExecutionException("Unable to install APK from " + packageFilePath.getAbsolutePath()
                        + ". Command failed with status code: " + retval);
            }
        } catch (InstallException e) {
            throw new AndroidExecutionException("Unable to install APK from " + packageFilePath.getAbsolutePath(), e);
        }

    }
View Full Code Here

Examples of org.jboss.arquillian.android.api.AndroidExecutionException

    @Override
    public void uninstallPackage(String packageName) throws AndroidExecutionException {
        try {
            delegate.uninstallPackage(packageName);
        } catch (InstallException e) {
            throw new AndroidExecutionException("Unable to uninstall APK named " + packageName, e);
        }

    }
View Full Code Here

Examples of org.jboss.arquillian.android.api.AndroidExecutionException

                    {
                        put("Do you wish to create a custom hardware profile [no]", "no\n");
                    }
                }, args.toArray(argsArrays));
            } catch (InterruptedException e) {
                throw new AndroidExecutionException("Unable to create a new AVD Device", e);
            } catch (ExecutionException e) {
                throw new AndroidExecutionException("Unable to create a new AVD Device", e);
            }

            log.info("Android virtual device " + avdName + " was created");
            avdCreated.fire(new AndroidVirtualDeviceCreated(avdName));
        } else {
View Full Code Here

Examples of org.jboss.arquillian.android.api.AndroidExecutionException

        List<String> output;
        try {
            output = executor.execute(sdk.getAndroidPath(), "list", "avd");
        } catch (InterruptedException e) {
            throw new AndroidExecutionException("Unable to get list of available AVDs", e);
        } catch (ExecutionException e) {
            throw new AndroidExecutionException("Unable to get list of available AVDs", e);
        }
        for (String line : output) {
            Matcher m;
            if (line.trim().startsWith("Name: ") && (m = deviceName.matcher(line)).matches()) {
                String name = m.group(1);
View Full Code Here

Examples of org.jboss.arquillian.android.api.AndroidExecutionException

                    return listener.isOffline();
                }
            }, countdown.timeLeft(), countdown.getTimeUnit().convert(1, TimeUnit.SECONDS), countdown.getTimeUnit());

            if (isOffline == false) {
                throw new AndroidExecutionException("Unable to disconnect AVD device {0} in given timeout {1} seconds",
                        device.getAvdName(), countdown.timeout());
            }

            log.log(Level.INFO, "Device {0} was disconnected in {1} seconds.",
                    new Object[] { device.getAvdName(), countdown.timeElapsed() });
        } catch (InterruptedException e) {
            throw new AndroidExecutionException(e, "Unable to disconnect AVD device {0}", device.getAvdName());
        } catch (ExecutionException e) {
            throw new AndroidExecutionException(e, "Unable to disconnect AVD device {0}", device.getAvdName());
        }

    }
View Full Code Here

Examples of org.jboss.arquillian.android.api.AndroidExecutionException

                log.log(Level.WARNING, "Emulator process was forcibly destroyed, {0} seconds remaining to dispose the device",
                        countdown.timeLeft());
                return false;
            } catch (InterruptedException e) {
                p.destroy();
                throw new AndroidExecutionException(e, "Unable to stop emulator {0}", device.getAvdName());
            } catch (ExecutionException e) {
                p.destroy();
                throw new AndroidExecutionException(e, "Unable to stop emulator {0}", device.getAvdName());
            }
        }

    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.