/** called when user picks a new directory */
  @Override
  public void onDirectoryPick(String selectedAbsolutePath, int queryTypeId) {
    DirInfo dirInfo = getOrCreateDirInfo(queryTypeId);
    dirInfo.currentPath = selectedAbsolutePath;

    FotoSql.set(mFilter, selectedAbsolutePath, queryTypeId);
    toGui(mFilter);
  }
 private DirInfo getOrCreateDirInfo(int queryId) {
   DirInfo result = dirInfos.get(queryId);
   if (result == null) {
     result = new DirInfo();
     result.queryId = queryId;
     dirInfos.put(queryId, result);
   }
   return result;
 }
  private void onDirectoryDataLoadComplete(IDirectory directoryRoot, int queryId) {
    if (directoryRoot != null) {
      Global.debugMemory(mDebugPrefix, "onDirectoryDataLoadComplete");

      DirInfo dirInfo = getOrCreateDirInfo(queryId);
      dirInfo.directoryRoot = directoryRoot;
      final FragmentManager manager = getFragmentManager();
      DirectoryPickerFragment dirDialog = new DirectoryPickerFragment();
      dirDialog.setContextMenuId(R.menu.menu_context_dirpicker);

      dirDialog.defineDirectoryNavigation(
          dirInfo.directoryRoot, dirInfo.queryId, dirInfo.currentPath);

      dirDialog.show(manager, DLG_NAVIGATOR_TAG);
    }
  }