Search in sources :

Example 11 with ConfirmationDialog

use of com.ichi2.anki.dialogs.ConfirmationDialog in project AnkiChinaAndroid by ankichinateam.

the class Reviewer method showResetCardDialog.

private void showResetCardDialog() {
    // Show confirmation dialog before resetting card progress
    Timber.i("showResetCardDialog() Reset progress button pressed");
    // Show confirmation dialog before resetting card progress
    ConfirmationDialog dialog = new ConfirmationDialog();
    String title = getResources().getString(R.string.reset_card_dialog_title);
    String message = getResources().getString(R.string.reset_card_dialog_message);
    dialog.setArgs(title, message);
    Runnable confirm = () -> {
        Timber.i("NoteEditor:: ResetProgress button pressed");
        CollectionTask.launchCollectionTask(DISMISS_MULTI, mResetProgressCardHandler, new TaskData(new Object[] { new long[] { mCurrentCard.getId() }, Collection.DismissType.RESET_CARDS }));
    };
    dialog.setConfirm(confirm);
    showDialogFragment(dialog);
}
Also used : SpannableString(android.text.SpannableString) ConfirmationDialog(com.ichi2.anki.dialogs.ConfirmationDialog) TaskData(com.ichi2.async.TaskData)

Example 12 with ConfirmationDialog

use of com.ichi2.anki.dialogs.ConfirmationDialog in project AnkiChinaAndroid by ankichinateam.

the class ModelFieldEditor method sortByField.

/*
     * Changes the sort field (that displays in card browser) to the current field
     */
private void sortByField() {
    changeHandler listener = changeFieldHandler();
    try {
        mCol.modSchema();
        CollectionTask.launchCollectionTask(CHANGE_SORT_FIELD, listener, new TaskData(new Object[] { mMod, mCurrentPos }));
    } catch (ConfirmModSchemaException e) {
        // Handler mMod schema confirmation
        ConfirmationDialog c = new ConfirmationDialog();
        c.setArgs(getResources().getString(R.string.full_sync_confirmation));
        Runnable confirm = () -> {
            mCol.modSchemaNoCheck();
            CollectionTask.launchCollectionTask(CHANGE_SORT_FIELD, listener, new TaskData(new Object[] { mMod, mCurrentPos }));
            dismissContextMenu();
        };
        c.setConfirm(confirm);
        c.setCancel(mConfirmDialogCancel);
        ModelFieldEditor.this.showDialogFragment(c);
    }
}
Also used : ConfirmModSchemaException(com.ichi2.anki.exception.ConfirmModSchemaException) JSONObject(com.ichi2.utils.JSONObject) TaskData(com.ichi2.async.TaskData) ConfirmationDialog(com.ichi2.anki.dialogs.ConfirmationDialog)

Example 13 with ConfirmationDialog

use of com.ichi2.anki.dialogs.ConfirmationDialog in project AnkiChinaAndroid by ankichinateam.

the class ModelFieldEditor method renameFieldDialog.

/*
     * Creates a dialog to rename the currently selected field
     * Processing time is constant
     */
private void renameFieldDialog() {
    mFieldNameInput = new EditText(this);
    mFieldNameInput.setSingleLine(true);
    mFieldNameInput.setText(mFieldLabels.get(mCurrentPos));
    mFieldNameInput.setSelection(mFieldNameInput.getText().length());
    new MaterialDialog.Builder(this).title(R.string.rename_model).positiveText(R.string.rename).customView(mFieldNameInput, true).onPositive((dialog, which) -> {
        String fieldLabel = mFieldNameInput.getText().toString().replaceAll("[\\n\\r]", "");
        if (fieldLabel.length() == 0) {
            UIUtils.showThemedToast(this, getResources().getString(R.string.toast_empty_name), true);
        } else if (containsField(fieldLabel)) {
            UIUtils.showThemedToast(this, getResources().getString(R.string.toast_duplicate_field), true);
        } else {
            // Field is valid, now rename
            try {
                renameField();
            } catch (ConfirmModSchemaException e) {
                // Handler mod schema confirmation
                ConfirmationDialog c = new ConfirmationDialog();
                c.setArgs(getResources().getString(R.string.full_sync_confirmation));
                Runnable confirm = () -> {
                    mCol.modSchemaNoCheck();
                    try {
                        renameField();
                    } catch (ConfirmModSchemaException e1) {
                    // This should never be thrown
                    }
                    dismissContextMenu();
                };
                c.setConfirm(confirm);
                c.setCancel(mConfirmDialogCancel);
                ModelFieldEditor.this.showDialogFragment(c);
            }
        }
    }).negativeText(R.string.dialog_cancel).show();
}
Also used : EditText(android.widget.EditText) ConfirmModSchemaException(com.ichi2.anki.exception.ConfirmModSchemaException) ConfirmationDialog(com.ichi2.anki.dialogs.ConfirmationDialog)

