diff options
author | Maxim Siniavine <siniavine@google.com> | 2013-04-10 11:57:57 -0700 |
---|---|---|
committer | Maxim Siniavine <siniavine@google.com> | 2013-04-10 12:14:11 -0700 |
commit | 85478b59722837ed1bec447b2920f2f7111b57ea (patch) | |
tree | 9bd736f1eed08d6f5bebaf9fcefe9232c4c05965 /tests/Compatibility | |
parent | d9621f867027dedc47df50c8ff4bf6f67c188ea4 (diff) | |
download | frameworks_base-85478b59722837ed1bec447b2920f2f7111b57ea.zip frameworks_base-85478b59722837ed1bec447b2920f2f7111b57ea.tar.gz frameworks_base-85478b59722837ed1bec447b2920f2f7111b57ea.tar.bz2 |
Skip apps without launch intent.
If an app from the apk cannot be launched then skip it in compatibility
test, rather than generate a null pointer exception.
Change-Id: I252031f249bfe25282b10394889ab8c5506cabcf
Diffstat (limited to 'tests/Compatibility')
-rw-r--r-- | tests/Compatibility/src/com/android/compatibilitytest/AppCompatibility.java | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/Compatibility/src/com/android/compatibilitytest/AppCompatibility.java b/tests/Compatibility/src/com/android/compatibilitytest/AppCompatibility.java index 4d60c83..7ae0fb8 100644 --- a/tests/Compatibility/src/com/android/compatibilitytest/AppCompatibility.java +++ b/tests/Compatibility/src/com/android/compatibilitytest/AppCompatibility.java @@ -127,6 +127,10 @@ public class AppCompatibility extends InstrumentationTestCase { homeIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK); Intent intent = mPackageManager.getLaunchIntentForPackage(packageName); + // Skip if the apk does not have a launch intent. + if (intent == null) { + return null; + } // We check for any Crash or ANR dialogs that are already up, and we ignore them. This is // so that we don't report crashes that were caused by prior apps (which those particular |