src/main/java/de/blau/android/util/Util.java
/**
     * If aspects of the configuration have changed clear icon caches
     * 
     * Side effect updates stored Configuration
     * 
     * @param context Android Context
     * @param newConfig new Configuration
     */
If aspects of the configuration have changed clear icon caches

Side effect updates stored Configuration

@param context Android Context
@param newConfig new Configuration
If aspects of the configuration have changed clear icon caches Side effect updates stored Configuration @param context Android Context @param newConfig new Configuration
public static void clearCaches(@NonNull Context context, @NonNull Configuration newConfig) {
        Configuration oldConfig = App.getConfiguration();
        if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN_MR1) {
            if (oldConfig == null || oldConfig.densityDpi != newConfig.densityDpi || oldConfig.fontScale != newConfig.fontScale) {
                clearIconCaches(context);
                App.setConfiguration(newConfig);
            }
        }
    }
public static void clearCaches ( @ NonNull Context context , @ NonNull Configuration newConfig ) { Configuration oldConfig = App . getConfiguration ( ) ; if ( Build . VERSION . SDK_INT >= Build . VERSION_CODES . JELLY_BEAN_MR1 ) { if ( oldConfig == null || oldConfig . densityDpi != newConfig . densityDpi || oldConfig . fontScale != newConfig . fontScale ) { clearIconCaches ( context ) ; App . setConfiguration ( newConfig ) ; } } }
If aspects of the configuration have changed clear icon caches
If aspects of the configuration have changed clear icon caches
// if the density has changed the icons will have wrong dimension remove them