Example 14 with ConfirmationDialog

use of com.ichi2.anki.dialogs.ConfirmationDialog in project AnkiChinaAndroid by ankichinateam.

the class CardBrowser method onOptionsItemSelected.

@Override
public boolean onOptionsItemSelected(MenuItem item) {
    // (when another operation will be performed on the model, it will undo the latest operation)
    if (mUndoSnackbar != null && mUndoSnackbar.isShown()) {
        mUndoSnackbar.dismiss();
    }
    switch(item.getItemId()) {
        case android.R.id.home:
            endMultiSelectMode();
            return true;
        case R.id.action_add_note_from_card_browser:
            {
                Intent intent = new Intent(CardBrowser.this, NoteEditor.class);
                intent.putExtra(NoteEditor.EXTRA_CALLER, NoteEditor.CALLER_CARDBROWSER_ADD);
                startActivityForResultWithAnimation(intent, ADD_NOTE, ActivityTransitionAnimation.LEFT);
                return true;
            }
        case R.id.action_save_search:
            {
                String searchTerms = mSearchView.getQuery().toString();
                showDialogFragment(CardBrowserMySearchesDialog.newInstance(null, mMySearchesDialogListener, searchTerms, CardBrowserMySearchesDialog.CARD_BROWSER_MY_SEARCHES_TYPE_SAVE));
                return true;
            }
        case R.id.action_list_my_searches:
            {
                JSONObject savedFiltersObj = getCol().getConf().optJSONObject("savedFilters");
                HashMap<String, String> savedFilters = new HashMap<>();
                if (savedFiltersObj != null) {
                    Iterator<String> it = savedFiltersObj.keys();
                    while (it.hasNext()) {
                        String searchName = it.next();
                        savedFilters.put(searchName, savedFiltersObj.optString(searchName));
                    }
                }
                showDialogFragment(CardBrowserMySearchesDialog.newInstance(savedFilters, mMySearchesDialogListener, "", CardBrowserMySearchesDialog.CARD_BROWSER_MY_SEARCHES_TYPE_LIST));
                return true;
            }
        case R.id.action_sort_by_size:
            showDialogFragment(CardBrowserOrderDialog.newInstance(mOrder, mOrderAsc, mOrderDialogListener));
            return true;
        case R.id.action_show_marked:
            mSearchTerms = "tag:marked";
            mSearchView.setQuery("", false);
            mSearchView.setQueryHint(getResources().getString(R.string.card_browser_show_marked));
            searchCards();
            return true;
        case R.id.action_show_suspended:
            mSearchTerms = "is:suspended";
            mSearchView.setQuery("", false);
            mSearchView.setQueryHint(getResources().getString(R.string.card_browser_show_suspended));
            searchCards();
            return true;
        case R.id.action_search_by_tag:
            showTagsDialog();
            return true;
        case R.id.action_flag_zero:
            flagTask(0);
            return true;
        case R.id.action_flag_one:
            flagTask(1);
            return true;
        case R.id.action_flag_two:
            flagTask(2);
            return true;
        case R.id.action_flag_three:
            flagTask(3);
            return true;
        case R.id.action_flag_four:
            flagTask(4);
            return true;
        case R.id.action_delete_card:
            if (mInMultiSelectMode) {
                CollectionTask.launchCollectionTask(DISMISS_MULTI, mDeleteNoteHandler, new TaskData(new Object[] { getSelectedCardIds(), Collection.DismissType.DELETE_NOTE_MULTI }));
                mCheckedCards.clear();
                endMultiSelectMode();
                mCardsAdapter.notifyDataSetChanged();
            }
            return true;
        case R.id.action_mark_card:
            CollectionTask.launchCollectionTask(DISMISS_MULTI, markCardHandler(), new TaskData(new Object[] { getSelectedCardIds(), Collection.DismissType.MARK_NOTE_MULTI }));
            return true;
        case R.id.action_suspend_card:
            CollectionTask.launchCollectionTask(DISMISS_MULTI, suspendCardHandler(), new TaskData(new Object[] { getSelectedCardIds(), Collection.DismissType.SUSPEND_CARD_MULTI }));
            return true;
        case R.id.action_change_deck:
            {
                AlertDialog.Builder builderSingle = new AlertDialog.Builder(this);
                builderSingle.setTitle(getString(R.string.move_all_to_deck));
                // WARNING: changeDeck depends on this index, so any changes should be reflected there.
                final ArrayAdapter<String> arrayAdapter = new ArrayAdapter<String>(this, R.layout.dropdown_deck_item);
                for (Deck deck : getValidDecksForChangeDeck()) {
                    try {
                        arrayAdapter.add(deck.getString("name"));
                    } catch (JSONException e) {
                        e.printStackTrace();
                    }
                }
                builderSingle.setNegativeButton(getString(R.string.cancel), new DialogInterface.OnClickListener() {

                    @Override
                    public void onClick(DialogInterface dialog, int which) {
                        dialog.dismiss();
                    }
                });
                builderSingle.setAdapter(arrayAdapter, new DialogInterface.OnClickListener() {

                    @Override
                    public void onClick(DialogInterface dialog, int which) {
                        changeDeck(which);
                    }
                });
                builderSingle.show();
                return true;
            }
        case R.id.action_undo:
            if (getCol().undoAvailable()) {
                CollectionTask.launchCollectionTask(UNDO, mUndoHandler);
            }
            return true;
        case R.id.action_select_none:
            onSelectNone();
            return true;
        case R.id.action_select_all:
            onSelectAll();
            return true;
        case R.id.action_preview:
            {
                Intent previewer = new Intent(CardBrowser.this, Previewer.class);
                if (mInMultiSelectMode && checkedCardCount() > 1) {
                    // Multiple cards have been explicitly selected, so preview only those cards
                    previewer.putExtra("index", 0);
                    previewer.putExtra("cardList", getSelectedCardIds());
                } else {
                    // Preview all cards, starting from the one that is currently selected
                    int startIndex = mCheckedCards.isEmpty() ? 0 : mCheckedCards.iterator().next().getPosition();
                    previewer.putExtra("index", startIndex);
                    previewer.putExtra("cardList", getAllCardIds());
                }
                startActivityForResultWithoutAnimation(previewer, PREVIEW_CARDS);
                return true;
            }
        case R.id.action_reset_cards_progress:
            {
                Timber.i("NoteEditor:: Reset progress button pressed");
                // Show confirmation dialog before resetting card progress
                ConfirmationDialog dialog = new ConfirmationDialog();
                String title = getString(R.string.reset_card_dialog_title);
                String message = getString(R.string.reset_card_dialog_message);
                dialog.setArgs(title, message);
                Runnable confirm = () -> {
                    Timber.i("CardBrowser:: ResetProgress button pressed");
                    CollectionTask.launchCollectionTask(DISMISS_MULTI, resetProgressCardHandler(), new TaskData(new Object[] { getSelectedCardIds(), Collection.DismissType.RESET_CARDS }));
                };
                dialog.setConfirm(confirm);
                showDialogFragment(dialog);
                return true;
            }
        case R.id.action_reschedule_cards:
            {
                Timber.i("CardBrowser:: Reschedule button pressed");
                long[] selectedCardIds = getSelectedCardIds();
                FunctionalInterfaces.Consumer<Integer> consumer = newDays -> CollectionTask.launchCollectionTask(DISMISS_MULTI, rescheduleCardHandler(), new TaskData(new Object[] { selectedCardIds, Collection.DismissType.RESCHEDULE_CARDS, newDays }));
                RescheduleDialog rescheduleDialog;
                if (selectedCardIds.length == 1) {
                    long cardId = selectedCardIds[0];
                    Card selected = getCol().getCard(cardId);
                    rescheduleDialog = RescheduleDialog.rescheduleSingleCard(getResources(), selected, consumer);
                } else {
                    rescheduleDialog = RescheduleDialog.rescheduleMultipleCards(getResources(), consumer, selectedCardIds.length);
                }
                showDialogFragment(rescheduleDialog);
                return true;
            }
        case R.id.action_reposition_cards:
            {
                Timber.i("CardBrowser:: Reposition button pressed");
                // Only new cards may be repositioned
                long[] cardIds = getSelectedCardIds();
                for (int i = 0; i < cardIds.length; i++) {
                    if (getCol().getCard(cardIds[i]).getQueue() != Consts.CARD_TYPE_NEW) {
                        SimpleMessageDialog dialog = SimpleMessageDialog.newInstance(getString(R.string.vague_error), getString(R.string.reposition_card_not_new_error), false);
                        showDialogFragment(dialog);
                        return false;
                    }
                }
                IntegerDialog repositionDialog = new IntegerDialog();
                repositionDialog.setArgs(getString(R.string.reposition_card_dialog_title), getString(R.string.reposition_card_dialog_message), 5);
                repositionDialog.setCallbackRunnable(days -> CollectionTask.launchCollectionTask(DISMISS_MULTI, repositionCardHandler(), new TaskData(new Object[] { cardIds, Collection.DismissType.REPOSITION_CARDS, days })));
                showDialogFragment(repositionDialog);
                return true;
            }
        case R.id.action_edit_note:
            {
                openNoteEditorForCurrentlySelectedNote();
            }
        default:
            return super.onOptionsItemSelected(item);
    }
}
Also used : AlertDialog(android.app.AlertDialog) Arrays(java.util.Arrays) Bundle(android.os.Bundle) TagsDialog(com.ichi2.anki.dialogs.TagsDialog) Deck(com.ichi2.libanki.Deck) NonNull(androidx.annotation.NonNull) WindowManager(android.view.WindowManager) Compat(com.ichi2.compat.Compat) ConfirmationDialog(com.ichi2.anki.dialogs.ConfirmationDialog) Permissions(com.ichi2.utils.Permissions) FunctionalInterfaces(com.ichi2.utils.FunctionalInterfaces) ActionBar(androidx.appcompat.app.ActionBar) Decks(com.ichi2.libanki.Decks) CheckBox(android.widget.CheckBox) Locale(java.util.Locale) Handler(android.os.Handler) Map(java.util.Map) JSONException(com.ichi2.utils.JSONException) View(android.view.View) TaskData(com.ichi2.async.TaskData) AdapterView(android.widget.AdapterView) Media(com.ichi2.libanki.Media) CardBrowserMySearchesDialog(com.ichi2.anki.dialogs.CardBrowserMySearchesDialog) Upgrade(com.ichi2.upgrade.Upgrade) IntentFilter(android.content.IntentFilter) Set(java.util.Set) SearchView(androidx.appcompat.widget.SearchView) JSONObject(com.ichi2.utils.JSONObject) BroadcastReceiver(android.content.BroadcastReceiver) ViewGroup(android.view.ViewGroup) Timber(timber.log.Timber) AlertDialog(android.app.AlertDialog) Objects(java.util.Objects) List(java.util.List) Nullable(androidx.annotation.Nullable) TextView(android.widget.TextView) OnItemSelectedListener(android.widget.AdapterView.OnItemSelectedListener) BaseAdapter(android.widget.BaseAdapter) Consts(com.ichi2.libanki.Consts) CompatHelper(com.ichi2.compat.CompatHelper) Toolbar(androidx.appcompat.widget.Toolbar) TaskListenerWithContext(com.ichi2.async.TaskListenerWithContext) ListView(android.widget.ListView) Pattern(java.util.regex.Pattern) MaterialDialog(com.afollestad.materialdialogs.MaterialDialog) Snackbar(com.google.android.material.snackbar.Snackbar) Typeface(android.graphics.Typeface) Context(android.content.Context) Pair(android.util.Pair) Intent(android.content.Intent) SystemClock(android.os.SystemClock) RescheduleDialog(com.ichi2.anki.dialogs.RescheduleDialog) HashMap(java.util.HashMap) SdCardReceiver(com.ichi2.anki.receiver.SdCardReceiver) Collection(com.ichi2.libanki.Collection) Column(com.ichi2.anki.CardBrowser.Column) MenuItem(android.view.MenuItem) ArrayList(java.util.ArrayList) TASK_TYPE(com.ichi2.async.CollectionTask.TASK_TYPE) HashSet(java.util.HashSet) DeckDropDownAdapter(com.ichi2.anki.widgets.DeckDropDownAdapter) WidgetStatus(com.ichi2.widget.WidgetStatus) Menu(android.view.Menu) SimpleMessageDialog(com.ichi2.anki.dialogs.SimpleMessageDialog) Utils(com.ichi2.libanki.Utils) LinkedHashSet(java.util.LinkedHashSet) DialogInterface(android.content.DialogInterface) IntegerDialog(com.ichi2.anki.dialogs.IntegerDialog) CheckResult(androidx.annotation.CheckResult) Iterator(java.util.Iterator) LayoutInflater(android.view.LayoutInflater) TextUtils(android.text.TextUtils) AbsListView(android.widget.AbsListView) CollectionTask(com.ichi2.async.CollectionTask) Themes(com.ichi2.themes.Themes) Spinner(android.widget.Spinner) ArrayAdapter(android.widget.ArrayAdapter) SharedPreferences(android.content.SharedPreferences) TypedValue(android.util.TypedValue) SECONDS_PER_DAY(com.ichi2.libanki.stats.Stats.SECONDS_PER_DAY) LanguageUtil(com.ichi2.utils.LanguageUtil) Card(com.ichi2.libanki.Card) VisibleForTesting(androidx.annotation.VisibleForTesting) ActivityTransitionAnimation(com.ichi2.anim.ActivityTransitionAnimation) Collections(java.util.Collections) CardBrowserOrderDialog(com.ichi2.anki.dialogs.CardBrowserOrderDialog) HashMap(java.util.HashMap) DialogInterface(android.content.DialogInterface) TaskData(com.ichi2.async.TaskData) ConfirmationDialog(com.ichi2.anki.dialogs.ConfirmationDialog) RescheduleDialog(com.ichi2.anki.dialogs.RescheduleDialog) Iterator(java.util.Iterator) SimpleMessageDialog(com.ichi2.anki.dialogs.SimpleMessageDialog) Deck(com.ichi2.libanki.Deck) JSONException(com.ichi2.utils.JSONException) Intent(android.content.Intent) Card(com.ichi2.libanki.Card) JSONObject(com.ichi2.utils.JSONObject) IntegerDialog(com.ichi2.anki.dialogs.IntegerDialog) JSONObject(com.ichi2.utils.JSONObject) ArrayAdapter(android.widget.ArrayAdapter)

