@VisibleForTesting public static RoundedIconGenerator createRoundedIconGenerator(Context appContext){
  Resources res=appContext.getResources();
  float density=res.getDisplayMetrics().density;
  int widthPx=res.getDimensionPixelSize(android.R.dimen.notification_large_icon_width);
  int heightPx=res.getDimensionPixelSize(android.R.dimen.notification_large_icon_height);
  return new RoundedIconGenerator(widthPx,heightPx,Math.min(widthPx,heightPx) / 2,NOTIFICATION_ICON_BG_COLOR,NOTIFICATION_TEXT_SIZE_DP * density);
}

@ VisibleForTesting public static RoundedIconGenerator createRoundedIconGenerator ( Context appContext ) { Resources res = appContext . getResources ( ) ; float density = res . getDisplayMetrics ( ) . density ; int widthPx = res . getDimensionPixelSize ( android . R . dimen . notification_large_icon_width ) ; int heightPx = res . getDimensionPixelSize ( android . R . dimen . notification_large_icon_height ) ; return new RoundedIconGenerator ( widthPx , heightPx , Math . min ( widthPx , heightPx ) / 2 , NOTIFICATION_ICON_BG_COLOR , NOTIFICATION_TEXT_SIZE_DP * density ) ; }
creates the rounded icon generator to use for notifications based on the dimensions and resolution of the device we ' re running on .
