Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e5d3d7eb authored by Louis Chang's avatar Louis Chang
Browse files

Force stop app if it has failures during trial launch

Activities could be remained at foreground when it has failures
in trial launch, which affects testing results of other apps.

Bug: 149326995
Test: atest google/perf/app-startup/hermetic-apps/cold-dropcache-test
Change-Id: Id364461ff5a97384590d1dc7cfb59cc8cf4e88a6
parent 8869427b
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -296,6 +296,8 @@ public class AppLaunch extends InstrumentationTestCase {
                    AppLaunchResult launchResults = null;
                    if (hasFailureOnFirstLaunch(launch)) {
                        // skip if the app has failures while launched first
                        Log.w(TAG, "Has failures on first launch: " + launch.getApp());
                        forceStopApp(launch.getApp());
                        continue;
                    }
                    AtraceLogger atraceLogger = null;