@Test public void displayWarningForMissingActivities_withOneMissingActivity_shouldLogOnlyThatOne() throws Exception { Robolectric.packageManager.addResolveInfoForIntent(new Intent(context, MoPubActivity.class), mockResolveInfo); Robolectric.packageManager.addResolveInfoForIntent(new Intent(context, MraidActivity.class), mockResolveInfo); Robolectric.packageManager.addResolveInfoForIntent(new Intent(context, MraidVideoPlayerActivity.class), mockResolveInfo); ShadowLog.setupLogging(); ManifestUtils.displayWarningForMissingActivities(context, requiredWebViewSdkActivities); assertLogIncludes("com.mopub.common.MoPubBrowser"); assertLogDoesntInclude( "com.mopub.mobileads.MoPubActivity", "com.mopub.mobileads.MraidActivity", "com.mopub.mobileads.MraidVideoPlayerActivity" ); }
@VisibleForTesting static void displayWarningForMissingActivities(@NonNull final Context context, @NonNull final List<Class<? extends Activity>> requiredActivities) { final List<Class<? extends Activity>> undeclaredActivities = filterDeclaredActivities(context, requiredActivities, false); if (undeclaredActivities.isEmpty()) { return; } logWarningToast(context); logMissingActivities(undeclaredActivities); }
ManifestUtils { @VisibleForTesting static void displayWarningForMissingActivities(@NonNull final Context context, @NonNull final List<Class<? extends Activity>> requiredActivities) { final List<Class<? extends Activity>> undeclaredActivities = filterDeclaredActivities(context, requiredActivities, false); if (undeclaredActivities.isEmpty()) { return; } logWarningToast(context); logMissingActivities(undeclaredActivities); } }
ManifestUtils { @VisibleForTesting static void displayWarningForMissingActivities(@NonNull final Context context, @NonNull final List<Class<? extends Activity>> requiredActivities) { final List<Class<? extends Activity>> undeclaredActivities = filterDeclaredActivities(context, requiredActivities, false); if (undeclaredActivities.isEmpty()) { return; } logWarningToast(context); logMissingActivities(undeclaredActivities); } private  ManifestUtils(); }
ManifestUtils { @VisibleForTesting static void displayWarningForMissingActivities(@NonNull final Context context, @NonNull final List<Class<? extends Activity>> requiredActivities) { final List<Class<? extends Activity>> undeclaredActivities = filterDeclaredActivities(context, requiredActivities, false); if (undeclaredActivities.isEmpty()) { return; } logWarningToast(context); logMissingActivities(undeclaredActivities); } private  ManifestUtils(); static void checkWebViewActivitiesDeclared(@NonNull final Context context); static void checkNativeActivitiesDeclared(@NonNull final Context context); static boolean isDebuggable(@NonNull final Context context); }
ManifestUtils { @VisibleForTesting static void displayWarningForMissingActivities(@NonNull final Context context, @NonNull final List<Class<? extends Activity>> requiredActivities) { final List<Class<? extends Activity>> undeclaredActivities = filterDeclaredActivities(context, requiredActivities, false); if (undeclaredActivities.isEmpty()) { return; } logWarningToast(context); logMissingActivities(undeclaredActivities); } private  ManifestUtils(); static void checkWebViewActivitiesDeclared(@NonNull final Context context); static void checkNativeActivitiesDeclared(@NonNull final Context context); static boolean isDebuggable(@NonNull final Context context);  }