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

Commit cef8008b authored by vadimt's avatar vadimt
Browse files

Tracing launcher package name

I suspect that when the test starts, launcher package may be
com.google.android.setupwizard

Bug: 145935261
Change-Id: Ibf5e9785cd73762cbf2cdc8569482d77db782897
parent ced004fb
Loading
Loading
Loading
Loading
+6 −5
Original line number Diff line number Diff line
@@ -102,14 +102,15 @@ public class TestStabilityRule implements TestRule {

        final String launcherVersion;
        try {
            final String launcherPackageName = UiDevice.getInstance(getInstrumentation())
                    .getLauncherPackageName();
            Log.d(TAG, "Launcher package: " + launcherPackageName);

            launcherVersion = getInstrumentation().
                    getContext().
                    getPackageManager().
                    getPackageInfo(
                            UiDevice.getInstance(getInstrumentation()).
                                    getLauncherPackageName(),
                            0).
                    versionName;
                    getPackageInfo(launcherPackageName, 0)
                    .versionName;
        } catch (PackageManager.NameNotFoundException e) {
            throw new RuntimeException(e);
        }