private static String getDefaultSize(int varType, WindowManager windowManager) { switch (varType) { case STORE_ICONS_SIZE_TYPE: if (ScreenU.getDensityDpi(windowManager) < DisplayMetrics.DENSITY_HIGH) { return mStoreIconSizes.get(DisplayMetrics.DENSITY_LOW); } else { return mStoreIconSizes.get(DisplayMetrics.DENSITY_XXHIGH); } case ICONS_SIZE_TYPE: if (ScreenU.getDensityDpi(windowManager) < DisplayMetrics.DENSITY_HIGH) { return mIconSizes.get(DisplayMetrics.DENSITY_LOW); } else { return mIconSizes.get(DisplayMetrics.DENSITY_XXXHIGH); } } return null; }
private static String generateSizeStringScreenshotsdd(String orient, WindowManager windowManager, Resources resources) { float densityMultiplier = densityMultiplier(resources); int size; if (orient != null && orient.equals("portrait")) { size = baseLineScreenshotPort * ((int) densityMultiplier); } else { size = baseLineScreenshotLand * ((int) densityMultiplier); } return size + "x" + ScreenU.getDensityDpi(windowManager); }
private static String parseScreenshots(String orient, WindowManager windowManager) { if (orient == null) { return ""; } boolean isPortrait = orient != null && orient.equals("portrait"); int dpi = ScreenU.getDensityDpi(windowManager); String[] splittedUrl = splitUrlExtension(orient); return splittedUrl[0] + "_" + getThumbnailSize(dpi, isPortrait) + "." + splittedUrl[1]; }
private int computeDensityDpi() { return ScreenU.getDensityDpi(windowManager); }
private static String getUserAvatarIconSize(WindowManager windowManager) { if (ScreenU.getDensityDpi(windowManager) <= DisplayMetrics.DENSITY_HIGH) { return "50x50"; } else { return "150x150"; } }