Search in sources :

Example 1 with HybridFileParcelable

use of com.amaze.filemanager.filesystem.HybridFileParcelable in project AmazeFileManager by TeamAmaze.

the class GeneralDialogCreation method deleteFilesDialog.

@SuppressWarnings("ConstantConditions")
public static void deleteFilesDialog(final Context c, final ArrayList<LayoutElementParcelable> layoutElements, final MainActivity mainActivity, final List<LayoutElementParcelable> positions, AppTheme appTheme) {
    final ArrayList<HybridFileParcelable> itemsToDelete = new ArrayList<>();
    int accentColor = mainActivity.getColorPreference().getColor(ColorUsage.ACCENT);
    // Build dialog with custom view layout and accent color.
    MaterialDialog dialog = new MaterialDialog.Builder(c).title(c.getString(R.string.dialog_delete_title)).customView(R.layout.dialog_delete, true).theme(appTheme.getMaterialDialogTheme()).negativeText(c.getString(R.string.cancel).toUpperCase()).positiveText(c.getString(R.string.delete).toUpperCase()).positiveColor(accentColor).negativeColor(accentColor).onPositive((dialog1, which) -> {
        Toast.makeText(c, c.getString(R.string.deleting), Toast.LENGTH_SHORT).show();
        mainActivity.mainActivityHelper.deleteFiles(itemsToDelete);
    }).build();
    // Get views from custom layout to set text values.
    final TextView categoryDirectories = (TextView) dialog.getCustomView().findViewById(R.id.category_directories);
    final TextView categoryFiles = (TextView) dialog.getCustomView().findViewById(R.id.category_files);
    final TextView listDirectories = (TextView) dialog.getCustomView().findViewById(R.id.list_directories);
    final TextView listFiles = (TextView) dialog.getCustomView().findViewById(R.id.list_files);
    final TextView total = (TextView) dialog.getCustomView().findViewById(R.id.total);
    // Parse items to delete.
    new AsyncTask<Void, Object, Void>() {

        long sizeTotal = 0;

        StringBuilder files = new StringBuilder();

        StringBuilder directories = new StringBuilder();

        int counterDirectories = 0;

        int counterFiles = 0;

        @Override
        protected void onPreExecute() {
            super.onPreExecute();
            listFiles.setText(c.getString(R.string.loading));
            listDirectories.setText(c.getString(R.string.loading));
            total.setText(c.getString(R.string.loading));
        }

        @Override
        protected Void doInBackground(Void... params) {
            for (int i = 0; i < positions.size(); i++) {
                final LayoutElementParcelable layoutElement = positions.get(i);
                itemsToDelete.add(layoutElement.generateBaseFile());
                // Build list of directories to delete.
                if (layoutElement.isDirectory) {
                    // Don't add newline between category and list.
                    if (counterDirectories != 0) {
                        directories.append("\n");
                    }
                    long sizeDirectory = layoutElement.generateBaseFile().folderSize(c);
                    directories.append(++counterDirectories).append(". ").append(layoutElement.title).append(" (").append(Formatter.formatFileSize(c, sizeDirectory)).append(")");
                    sizeTotal += sizeDirectory;
                // Build list of files to delete.
                } else {
                    // Don't add newline between category and list.
                    if (counterFiles != 0) {
                        files.append("\n");
                    }
                    files.append(++counterFiles).append(". ").append(layoutElement.title).append(" (").append(layoutElement.size).append(")");
                    sizeTotal += layoutElement.longSize;
                }
                publishProgress(sizeTotal, counterFiles, counterDirectories, files, directories);
            }
            return null;
        }

        @Override
        protected void onProgressUpdate(Object... result) {
            super.onProgressUpdate(result);
            int tempCounterFiles = (int) result[1];
            int tempCounterDirectories = (int) result[2];
            long tempSizeTotal = (long) result[0];
            StringBuilder tempFilesStringBuilder = (StringBuilder) result[3];
            StringBuilder tempDirectoriesStringBuilder = (StringBuilder) result[4];
            updateViews(tempSizeTotal, tempFilesStringBuilder, tempDirectoriesStringBuilder, tempCounterFiles, tempCounterDirectories);
        }

        @Override
        protected void onPostExecute(Void aVoid) {
            super.onPostExecute(aVoid);
            updateViews(sizeTotal, files, directories, counterFiles, counterDirectories);
        }

        private void updateViews(long tempSizeTotal, StringBuilder filesStringBuilder, StringBuilder directoriesStringBuilder, int... values) {
            int tempCounterFiles = values[0];
            int tempCounterDirectories = values[1];
            // Hide category and list for directories when zero.
            if (tempCounterDirectories == 0) {
                if (tempCounterDirectories == 0) {
                    categoryDirectories.setVisibility(View.GONE);
                    listDirectories.setVisibility(View.GONE);
                }
            // Hide category and list for files when zero.
            }
            if (tempCounterFiles == 0) {
                categoryFiles.setVisibility(View.GONE);
                listFiles.setVisibility(View.GONE);
            }
            if (tempCounterDirectories != 0 || tempCounterFiles != 0) {
                listDirectories.setText(directoriesStringBuilder);
                if (listDirectories.getVisibility() != View.VISIBLE && tempCounterDirectories != 0)
                    listDirectories.setVisibility(View.VISIBLE);
                listFiles.setText(filesStringBuilder);
                if (listFiles.getVisibility() != View.VISIBLE && tempCounterFiles != 0)
                    listFiles.setVisibility(View.VISIBLE);
                if (categoryDirectories.getVisibility() != View.VISIBLE && tempCounterDirectories != 0)
                    categoryDirectories.setVisibility(View.VISIBLE);
                if (categoryFiles.getVisibility() != View.VISIBLE && tempCounterFiles != 0)
                    categoryFiles.setVisibility(View.VISIBLE);
            }
            // Show total size with at least one directory or file and size is not zero.
            if (tempCounterFiles + tempCounterDirectories > 1 && tempSizeTotal > 0) {
                StringBuilder builderTotal = new StringBuilder().append(c.getString(R.string.total)).append(" ").append(Formatter.formatFileSize(c, tempSizeTotal));
                total.setText(builderTotal);
                if (total.getVisibility() != View.VISIBLE)
                    total.setVisibility(View.VISIBLE);
            } else {
                total.setVisibility(View.GONE);
            }
        }
    }.execute();
    // Set category text color for Jelly Bean (API 16) and later.
    if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN) {
        categoryDirectories.setTextColor(accentColor);
        categoryFiles.setTextColor(accentColor);
    }
    // Show dialog on screen.
    dialog.show();
}
Also used : LinearLayout(android.widget.LinearLayout) PreferencesConstants(com.amaze.filemanager.fragments.preference_fragments.PreferencesConstants) ColorUsage(com.amaze.filemanager.utils.color.ColorUsage) ShellNotRunningException(com.amaze.filemanager.exceptions.ShellNotRunningException) Uri(android.net.Uri) WindowManager(android.view.WindowManager) TextInputLayout(android.support.design.widget.TextInputLayout) ThemedActivity(com.amaze.filemanager.activities.superclasses.ThemedActivity) AppTheme(com.amaze.filemanager.utils.theme.AppTheme) CompressedHelper(com.amaze.filemanager.filesystem.compressed.CompressedHelper) RootHelper(com.amaze.filemanager.filesystem.RootHelper) GeneralSecurityException(java.security.GeneralSecurityException) CheckBox(android.widget.CheckBox) View(android.view.View) Button(android.widget.Button) RootUtils(com.amaze.filemanager.utils.RootUtils) PreferenceManager(android.preference.PreferenceManager) PieChart(com.github.mikephil.charting.charts.PieChart) PieData(com.github.mikephil.charting.data.PieData) LoadFolderSpaceDataTask(com.amaze.filemanager.asynchronous.asynctasks.LoadFolderSpaceDataTask) LayoutElementParcelable(com.amaze.filemanager.adapters.data.LayoutElementParcelable) M(android.os.Build.VERSION_CODES.M) AsyncTask(android.os.AsyncTask) Entry(com.github.mikephil.charting.data.Entry) InputType(android.text.InputType) FingerprintManager(android.hardware.fingerprint.FingerprintManager) Executors(java.util.concurrent.Executors) CryptUtil(com.amaze.filemanager.utils.files.CryptUtil) List(java.util.List) TextView(android.widget.TextView) HiddenAdapter(com.amaze.filemanager.adapters.HiddenAdapter) R(com.amaze.filemanager.R) MaterialDialog(com.afollestad.materialdialogs.MaterialDialog) CountItemsOrAndSizeTask(com.amaze.filemanager.asynchronous.asynctasks.CountItemsOrAndSizeTask) AppCompatEditText(android.support.v7.widget.AppCompatEditText) SimpleTextWatcher(com.amaze.filemanager.utils.SimpleTextWatcher) Legend(com.github.mikephil.charting.components.Legend) Typeface(android.graphics.Typeface) Context(android.content.Context) IValueFormatter(com.github.mikephil.charting.formatter.IValueFormatter) HybridFile(com.amaze.filemanager.filesystem.HybridFile) MainFragment(com.amaze.filemanager.fragments.MainFragment) FingerprintHandler(com.amaze.filemanager.utils.FingerprintHandler) Intent(android.content.Intent) RequiresApi(android.support.annotation.RequiresApi) FileUtils.toHybridFileArrayList(com.amaze.filemanager.utils.files.FileUtils.toHybridFileArrayList) AppsListFragment(com.amaze.filemanager.fragments.AppsListFragment) Editable(android.text.Editable) InputMethodManager(android.view.inputmethod.InputMethodManager) MainActivity(com.amaze.filemanager.activities.MainActivity) ArrayList(java.util.ArrayList) AppCompatButton(android.support.v7.widget.AppCompatButton) HybridFileParcelable(com.amaze.filemanager.filesystem.HybridFileParcelable) PieDataSet(com.github.mikephil.charting.data.PieDataSet) Toast(android.widget.Toast) DataUtils(com.amaze.filemanager.utils.DataUtils) Build(android.os.Build) WeakReference(java.lang.ref.WeakReference) ExecutorService(java.util.concurrent.ExecutorService) Formatter(android.text.format.Formatter) GenerateHashesTask(com.amaze.filemanager.asynchronous.asynctasks.GenerateHashesTask) SpannableString(android.text.SpannableString) TextUtils(android.text.TextUtils) DialogAction(com.afollestad.materialdialogs.DialogAction) IOException(java.io.IOException) File(java.io.File) Theme(com.afollestad.materialdialogs.Theme) EncryptDecryptUtils(com.amaze.filemanager.utils.files.EncryptDecryptUtils) Color(android.graphics.Color) Utils(com.amaze.filemanager.utils.Utils) SharedPreferences(android.content.SharedPreferences) BasicActivity(com.amaze.filemanager.activities.superclasses.BasicActivity) ViewPortHandler(com.github.mikephil.charting.utils.ViewPortHandler) FileUtils(com.amaze.filemanager.utils.files.FileUtils) DialogUtils(com.afollestad.materialdialogs.util.DialogUtils) TextInputEditText(android.support.design.widget.TextInputEditText) PieEntry(com.github.mikephil.charting.data.PieEntry) OpenMode(com.amaze.filemanager.utils.OpenMode) EditText(android.widget.EditText) MaterialDialog(com.afollestad.materialdialogs.MaterialDialog) FileUtils.toHybridFileArrayList(com.amaze.filemanager.utils.files.FileUtils.toHybridFileArrayList) ArrayList(java.util.ArrayList) LayoutElementParcelable(com.amaze.filemanager.adapters.data.LayoutElementParcelable) HybridFileParcelable(com.amaze.filemanager.filesystem.HybridFileParcelable) TextView(android.widget.TextView)

