From 6bd30ee1a252e41a3fcdcb1f11dc031da5895698 Mon Sep 17 00:00:00 2001 From: wsmlby Date: Wed, 1 Oct 2014 12:47:25 -0700 Subject: Throw error when no intent can be found bug: 17396762 Change-Id: I10502d5d1e2332d9e6820ee645234c125e937b7a --- .../src/com/android/compatibilitytest/AppCompatibility.java | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'tests/Compatibility/src/com') diff --git a/tests/Compatibility/src/com/android/compatibilitytest/AppCompatibility.java b/tests/Compatibility/src/com/android/compatibilitytest/AppCompatibility.java index 5794b2b..dd823ae 100644 --- a/tests/Compatibility/src/com/android/compatibilitytest/AppCompatibility.java +++ b/tests/Compatibility/src/com/android/compatibilitytest/AppCompatibility.java @@ -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); -- cgit v1.1