Press and hold Back and Recent button to disable Screen Pinning

Hi, I am writing a test case for an Android device running Android 9 (Pie). There is a feature in Settings > Security & location called Screen Pinning, once this is enabled, the app will stay displayed at all times. Pressing Back or Home does not work unless the pinned app is disabled. To disable the Screen Pinning, the user has to press and hold both the Back button and the Recent button.

Does anyone know of a way to do this?

I have followed the steps here: but this details how to press at multiple locations based on x and y co-ordinates whereas these buttons are considered below the x and y range.

Here is my code so far:

AppiumDriver<MobileElement> driver = MobileDriverFactory.getDriver()
backButton = driver.longPressKey(new KeyEvent(AndroidKey.BACK))
homeButton = driver.longPressKey(new KeyEvent(AndroidKey.HOME))
MultiTouchAction multiTouch = new MultiTouchAction(driver)
TouchAction action1 = new TouchAction(driver)
TouchAction action2 = new TouchAction(driver)

The error I’m seeing is:
at io.appium.java_client.TouchAction$ActionParameter.(

I assume there is an issue with the line as the example in the Katalon Documents shows two arguments sent in the press command (x and y position)

Hope this explains it well. Looking forward to any advice or guidance.