Esempio n. 1
0
 public static boolean isStorageOrSd(File fi) {
   if (fi == null) return false;
   else if (fi.getPluginPackage() != null)
     return File.isRootPluginFolder(fi.getUri(), ((PluginFileImpl) fi).getPlugin());
   return fi.isSDCardDirectory()
       || fi.isStorageDirectory()
       || (fi.isDocumentTreeFile() && fi.getParent() == null);
 }
Esempio n. 2
0
 public String getTitle(Context context) {
   if (mFile.getPluginPackage() != null) {
     if (PluginFileImpl.isRootPluginFolder(
         mFile.getUri(), ((PluginFileImpl) mFile).getPlugin())) {
       final String pluginAcc = mFile.getPluginAccount();
       if (pluginAcc != null) {
         final String accDisplay =
             PluginDataProvider.getAccountDisplay(context, mFile.getPluginPackage(), pluginAcc);
         if (accDisplay == null || accDisplay.trim().isEmpty()) return pluginAcc;
         return accDisplay;
       }
     }
   }
   String title = mFile.getDisplay(context);
   if (title == null) title = mFile.getName();
   else if (title.equals(context.getString(R.string.storage)))
     title = context.getString(R.string.internal_storage);
   return title;
 }