From d3c7f11f2d5304aed838e53647a03080e63373c1 Mon Sep 17 00:00:00 2001
From: Sebastian Goscik <sebastian.goscik@live.co.uk>
Date: Mon, 9 May 2016 14:34:49 +0100
Subject: [PATCH] AndroidDevice: Changed kick_off signature to match
 BaseLinuxExamples

---
 wlauto/common/android/device.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/wlauto/common/android/device.py b/wlauto/common/android/device.py
index f2cf52c5..9488cd43 100644
--- a/wlauto/common/android/device.py
+++ b/wlauto/common/android/device.py
@@ -442,7 +442,7 @@ class AndroidDevice(BaseLinuxDevice):  # pylint: disable=W0223
         else:
             return adb_shell(self.adb_name, command, timeout, check_exit_code, as_root)
 
-    def kick_off(self, command):
+    def kick_off(self, command, as_root=True):
         """
         Like execute but closes adb session and returns immediately, leaving the command running on the
         device (this is different from execute(background=True) which keeps adb connection open and returns
@@ -453,7 +453,7 @@ class AndroidDevice(BaseLinuxDevice):  # pylint: disable=W0223
         Added in version 2.1.4
 
         """
-        if not self.is_rooted:
+        if not self.is_rooted or not as_root:
             raise DeviceError('kick_off uses busybox\'s nohup applet and so can only be run a rooted device.')
         try:
             command = 'cd {} && busybox nohup {}'.format(self.working_directory, command)