private void exitApp(Context context) { Intent serviceIntent = new Intent(context, AutoUpdateService.class); context.stopService(serviceIntent); // 清除通知; NotificationManager notiManager = (NotificationManager) context.getSystemService(Context.NOTIFICATION_SERVICE); notiManager.cancelAll(); CacheManager.getInstance().clear(); GlobalVars.clear(); HttpRequestHelper.shutdown(); android.os.Process.killProcess(android.os.Process.myPid()); }
public ImageLoad4HeadTask(ImageView imageView, String url, boolean isMini) { this.imageView = imageView; this.url = url; this.isMini = isMini; imageCache = (ImageCache) CacheManager.getInstance().getCache(ImageCache.class.getName()); if (StringUtil.isNotEmpty(url)) { if (isMini) { imageInfo = new CachedImageKey(url, CachedImageKey.IMAGE_HEAD_MINI); } else { imageInfo = new CachedImageKey(url, CachedImageKey.IMAGE_HEAD_NORMAL); } if ((wrap = imageCache.get(imageInfo)) != null) { bitmap = wrap.getWrap(); isHit = true; } } }