Fix the Recents helper testing strategy

* Support failed app state clearing

Change-Id: Ic81682fca56c541d70f1c76bed2a5cf948efb897
diff --git a/tests/functional/app-helper/src/android/platform/test/helpers/tests/BaseHelperTest.java b/tests/functional/app-helper/src/android/platform/test/helpers/tests/BaseHelperTest.java
index 08f623e..6b8fae9 100644
--- a/tests/functional/app-helper/src/android/platform/test/helpers/tests/BaseHelperTest.java
+++ b/tests/functional/app-helper/src/android/platform/test/helpers/tests/BaseHelperTest.java
@@ -38,7 +38,11 @@
 
     @Before
     public void clearAppData() {
-        getActivityManager().clearApplicationUserData(getHelper().getPackage(), null);
+        try {
+            getActivityManager().clearApplicationUserData(getHelper().getPackage(), null);
+        } catch (UnsupportedOperationException e) {
+            // ignore
+        }
     }
 
     @After
diff --git a/tests/functional/app-helper/src/android/platform/test/helpers/tests/RecentsHelperTest.java b/tests/functional/app-helper/src/android/platform/test/helpers/tests/RecentsHelperTest.java
index 729eb33..e1deaf4 100644
--- a/tests/functional/app-helper/src/android/platform/test/helpers/tests/RecentsHelperTest.java
+++ b/tests/functional/app-helper/src/android/platform/test/helpers/tests/RecentsHelperTest.java
@@ -17,8 +17,10 @@
 package android.platform.test.helpers.tests;
 
 import android.app.Instrumentation;
-import android.platform.test.helpers.RecentsHelperImpl;
+import android.platform.test.helpers.ChromeHelperImpl;
+import android.platform.test.helpers.GoogleCameraHelperImpl;
 import android.platform.test.helpers.IStandardAppHelper;
+import android.platform.test.helpers.RecentsHelperImpl;
 import android.support.test.InstrumentationRegistry;
 import android.support.test.uiautomator.Direction;
 import android.support.test.uiautomator.UiDevice;
@@ -36,6 +38,14 @@
         Instrumentation instr = InstrumentationRegistry.getInstrumentation();
         mHelper = new RecentsHelperImpl(instr);
         mDevice = UiDevice.getInstance(instr);
+
+        GoogleCameraHelperImpl cameraHelper = new GoogleCameraHelperImpl(instr);
+        ChromeHelperImpl chromeHelper = new ChromeHelperImpl(instr);
+        // Populate the recent apps screen
+        cameraHelper.open();
+        mDevice.pressHome();
+        chromeHelper.open();
+        mDevice.pressHome();
     }
 
     @Override