Ejemplo n.º 1
0
  private Bitmap loadDrawable(String fso) {
    final String filePath = (fso);

    try {
      if (Icons.isApk(filePath)) {
        return getAppDrawable(fso);
      } else if (Icons.isPicture(filePath)) {
        return loadImage(fso);
      } else if (Icons.isVideo(filePath)) return getVideoDrawable(fso);
    } catch (OutOfMemoryError outOfMemoryError) {
      cleanup();
      shutdownWorker();
    }

    return null;
  }