Search in sources :

Example 1 with Build

use of android.os.Build in project acra by ACRA.

the class ReflectionCollector method collect.

@NonNull
@Override
Element collect(ReportField reportField, ReportBuilder reportBuilder) {
    ComplexElement result = new ComplexElement();
    try {
        switch(reportField) {
            case BUILD:
                collectConstants(Build.class, result);
                JSONObject version = new JSONObject();
                collectConstants(Build.VERSION.class, version);
                result.put("VERSION", version);
                break;
            case BUILD_CONFIG:
                try {
                    collectConstants(getBuildConfigClass(), result);
                } catch (ClassNotFoundException e) {
                //already logged in getBuildConfigClass
                }
                break;
            case ENVIRONMENT:
                collectStaticGettersResults(Environment.class, result);
                break;
            default:
                //will not happen if used correctly
                throw new IllegalArgumentException();
        }
    } catch (JSONException e) {
        ACRA.log.w("Couldn't collect constants", e);
        return ACRAConstants.NOT_AVAILABLE;
    }
    return result;
}
Also used : JSONObject(org.json.JSONObject) Build(android.os.Build) JSONException(org.json.JSONException) ComplexElement(org.acra.model.ComplexElement) NonNull(android.support.annotation.NonNull)

Example 2 with Build

use of android.os.Build in project mobile-center-sdk-android by Microsoft.

the class DistributeDownloadTest method notifyThenRestartAppTwice.

@Test
@PrepareForTest(Uri.class)
@SuppressWarnings("deprecation")
@TargetApi(Build.VERSION_CODES.JELLY_BEAN)
public void notifyThenRestartAppTwice() throws Exception {
    /* Simulate async task. */
    waitDownloadTask();
    /* Process fake download completion, should not interfere and will be ignored. */
    {
        Intent completionIntent = mock(Intent.class);
        when(completionIntent.getAction()).thenReturn(DownloadManager.ACTION_DOWNLOAD_COMPLETE);
        when(completionIntent.getLongExtra(eq(EXTRA_DOWNLOAD_ID), anyLong())).thenReturn(404L);
        new DownloadManagerReceiver().onReceive(mContext, completionIntent);
        waitCheckDownloadTask();
        verify(mDownloadManager, never()).query(any(DownloadManager.Query.class));
    }
    /* Process download completion with the real download identifier. */
    completeDownload();
    Cursor cursor = mockSuccessCursor();
    Intent installIntent = mockInstallIntent();
    /* In background. */
    Distribute.getInstance().onActivityPaused(mActivity);
    /* Mock notification. */
    when(mPackageManager.getApplicationInfo(mContext.getPackageName(), 0)).thenReturn(mock(ApplicationInfo.class));
    TestUtils.setInternalState(Build.VERSION.class, "SDK_INT", Build.VERSION_CODES.JELLY_BEAN);
    Notification.Builder notificationBuilder = mockNotificationBuilderChain();
    when(notificationBuilder.build()).thenReturn(mock(Notification.class));
    /* Simulate task. */
    waitCheckDownloadTask();
    /* Verify notification. */
    verify(mContext, never()).startActivity(installIntent);
    verifyStatic();
    PreferencesStorage.putInt(PREFERENCE_KEY_DOWNLOAD_STATE, DOWNLOAD_STATE_NOTIFIED);
    verify(notificationBuilder).build();
    verify(notificationBuilder, never()).getNotification();
    verify(mNotificationManager).notify(eq(DistributeUtils.getNotificationId()), any(Notification.class));
    verifyNoMoreInteractions(mNotificationManager);
    verify(cursor).close();
    /* Launch app should pop install U.I. and cancel notification. */
    when(mActivity.getPackageManager()).thenReturn(mPackageManager);
    Intent launcherIntent = mock(Intent.class);
    when(mPackageManager.getLaunchIntentForPackage(anyString())).thenReturn(launcherIntent);
    ComponentName launcher = mock(ComponentName.class);
    when(launcherIntent.resolveActivity(mPackageManager)).thenReturn(launcher);
    when(launcher.getClassName()).thenReturn(mActivity.getClass().getName());
    restartActivity();
    /* Wait again. */
    waitCheckDownloadTask();
    /* Verify U.I shown after restart and workflow completed. */
    verify(mContext).startActivity(installIntent);
    verify(mNotificationManager).cancel(DistributeUtils.getNotificationId());
    verifyStatic();
    /* Verify workflow completed. */
    PreferencesStorage.remove(PREFERENCE_KEY_DOWNLOAD_STATE);
    /* Verify however downloaded file was kept. */
    verifyStatic(never());
    PreferencesStorage.remove(PREFERENCE_KEY_DOWNLOAD_ID);
    verify(mDownloadManager, never()).remove(DOWNLOAD_ID);
    /* Verify second download (restart app again) cleans first one. */
    when(mDownloadManager.enqueue(mDownloadRequest)).thenReturn(DOWNLOAD_ID + 1);
    restartActivity();
    ArgumentCaptor<DialogInterface.OnClickListener> clickListener = ArgumentCaptor.forClass(DialogInterface.OnClickListener.class);
    verify(mDialogBuilder, times(2)).setPositiveButton(eq(R.string.mobile_center_distribute_update_dialog_download), clickListener.capture());
    clickListener.getValue().onClick(mDialog, DialogInterface.BUTTON_POSITIVE);
    waitDownloadTask();
    /* Verify new download id in storage. */
    verifyStatic();
    PreferencesStorage.putLong(PREFERENCE_KEY_DOWNLOAD_ID, DOWNLOAD_ID + 1);
    /* Verify previous download removed. */
    verify(mDownloadManager).remove(DOWNLOAD_ID);
    /* Notification already canceled so no more call, i.e. only once. */
    verify(mNotificationManager).cancel(DistributeUtils.getNotificationId());
}
Also used : DialogInterface(android.content.DialogInterface) Build(android.os.Build) ApplicationInfo(android.content.pm.ApplicationInfo) Intent(android.content.Intent) ComponentName(android.content.ComponentName) Cursor(android.database.Cursor) DownloadManager(android.app.DownloadManager) Notification(android.app.Notification) PrepareForTest(org.powermock.core.classloader.annotations.PrepareForTest) Test(org.junit.Test) PrepareForTest(org.powermock.core.classloader.annotations.PrepareForTest) TargetApi(android.annotation.TargetApi)