Example 2 with HybridFileParcelable

use of com.amaze.filemanager.filesystem.HybridFileParcelable in project AmazeFileManager by TeamAmaze.

the class OTGUtil method getDocumentFiles.

/**
 * Get the files at a specific path in OTG
 *
 * @param path    the path to the directory tree, starts with prefix 'otg:/'
 *                Independent of URI (or mount point) for the OTG
 * @param context context for loading
 * @return an array of list of files at the path
 */
public static void getDocumentFiles(String path, Context context, OnFileFound fileFound) {
    SharedPreferences manager = PreferenceManager.getDefaultSharedPreferences(context);
    String rootUriString = manager.getString(MainActivity.KEY_PREF_OTG, null);
    DocumentFile rootUri = DocumentFile.fromTreeUri(context, Uri.parse(rootUriString));
    String[] parts = path.split("/");
    for (String part : parts) {
        // first omit 'otg:/' before iterating through DocumentFile
        if (path.equals(OTGUtil.PREFIX_OTG + "/"))
            break;
        if (part.equals("otg:") || part.equals(""))
            continue;
        // iterating through the required path to find the end point
        rootUri = rootUri.findFile(part);
    }
    // we have the end point DocumentFile, list the files inside it and return
    for (DocumentFile file : rootUri.listFiles()) {
        if (file.exists()) {
            long size = 0;
            if (!file.isDirectory())
                size = file.length();
            Log.d(context.getClass().getSimpleName(), "Found file: " + file.getName());
            HybridFileParcelable baseFile = new HybridFileParcelable(path + "/" + file.getName(), RootHelper.parseDocumentFilePermission(file), file.lastModified(), size, file.isDirectory());
            baseFile.setName(file.getName());
            baseFile.setMode(OpenMode.OTG);
            fileFound.onFileFound(baseFile);
        }
    }
}
Also used : HybridFileParcelable(com.amaze.filemanager.filesystem.HybridFileParcelable) DocumentFile(android.support.v4.provider.DocumentFile) SharedPreferences(android.content.SharedPreferences)

