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

Commit a00259f4 authored by gopinath's avatar gopinath
Browse files

App launch test apk change

Support launching the app using the package name.
Remove the unused variables.

b/33226470

Change-Id: I5b3829912782a9fc0c8f09cbd6fa9ee4b5b35314
parent 38039d87
Loading
Loading
Loading
Loading
+2 −3
Original line number Diff line number Diff line
@@ -111,7 +111,6 @@ public class AppLaunch extends InstrumentationTestCase {


    private Map<String, Intent> mNameToIntent;
    private Map<String, String> mNameToProcess;
    private List<LaunchOrder> mLaunchOrderList = new ArrayList<LaunchOrder>();
    private Map<String, String> mNameToResultKey;
    private Map<String, List<Long>> mNameToLaunchTime;
@@ -431,7 +430,6 @@ public class AppLaunch extends InstrumentationTestCase {

    private void createMappings() {
        mNameToIntent = new LinkedHashMap<String, Intent>();
        mNameToProcess = new LinkedHashMap<String, String>();

        PackageManager pm = getInstrumentation().getContext()
                .getPackageManager();
@@ -459,8 +457,9 @@ public class AppLaunch extends InstrumentationTestCase {
                        ri.activityInfo.name);
                String appName = ri.loadLabel(pm).toString();
                if (appName != null) {
                    // Support launching intent using package name or app name
                    mNameToIntent.put(ri.activityInfo.packageName, startIntent);
                    mNameToIntent.put(appName, startIntent);
                    mNameToProcess.put(appName, ri.activityInfo.processName);
                }
            }
        }