Example 3 with Build

use of android.os.Build in project mobile-center-sdk-android by Microsoft.

the class DistributeDownloadTest method notifyThenRestartAppTwice.

@Test
@PrepareForTest(Uri.class)
@SuppressWarnings("deprecation")
@TargetApi(Build.VERSION_CODES.JELLY_BEAN)
public void notifyThenRestartAppTwice() throws Exception {
    /* Simulate async task. */
    waitDownloadTask();
    /* Process fake download completion, should not interfere and will be ignored. */
    {
        Intent completionIntent = mock(Intent.class);
        when(completionIntent.getAction()).thenReturn(DownloadManager.ACTION_DOWNLOAD_COMPLETE);
        when(completionIntent.getLongExtra(eq(EXTRA_DOWNLOAD_ID), anyLong())).thenReturn(404L);
        new DownloadManagerReceiver().onReceive(mContext, completionIntent);
        waitCheckDownloadTask();
        verify(mDownloadManager, never()).query(any(DownloadManager.Query.class));
    }
    /* Process download completion with the real download identifier. */
    completeDownload();
    Cursor cursor = mockSuccessCursor();
    Intent installIntent = mockInstallIntent();
    /* In background. */
    Distribute.getInstance().onActivityPaused(mActivity);
    /* Mock notification. */
    when(mPackageManager.getApplicationInfo(mContext.getPackageName(), 0)).thenReturn(mock(ApplicationInfo.class));
    TestUtils.setInternalState(Build.VERSION.class, "SDK_INT", Build.VERSION_CODES.JELLY_BEAN);
    Notification.Builder notificationBuilder = mockNotificationBuilderChain();
    when(notificationBuilder.build()).thenReturn(mock(Notification.class));
    /* Simulate task. */
    waitCheckDownloadTask();
    /* Verify notification. */
    verify(mContext, never()).startActivity(installIntent);
    verifyStatic();
    PreferencesStorage.putInt(PREFERENCE_KEY_DOWNLOAD_STATE, DOWNLOAD_STATE_NOTIFIED);
    verify(notificationBuilder).build();
    verify(notificationBuilder, never()).getNotification();
    verify(mNotificationManager).notify(eq(DistributeUtils.getNotificationId()), any(Notification.class));
    verifyNoMoreInteractions(mNotificationManager);
    verify(cursor).close();
    /* Launch app should pop install U.I. and cancel notification. */
    when(mActivity.getPackageManager()).thenReturn(mPackageManager);
    Intent launcherIntent = mock(Intent.class);
    when(mPackageManager.getLaunchIntentForPackage(anyString())).thenReturn(launcherIntent);
    ComponentName launcher = mock(ComponentName.class);
    when(launcherIntent.resolveActivity(mPackageManager)).thenReturn(launcher);
    when(launcher.getClassName()).thenReturn(mActivity.getClass().getName());
    restartActivity();
    /* Wait again. */
    waitCheckDownloadTask();
    /* Verify U.I shown after restart and workflow completed. */
    verify(mContext).startActivity(installIntent);
    verify(mNotificationManager).cancel(DistributeUtils.getNotificationId());
    verifyStatic();
    /* Verify workflow completed. */
    PreferencesStorage.remove(PREFERENCE_KEY_DOWNLOAD_STATE);
    /* Verify however downloaded file was kept. */
    verifyStatic(never());
    PreferencesStorage.remove(PREFERENCE_KEY_DOWNLOAD_ID);
    verify(mDownloadManager, never()).remove(DOWNLOAD_ID);
    /* Verify second download (restart app again) cleans first one. */
    when(mDownloadManager.enqueue(mDownloadRequest)).thenReturn(DOWNLOAD_ID + 1);
    restartActivity();
    ArgumentCaptor<DialogInterface.OnClickListener> clickListener = ArgumentCaptor.forClass(DialogInterface.OnClickListener.class);
    verify(mDialogBuilder, times(2)).setPositiveButton(eq(R.string.appcenter_distribute_update_dialog_download), clickListener.capture());
    clickListener.getValue().onClick(mDialog, DialogInterface.BUTTON_POSITIVE);
    waitDownloadTask();
    /* Verify new download id in storage. */
    verifyStatic();
    PreferencesStorage.putLong(PREFERENCE_KEY_DOWNLOAD_ID, DOWNLOAD_ID + 1);
    /* Verify previous download removed. */
    verify(mDownloadManager).remove(DOWNLOAD_ID);
    /* Notification already canceled so no more call, i.e. only once. */
    verify(mNotificationManager).cancel(DistributeUtils.getNotificationId());
}
Also used : DialogInterface(android.content.DialogInterface) Build(android.os.Build) ApplicationInfo(android.content.pm.ApplicationInfo) Intent(android.content.Intent) ComponentName(android.content.ComponentName) Cursor(android.database.Cursor) DownloadManager(android.app.DownloadManager) Notification(android.app.Notification) PrepareForTest(org.powermock.core.classloader.annotations.PrepareForTest) Test(org.junit.Test) PrepareForTest(org.powermock.core.classloader.annotations.PrepareForTest) TargetApi(android.annotation.TargetApi)