Example 3 with HybridFileParcelable

use of com.amaze.filemanager.filesystem.HybridFileParcelable in project AmazeFileManager by TeamAmaze.

the class CloudUtil method getCloudFiles.

public static void getCloudFiles(String path, CloudStorage cloudStorage, OpenMode openMode, OnFileFound fileFoundCallback) throws CloudPluginException {
    String strippedPath = stripPath(openMode, path);
    try {
        for (CloudMetaData cloudMetaData : cloudStorage.getChildren(strippedPath)) {
            HybridFileParcelable baseFile = new HybridFileParcelable(path + "/" + cloudMetaData.getName(), "", (cloudMetaData.getModifiedAt() == null) ? 0l : cloudMetaData.getModifiedAt(), cloudMetaData.getSize(), cloudMetaData.getFolder());
            baseFile.setName(cloudMetaData.getName());
            baseFile.setMode(openMode);
            fileFoundCallback.onFileFound(baseFile);
        }
    } catch (Exception e) {
        e.printStackTrace();
        throw new CloudPluginException();
    }
}
Also used : HybridFileParcelable(com.amaze.filemanager.filesystem.HybridFileParcelable) CloudPluginException(com.amaze.filemanager.exceptions.CloudPluginException) CloudPluginException(com.amaze.filemanager.exceptions.CloudPluginException) ActivityNotFoundException(android.content.ActivityNotFoundException) CloudMetaData(com.cloudrail.si.types.CloudMetaData)

Example 4 with HybridFileParcelable

use of com.amaze.filemanager.filesystem.HybridFileParcelable in project AmazeFileManager by TeamAmaze.

the class MainActivity method onOptionsItemSelected.

// called when the user exits the action mode
@Override
public boolean onOptionsItemSelected(MenuItem item) {
    // ActionBarDrawerToggle will take care of this.
    if (drawer.onOptionsItemSelected(item))
        return true;
    // Handle action buttons
    MainFragment ma = getCurrentMainFragment();
    switch(item.getItemId()) {
        case R.id.home:
            if (ma != null)
                ma.home();
            break;
        case R.id.history:
            if (ma != null)
                GeneralDialogCreation.showHistoryDialog(dataUtils, getPrefs(), ma, getAppTheme());
            break;
        case R.id.sethome:
            if (ma == null)
                return super.onOptionsItemSelected(item);
            final MainFragment main = ma;
            if (main.openMode != OpenMode.FILE && main.openMode != OpenMode.ROOT) {
                Toast.makeText(mainActivity, R.string.not_allowed, Toast.LENGTH_SHORT).show();
                break;
            }
            final MaterialDialog dialog = GeneralDialogCreation.showBasicDialog(mainActivity, new String[] { getResources().getString(R.string.questionset), getResources().getString(R.string.setashome), getResources().getString(R.string.yes), getResources().getString(R.string.no), null });
            dialog.getActionButton(DialogAction.POSITIVE).setOnClickListener((v) -> {
                main.home = main.getCurrentPath();
                updatePaths(main.no);
                dialog.dismiss();
            });
            dialog.show();
            break;
        case R.id.exit:
            finish();
            break;
        case R.id.sort:
            Fragment fragment = getFragmentAtFrame();
            if (fragment instanceof AppsListFragment) {
                GeneralDialogCreation.showSortDialog((AppsListFragment) fragment, getAppTheme());
            }
            break;
        case R.id.sortby:
            if (ma != null)
                GeneralDialogCreation.showSortDialog(ma, getAppTheme(), getPrefs());
            break;
        case R.id.dsort:
            if (ma == null)
                return super.onOptionsItemSelected(item);
            String[] sort = getResources().getStringArray(R.array.directorysortmode);
            MaterialDialog.Builder builder = new MaterialDialog.Builder(mainActivity);
            builder.theme(getAppTheme().getMaterialDialogTheme());
            builder.title(R.string.directorysort);
            int current = Integer.parseInt(getPrefs().getString(PreferencesConstants.PREFERENCE_DIRECTORY_SORT_MODE, "0"));
            final MainFragment mainFrag = ma;
            builder.items(sort).itemsCallbackSingleChoice(current, (dialog1, view, which, text) -> {
                getPrefs().edit().putString(PreferencesConstants.PREFERENCE_DIRECTORY_SORT_MODE, "" + which).commit();
                mainFrag.getSortModes();
                mainFrag.updateList();
                dialog1.dismiss();
                return true;
            });
            builder.build().show();
            break;
        case R.id.hiddenitems:
            GeneralDialogCreation.showHiddenDialog(dataUtils, getPrefs(), ma, getAppTheme());
            break;
        case R.id.view:
            final MainFragment mainFragment = ma;
            int pathLayout = dataUtils.getListOrGridForPath(ma.getCurrentPath(), DataUtils.LIST);
            if (ma.IS_LIST) {
                if (pathLayout == DataUtils.LIST) {
                    AppConfig.runInBackground(() -> {
                        utilsHandler.removeListViewPath(mainFragment.getCurrentPath());
                    });
                }
                AppConfig.runInBackground(() -> {
                    utilsHandler.addGridView(mainFragment.getCurrentPath());
                });
                dataUtils.setPathAsGridOrList(ma.getCurrentPath(), DataUtils.GRID);
            } else {
                if (pathLayout == DataUtils.GRID) {
                    AppConfig.runInBackground(() -> {
                        utilsHandler.removeGridViewPath(mainFragment.getCurrentPath());
                    });
                }
                AppConfig.runInBackground(() -> {
                    utilsHandler.addListView(mainFragment.getCurrentPath());
                });
                dataUtils.setPathAsGridOrList(ma.getCurrentPath(), DataUtils.LIST);
            }
            ma.switchView();
            break;
        case R.id.paste:
            String path = ma.getCurrentPath();
            ArrayList<HybridFileParcelable> arrayList = new ArrayList<>(Arrays.asList(pasteHelper.paths));
            boolean move = pasteHelper.operation == PasteHelper.OPERATION_CUT;
            new PrepareCopyTask(ma, path, move, mainActivity, isRootExplorer()).executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR, arrayList);
            pasteHelper = null;
            invalidatePasteButton(item);
            break;
        case R.id.extract:
            Fragment fragment1 = getFragmentAtFrame();
            if (fragment1 instanceof CompressedExplorerFragment) {
                mainActivityHelper.extractFile(((CompressedExplorerFragment) fragment1).compressedFile);
            }
            break;
        case R.id.search:
            getAppbar().getSearchView().revealSearchView();
            break;
    }
    return super.onOptionsItemSelected(item);
}
Also used : MaterialDialog(com.afollestad.materialdialogs.MaterialDialog) ArrayList(java.util.ArrayList) Fragment(android.support.v4.app.Fragment) FTPServerFragment(com.amaze.filemanager.fragments.FTPServerFragment) CompressedExplorerFragment(com.amaze.filemanager.fragments.CompressedExplorerFragment) AppsListFragment(com.amaze.filemanager.fragments.AppsListFragment) ProcessViewerFragment(com.amaze.filemanager.fragments.ProcessViewerFragment) TabFragment(com.amaze.filemanager.fragments.TabFragment) MainFragment(com.amaze.filemanager.fragments.MainFragment) SearchWorkerFragment(com.amaze.filemanager.fragments.SearchWorkerFragment) CloudSheetFragment(com.amaze.filemanager.fragments.CloudSheetFragment) PrepareCopyTask(com.amaze.filemanager.asynchronous.asynctasks.PrepareCopyTask) HybridFileParcelable(com.amaze.filemanager.filesystem.HybridFileParcelable) MainFragment(com.amaze.filemanager.fragments.MainFragment) AppsListFragment(com.amaze.filemanager.fragments.AppsListFragment) CompressedExplorerFragment(com.amaze.filemanager.fragments.CompressedExplorerFragment)

