FileDocCategorySizeDatePackage
BugreportWarningActivity.javaAPI DocAndroid 5.1 API2739Thu Mar 12 22:22:42 GMT 2015com.android.shell

BugreportWarningActivity

public class BugreportWarningActivity extends com.android.internal.app.AlertActivity implements DialogInterface.OnClickListener
Dialog that warns about contents of a bugreport.

Fields Summary
private android.content.Intent
mSendIntent
private android.widget.CheckBox
mConfirmRepeat
Constructors Summary
Methods Summary
public voidonClick(android.content.DialogInterface dialog, int which)

        if (which == AlertDialog.BUTTON_POSITIVE) {
            // Remember confirm state, and launch target
            setWarningState(this, mConfirmRepeat.isChecked() ? STATE_SHOW : STATE_HIDE);
            startActivity(mSendIntent);
        }

        finish();
    
public voidonCreate(android.os.Bundle icicle)

        super.onCreate(icicle);

        mSendIntent = getIntent().getParcelableExtra(Intent.EXTRA_INTENT);

        // We need to touch the extras to unpack them so they get migrated to
        // ClipData correctly.
        mSendIntent.hasExtra(Intent.EXTRA_STREAM);

        final AlertController.AlertParams ap = mAlertParams;
        ap.mView = LayoutInflater.from(this).inflate(R.layout.confirm_repeat, null);
        ap.mPositiveButtonText = getString(android.R.string.ok);
        ap.mNegativeButtonText = getString(android.R.string.cancel);
        ap.mPositiveButtonListener = this;
        ap.mNegativeButtonListener = this;

        mConfirmRepeat = (CheckBox) ap.mView.findViewById(android.R.id.checkbox);
        mConfirmRepeat.setChecked(getWarningState(this, STATE_UNKNOWN) == STATE_SHOW);

        setupAlert();