Example 15 with ConfirmationDialog

use of com.ichi2.anki.dialogs.ConfirmationDialog in project AnkiChinaAndroid by ankichinateam.

the class DialogHandler method handleMessage.

@Override
public void handleMessage(Message msg) {
    Bundle msgData = msg.getData();
    String messageName = sMessageNameList[msg.what];
    UsageAnalytics.sendAnalyticsScreenView(messageName);
    Timber.i("Handling Message: %s", messageName);
    if (msg.what == MSG_SHOW_COLLECTION_LOADING_ERROR_DIALOG) {
        // Collection could not be opened
        mActivity.get().showDatabaseErrorDialog(DatabaseErrorDialog.DIALOG_LOAD_FAILED);
    } else if (msg.what == MSG_SHOW_COLLECTION_IMPORT_REPLACE_DIALOG) {
        // Handle import of collection package APKG
        mActivity.get().showImportDialog(ImportDialog.DIALOG_IMPORT_REPLACE_CONFIRM, msgData.getString("importPath"));
    } else if (msg.what == MSG_SHOW_COLLECTION_IMPORT_ADD_DIALOG) {
        // Handle import of deck package APKG
        mActivity.get().showImportDialog(ImportDialog.DIALOG_IMPORT_ADD_CONFIRM, msgData.getString("importPath"));
    } else if (msg.what == MSG_SHOW_SYNC_ERROR_DIALOG) {
        if (mActivity.get() instanceof DeckPicker) {
            int id = msgData.getInt("dialogType");
            String message = msgData.getString("dialogMessage");
            ((DeckPicker) mActivity.get()).showSyncErrorDialog(id, message);
        }
    } else if (msg.what == MSG_SHOW_EXPORT_COMPLETE_DIALOG) {
        // Export complete
        AsyncDialogFragment f = DeckPickerExportCompleteDialog.newInstance(msgData.getString("exportPath"));
        mActivity.get().showAsyncDialogFragment(f);
    } else if (msg.what == MSG_SHOW_MEDIA_CHECK_COMPLETE_DIALOG) {
        if (mActivity.get() instanceof DeckPicker) {
            // Media check results
            int id = msgData.getInt("dialogType");
            if (id != MediaCheckDialog.DIALOG_CONFIRM_MEDIA_CHECK) {
                List<List<String>> checkList = new ArrayList<>();
                checkList.add(msgData.getStringArrayList("nohave"));
                checkList.add(msgData.getStringArrayList("unused"));
                checkList.add(msgData.getStringArrayList("invalid"));
                ((DeckPicker) mActivity.get()).showMediaCheckDialog(id, checkList);
            }
        }
    } else if (msg.what == MSG_SHOW_DATABASE_ERROR_DIALOG) {
        // Database error dialog
        mActivity.get().showDatabaseErrorDialog(msgData.getInt("dialogType"));
    } else if (msg.what == MSG_SHOW_FORCE_FULL_SYNC_DIALOG) {
        // Confirmation dialog for forcing full sync
        ConfirmationDialog dialog = new ConfirmationDialog();
        Runnable confirm = new Runnable() {

            @Override
            public void run() {
                // Bypass the check once the user confirms
                CollectionHelper.getInstance().getCol(AnkiDroidApp.getInstance()).modSchemaNoCheck();
            }
        };
        dialog.setConfirm(confirm);
        dialog.setArgs(msgData.getString("message"));
        (mActivity.get()).showDialogFragment(dialog);
    } else if (msg.what == MSG_DO_SYNC) {
        if (mActivity.get() instanceof DeckPicker) {
            SharedPreferences preferences = AnkiDroidApp.getSharedPrefs(mActivity.get());
            Resources res = mActivity.get().getResources();
            Collection col = mActivity.get().getCol();
            String hkey = preferences.getString("hkey", "");
            long millisecondsSinceLastSync = col.getTime().intTimeMS() - preferences.getLong("lastSyncTime", 0);
            boolean limited = millisecondsSinceLastSync < INTENT_SYNC_MIN_INTERVAL;
            if (!limited && hkey.length() > 0 && Connection.isOnline()) {
                ((DeckPicker) mActivity.get()).sync();
            } else {
                String err = res.getString(R.string.sync_error);
                if (limited) {
                    long remainingTimeInSeconds = Math.max((INTENT_SYNC_MIN_INTERVAL - millisecondsSinceLastSync) / 1000, 1);
                    // getQuantityString needs an int
                    int remaining = (int) Math.min(Integer.MAX_VALUE, remainingTimeInSeconds);
                    String message = res.getQuantityString(R.plurals.sync_automatic_sync_needs_more_time, remaining, remaining);
                    mActivity.get().showSimpleNotification(err, message, NotificationChannels.Channel.SYNC);
                } else {
                    mActivity.get().showSimpleNotification(err, res.getString(R.string.youre_offline), NotificationChannels.Channel.SYNC);
                }
            }
            mActivity.get().finishWithoutAnimation();
        }
    }
}
Also used : SharedPreferences(android.content.SharedPreferences) Bundle(android.os.Bundle) Collection(com.ichi2.libanki.Collection) ArrayList(java.util.ArrayList) List(java.util.List) Resources(android.content.res.Resources) DeckPicker(com.ichi2.anki.DeckPicker)

Aggregations

ConfirmationDialog (com.ichi2.anki.dialogs.ConfirmationDialog)19 ConfirmModSchemaException (com.ichi2.anki.exception.ConfirmModSchemaException)12 TaskData (com.ichi2.async.TaskData)7 CollectionTask (com.ichi2.async.CollectionTask)5 VisibleForTesting (androidx.annotation.VisibleForTesting)4 JSONException (com.ichi2.utils.JSONException)4 JSONObject (com.ichi2.utils.JSONObject)4 List (java.util.List)4 SharedPreferences (android.content.SharedPreferences)3 Resources (android.content.res.Resources)3 Bundle (android.os.Bundle)3 Collection (com.ichi2.libanki.Collection)3 ArrayList (java.util.ArrayList)3 AlertDialog (android.app.AlertDialog)2 BroadcastReceiver (android.content.BroadcastReceiver)2 Context (android.content.Context)2 Intent (android.content.Intent)2 IntentFilter (android.content.IntentFilter)2 Handler (android.os.Handler)2 SystemClock (android.os.SystemClock)2