62
62
import de .k3b .android .androFotoFinder .ThumbNailUtils ;
63
63
import de .k3b .android .androFotoFinder .backup .BackupActivity ;
64
64
import de .k3b .android .androFotoFinder .imagedetail .ImageDetailMetaDialogBuilder ;
65
- import de .k3b .android .androFotoFinder .queries .ContentProviderMediaExecuter ;
66
65
import de .k3b .android .androFotoFinder .queries .FotoSql ;
67
66
import de .k3b .android .androFotoFinder .queries .FotoThumbSql ;
68
67
import de .k3b .android .androFotoFinder .queries .FotoViewerParameter ;
@@ -545,7 +544,7 @@ private void onDeleteAnswer(File file, IDirectory dir) {
545
544
}
546
545
547
546
// delete from database
548
- if (FotoSql .deleteMedia ("delete album" , getActivity (),
547
+ if (FotoSql .deleteMedia ("delete album" ,
549
548
ListUtils .toStringList (file .getAbsolutePath ()),false ) > 0 ) {
550
549
deleteSuccess = true ;
551
550
}
@@ -664,11 +663,11 @@ private boolean fixLinks(IDirectory linkDir) {
664
663
if (!canonicalPath .endsWith ("/" )) canonicalPath +="/" ;
665
664
666
665
String sqlWhereLink = FotoSql .SQL_COL_PATH + " like '" + linkPath + "%'" ;
667
- SelectedFiles linkFiles = FotoSql .getSelectedfiles (context , sqlWhereLink , VISIBILITY .PRIVATE_PUBLIC );
666
+ SelectedFiles linkFiles = FotoSql .getSelectedfiles (sqlWhereLink , VISIBILITY .PRIVATE_PUBLIC );
668
667
669
668
String sqlWhereCanonical = FotoSql .SQL_COL_PATH + " in (" + linkFiles .toString () + ")" ;
670
669
sqlWhereCanonical = sqlWhereCanonical .replace (linkPath ,canonicalPath );
671
- SelectedFiles canonicalFiles = FotoSql .getSelectedfiles (context , sqlWhereCanonical , VISIBILITY .PRIVATE_PUBLIC );
670
+ SelectedFiles canonicalFiles = FotoSql .getSelectedfiles (sqlWhereCanonical , VISIBILITY .PRIVATE_PUBLIC );
672
671
HashMap <String , String > link2canonical = new HashMap <String , String >();
673
672
for (String cann : canonicalFiles .getFileNames ()) {
674
673
link2canonical .put (linkPath + cann .substring (canonicalPath .length ()), cann );
@@ -693,9 +692,9 @@ private boolean fixLinks(IDirectory linkDir) {
693
692
if (cann == null ) {
694
693
// rename linkFile to canonicalFile
695
694
updateValues .put (FotoSql .SQL_COL_PATH , canonicalPath + lin .substring (linkPath .length ()));
696
- ContentProviderMediaExecuter . execUpdate ("fixLinks" , context , linkIds [i ].intValue (), updateValues );
695
+ FotoSql . getMediaDBApi (). execUpdate ("fixLinks" , linkIds [i ].intValue (), updateValues );
697
696
} else {
698
- ContentProviderMediaExecuter . deleteMedia ("DirectoryPickerFragment.fixLinks" , context , FotoSql .FILTER_COL_PK , new String []{linkIds [i ].toString ()}, true );
697
+ FotoSql . getMediaDBApi (). deleteMedia ("DirectoryPickerFragment.fixLinks" , FotoSql .FILTER_COL_PK , new String []{linkIds [i ].toString ()}, true );
699
698
}
700
699
}
701
700
PhotoPropertiesMediaFilesScanner .notifyChanges (context , "Fixed link/canonical duplicates" );
0 commit comments