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);