FileDocCategorySizeDatePackage
StrictModeViolationDialog.javaAPI DocAndroid 5.1 API3646Thu Mar 12 22:22:42 GMT 2015com.android.server.am

StrictModeViolationDialog

public final class StrictModeViolationDialog extends BaseErrorDialog

Fields Summary
private static final String
TAG
private final ActivityManagerService
mService
private final AppErrorResult
mResult
private final ProcessRecord
mProc
static final int
ACTION_OK
static final int
ACTION_OK_AND_REPORT
static final long
DISMISS_TIMEOUT
private final android.os.Handler
mHandler
Constructors Summary
public StrictModeViolationDialog(android.content.Context context, ActivityManagerService service, AppErrorResult result, ProcessRecord app)


        
                
        super(context);

        Resources res = context.getResources();

        mService = service;
        mProc = app;
        mResult = result;
        CharSequence name;
        if ((app.pkgList.size() == 1) &&
                (name=context.getPackageManager().getApplicationLabel(app.info)) != null) {
            setMessage(res.getString(
                    com.android.internal.R.string.smv_application,
                    name.toString(), app.info.processName));
        } else {
            name = app.processName;
            setMessage(res.getString(
                    com.android.internal.R.string.smv_process,
                    name.toString()));
        }

        setCancelable(false);

        setButton(DialogInterface.BUTTON_POSITIVE,
                  res.getText(com.android.internal.R.string.dlg_ok),
                  mHandler.obtainMessage(ACTION_OK));

        if (app.errorReportReceiver != null) {
            setButton(DialogInterface.BUTTON_NEGATIVE,
                      res.getText(com.android.internal.R.string.report),
                      mHandler.obtainMessage(ACTION_OK_AND_REPORT));
        }

        setTitle(res.getText(com.android.internal.R.string.aerr_title));
        getWindow().addPrivateFlags(PRIVATE_FLAG_SYSTEM_ERROR);
        getWindow().setTitle("Strict Mode Violation: " + app.info.processName);

        // After the timeout, pretend the user clicked the quit button
        mHandler.sendMessageDelayed(
                mHandler.obtainMessage(ACTION_OK),
                DISMISS_TIMEOUT);
    
Methods Summary