Code example for ActivityManager

Methods: getMemoryClass

0
 
        public ImageCacheParamsPostEclair(Context context, String uniqueName) {
            this.uniqueName = uniqueName;
            final ActivityManager activityManager = (ActivityManager) context
                    .getSystemService(Activity.ACTIVITY_SERVICE);
            memoryClass = activityManager.getMemoryClass();
            memCacheSize = memoryClass / DEFAULT_MEM_CACHE_DIVIDER * 1024 * 1024;
        } 
    } 
 
    /** 
     * Android 1.6 以前向け 
     */ 
    public static class ImageCacheParamsPreEclair extends ImageCacheParams { 
 
        public ImageCacheParamsPreEclair(String uniqueName) {
            this.uniqueName = uniqueName;
        } 
 
        public ImageCacheParamsPreEclair(Context context, String uniqueName) {
            this.uniqueName = uniqueName;