Example 5 with HybridFileParcelable

use of com.amaze.filemanager.filesystem.HybridFileParcelable in project AmazeFileManager by TeamAmaze.

the class WriteFileAbstraction method doInBackground.

@Override
protected Integer doInBackground(Void... voids) {
    try {
        OutputStream outputStream;
        switch(fileAbstraction.scheme) {
            case EditableFileAbstraction.SCHEME_CONTENT:
                if (fileAbstraction.uri == null)
                    throw new NullPointerException("Something went really wrong!");
                try {
                    outputStream = contentResolver.openOutputStream(fileAbstraction.uri);
                } catch (RuntimeException e) {
                    throw new StreamNotFoundException(e);
                }
                break;
            case EditableFileAbstraction.SCHEME_FILE:
                final HybridFileParcelable hybridFileParcelable = fileAbstraction.hybridFileParcelable;
                if (hybridFileParcelable == null)
                    throw new NullPointerException("Something went really wrong!");
                Context context = this.context.get();
                if (context == null) {
                    cancel(true);
                    return null;
                }
                outputStream = FileUtil.getOutputStream(hybridFileParcelable.getFile(), context);
                if (isRootExplorer && outputStream == null) {
                    // try loading stream associated using root
                    try {
                        if (cachedFile != null && cachedFile.exists()) {
                            outputStream = new FileOutputStream(cachedFile);
                        }
                    } catch (FileNotFoundException e) {
                        e.printStackTrace();
                        outputStream = null;
                    }
                }
                break;
            default:
                throw new IllegalArgumentException("The scheme for '" + fileAbstraction.scheme + "' cannot be processed!");
        }
        if (outputStream == null)
            throw new StreamNotFoundException();
        outputStream.write(dataToSave.getBytes());
        outputStream.close();
        if (cachedFile != null && cachedFile.exists()) {
            // cat cache content to original file and delete cache file
            RootUtils.cat(cachedFile.getPath(), fileAbstraction.hybridFileParcelable.getPath());
            cachedFile.delete();
        }
    } catch (IOException e) {
        e.printStackTrace();
        return EXCEPTION_IO;
    } catch (StreamNotFoundException e) {
        e.printStackTrace();
        return EXCEPTION_STREAM_NOT_FOUND;
    } catch (ShellNotRunningException e) {
        e.printStackTrace();
        return EXCEPTION_SHELL_NOT_RUNNING;
    }
    return NORMAL;
}
Also used : HybridFileParcelable(com.amaze.filemanager.filesystem.HybridFileParcelable) Context(android.content.Context) ShellNotRunningException(com.amaze.filemanager.exceptions.ShellNotRunningException) OutputStream(java.io.OutputStream) FileOutputStream(java.io.FileOutputStream) FileOutputStream(java.io.FileOutputStream) FileNotFoundException(java.io.FileNotFoundException) StreamNotFoundException(com.amaze.filemanager.exceptions.StreamNotFoundException) IOException(java.io.IOException)

Aggregations

HybridFileParcelable (com.amaze.filemanager.filesystem.HybridFileParcelable)35 File (java.io.File)19 ArrayList (java.util.ArrayList)16 HybridFile (com.amaze.filemanager.filesystem.HybridFile)15 LayoutElementParcelable (com.amaze.filemanager.adapters.data.LayoutElementParcelable)11 SmbFile (jcifs.smb.SmbFile)11 Intent (android.content.Intent)8 Cursor (android.database.Cursor)7 ShellNotRunningException (com.amaze.filemanager.exceptions.ShellNotRunningException)7 MaterialDialog (com.afollestad.materialdialogs.MaterialDialog)6 SharedPreferences (android.content.SharedPreferences)5 DataUtils (com.amaze.filemanager.utils.DataUtils)5 Context (android.content.Context)4 AppsListFragment (com.amaze.filemanager.fragments.AppsListFragment)4 MainFragment (com.amaze.filemanager.fragments.MainFragment)4 OnFileFound (com.amaze.filemanager.utils.OnFileFound)4 Uri (android.net.Uri)3 AsyncTask (android.os.AsyncTask)3 Build (android.os.Build)3 TextUtils (android.text.TextUtils)3