mirror of
https://github.com/commons-app/apps-android-commons.git
synced 2025-10-28 21:33:53 +01:00
parent
d9fa31242f
commit
480c05b2f3
18 changed files with 35 additions and 43 deletions
|
|
@ -152,7 +152,7 @@ public class FilePicker implements Constants {
|
|||
}
|
||||
|
||||
private static void storeType(@NonNull Context context, int type) {
|
||||
PreferenceManager.getDefaultSharedPreferences(context).edit().putInt(KEY_TYPE, type).commit();
|
||||
PreferenceManager.getDefaultSharedPreferences(context).edit().putInt(KEY_TYPE, type).apply();
|
||||
}
|
||||
|
||||
private static int restoreType(@NonNull Context context) {
|
||||
|
|
|
|||
|
|
@ -14,28 +14,28 @@ public class FilePickerConfiguration implements Constants {
|
|||
public FilePickerConfiguration setImagesFolderName(String folderName) {
|
||||
PreferenceManager.getDefaultSharedPreferences(context)
|
||||
.edit().putString(BundleKeys.FOLDER_NAME, folderName)
|
||||
.commit();
|
||||
.apply();
|
||||
return this;
|
||||
}
|
||||
|
||||
public FilePickerConfiguration setAllowMultiplePickInGallery(boolean allowMultiple) {
|
||||
PreferenceManager.getDefaultSharedPreferences(context).edit()
|
||||
.putBoolean(BundleKeys.ALLOW_MULTIPLE, allowMultiple)
|
||||
.commit();
|
||||
.apply();
|
||||
return this;
|
||||
}
|
||||
|
||||
public FilePickerConfiguration setCopyTakenPhotosToPublicGalleryAppFolder(boolean copy) {
|
||||
PreferenceManager.getDefaultSharedPreferences(context).edit()
|
||||
.putBoolean(BundleKeys.COPY_TAKEN_PHOTOS, copy)
|
||||
.commit();
|
||||
.apply();
|
||||
return this;
|
||||
}
|
||||
|
||||
public FilePickerConfiguration setCopyPickedImagesToPublicGalleryAppFolder(boolean copy) {
|
||||
PreferenceManager.getDefaultSharedPreferences(context).edit()
|
||||
.putBoolean(BundleKeys.COPY_PICKED_IMAGES, copy)
|
||||
.commit();
|
||||
.apply();
|
||||
return this;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -7,7 +7,6 @@ import android.net.Uri;
|
|||
import android.os.Environment;
|
||||
import android.support.annotation.NonNull;
|
||||
import android.support.v4.content.FileProvider;
|
||||
import android.util.Log;
|
||||
import android.webkit.MimeTypeMap;
|
||||
|
||||
import java.io.File;
|
||||
|
|
@ -22,6 +21,8 @@ import java.util.Calendar;
|
|||
import java.util.List;
|
||||
import java.util.UUID;
|
||||
|
||||
import timber.log.Timber;
|
||||
|
||||
|
||||
class PickedFiles implements Constants {
|
||||
|
||||
|
|
@ -101,8 +102,8 @@ class PickedFiles implements Constants {
|
|||
paths, null,
|
||||
new MediaScannerConnection.OnScanCompletedListener() {
|
||||
public void onScanCompleted(String path, Uri uri) {
|
||||
Log.d(getClass().getSimpleName(), "Scanned " + path + ":");
|
||||
Log.d(getClass().getSimpleName(), "-> uri=" + uri);
|
||||
Timber.d("Scanned " + path + ":");
|
||||
Timber.d("-> uri=%s", uri);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue