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

Commit 6bd30ee1 authored by wsmlby's avatar wsmlby Committed by Bingyan Liu
Browse files

Throw error when no intent can be found

bug: 17396762

Change-Id: I10502d5d1e2332d9e6820ee645234c125e937b7a
parent 9cf01b63
Loading
Loading
Loading
Loading
+2 −6
Original line number Diff line number Diff line
@@ -155,16 +155,12 @@ public class AppCompatibility extends InstrumentationTestCase {
        homeIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
        Intent intent;
        if (isleanback) {
            Log.d(TAG, "Leanback and relax!");
            Log.d(TAG, "Leanback and relax! " + packageName);
            intent = mPackageManager.getLeanbackLaunchIntentForPackage(packageName);
        } else {
            intent = mPackageManager.getLaunchIntentForPackage(packageName);
        }
        // Skip if the apk does not have a launch intent.
        if (intent == null) {
            Log.d(TAG, "Skipping " + packageName + "; missing launch intent");
            return null;
        }
        assertNotNull("Skipping " + packageName + "; missing launch intent", intent);

        String processName = getProcessName(packageName);