Example 4 with Build

use of android.os.Build in project Shuttle by timusus.

the class ShuttleUtils method setRingtone.

/**
 * Method setRingtone.
 *
 * @param context context
 * @param song    Song
 */
public static void setRingtone(final Context context, final Song song) {
    if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
        if (!Settings.System.canWrite(context)) {
            new AlertDialog.Builder(context).setTitle(R.string.dialog_title_set_ringtone).setMessage(R.string.dialog_message_set_ringtone).setPositiveButton(R.string.button_ok, (dialog, which) -> {
                Intent intent = new Intent(Settings.ACTION_MANAGE_WRITE_SETTINGS);
                intent.setData(Uri.parse("package:" + ShuttleApplication.getInstance().getPackageName()));
                context.startActivity(intent);
            }).setNegativeButton(R.string.cancel, null).show();
            return;
        }
    }
    Observable.fromCallable(() -> {
        boolean success = false;
        final ContentResolver resolver = context.getContentResolver();
        // Set the flag in the database to mark this as a ringtone
        final Uri ringUri = ContentUris.withAppendedId(MediaStore.Audio.Media.EXTERNAL_CONTENT_URI, song.id);
        try {
            final ContentValues values = new ContentValues(2);
            values.put(MediaStore.Audio.AudioColumns.IS_RINGTONE, "1");
            values.put(MediaStore.Audio.AudioColumns.IS_ALARM, "1");
            if (ringUri != null) {
                resolver.update(ringUri, values, null, null);
            }
        } catch (final UnsupportedOperationException ex) {
            // most likely the card just got unmounted
            Log.e(TAG, "couldn't set ringtone flag for song " + song);
            return false;
        }
        Query query = new Query.Builder().uri(MediaStore.Audio.Media.EXTERNAL_CONTENT_URI).projection(new String[] { BaseColumns._ID, MediaStore.MediaColumns.DATA, MediaStore.MediaColumns.TITLE }).selection(BaseColumns._ID + "=" + song.id).build();
        final Cursor cursor = SqlUtils.createQuery(context, query);
        if (cursor != null) {
            try {
                if (cursor.getCount() == 1) {
                    // Set the system setting to make this the current ringtone
                    cursor.moveToFirst();
                    if (ringUri != null) {
                        Settings.System.putString(resolver, Settings.System.RINGTONE, ringUri.toString());
                    }
                    success = true;
                }
            } finally {
                cursor.close();
            }
        }
        return success;
    }).map(success -> success ? context.getString(R.string.ringtone_set, song.name) : context.getString(R.string.ringtone_set_failed)).subscribeOn(Schedulers.io()).observeOn(AndroidSchedulers.mainThread()).subscribe(message -> Toast.makeText(context, message, Toast.LENGTH_SHORT).show(), error -> LogUtils.logException(TAG, "Error setting ringtone", error));
}
Also used : AlertDialog(android.app.AlertDialog) ContentValues(android.content.ContentValues) R(com.simplecity.amp_library.R) Context(android.content.Context) Stream(com.annimon.stream.Stream) PackageManager(android.content.pm.PackageManager) Uri(android.net.Uri) Intent(android.content.Intent) NonNull(android.support.annotation.NonNull) PlayCountTable(com.simplecity.amp_library.sql.providers.PlayCountTable) Single(io.reactivex.Single) AndroidSchedulers(io.reactivex.android.schedulers.AndroidSchedulers) ArrayList(java.util.ArrayList) Song(com.simplecity.amp_library.model.Song) SuppressLint(android.annotation.SuppressLint) ContentResolver(android.content.ContentResolver) MediaStore(android.provider.MediaStore) Toast(android.widget.Toast) BaseFileObject(com.simplecity.amp_library.model.BaseFileObject) Settings(android.provider.Settings) Observable(io.reactivex.Observable) Schedulers(io.reactivex.schedulers.Schedulers) Build(android.os.Build) PreferenceManager(android.preference.PreferenceManager) Log(android.util.Log) Cursor(android.database.Cursor) ConnectivityManager(android.net.ConnectivityManager) BaseColumns(android.provider.BaseColumns) NetworkInfo(android.net.NetworkInfo) BuildConfig(com.simplecity.amp_library.BuildConfig) File(java.io.File) AlertDialog(android.app.AlertDialog) Query(com.simplecity.amp_library.model.Query) WifiManager(android.net.wifi.WifiManager) ShuttleApplication(com.simplecity.amp_library.ShuttleApplication) List(java.util.List) Config(com.simplecity.amp_library.constants.Config) SharedPreferences(android.content.SharedPreferences) Configuration(android.content.res.Configuration) ContentValues(android.content.ContentValues) SqlUtils(com.simplecity.amp_library.sql.SqlUtils) Activity(android.app.Activity) ContentUris(android.content.ContentUris) Query(com.simplecity.amp_library.model.Query) Intent(android.content.Intent) Cursor(android.database.Cursor) Uri(android.net.Uri) ContentResolver(android.content.ContentResolver)

Example 5 with Build

use of android.os.Build 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)

Aggregations

Build (android.os.Build)35 Context (android.content.Context)25 List (java.util.List)18 Intent (android.content.Intent)17 PackageManager (android.content.pm.PackageManager)17 ArrayList (java.util.ArrayList)16 File (java.io.File)13 Test (org.junit.Test)12 NonNull (android.support.annotation.NonNull)11 View (android.view.View)11 Toast (android.widget.Toast)11 Uri (android.net.Uri)10 Manifest (android.Manifest)9 Activity (android.app.Activity)9 SharedPreferences (android.content.SharedPreferences)9 Bundle (android.os.Bundle)9 TextView (android.widget.TextView)9 Locale (java.util.Locale)9 TimeUnit (java.util.concurrent.TimeUnit)9 DialogInterface (android.content.DialogInterface)7