am c3a3b399: Merge change 25752 into eclair

Merge commit 'c3a3b399a9d7707b7f3c4108e0e31a1b664a6f22' into eclair-plus-aosp

* commit 'c3a3b399a9d7707b7f3c4108e0e31a1b664a6f22':
  Add a Gservices setting to controll the app error reporting feature.
This commit is contained in:
Jacek Surazski
2009-09-18 12:13:35 -07:00
committed by Android Git Automerger
2 changed files with 15 additions and 0 deletions

View File

@@ -3598,6 +3598,14 @@ public final class Settings {
public static final String SEARCH_PER_SOURCE_CONCURRENT_QUERY_LIMIT = public static final String SEARCH_PER_SOURCE_CONCURRENT_QUERY_LIMIT =
"search_per_source_concurrent_query_limit"; "search_per_source_concurrent_query_limit";
/**
* Flag for allowing ActivityManagerService to send ACTION_APP_ERROR intents
* on application crashes and ANRs. If this is disabled, the crash/ANR dialog
* will never display the "Report" button.
* Type: int ( 0 = disallow, 1 = allow )
*/
public static final String SEND_ACTION_APP_ERROR = "send_action_app_error";
/** /**
* @deprecated * @deprecated
* @hide * @hide

View File

@@ -8432,6 +8432,13 @@ public final class ActivityManagerService extends ActivityManagerNative implemen
} }
private ComponentName getErrorReportReceiver(ProcessRecord app) { private ComponentName getErrorReportReceiver(ProcessRecord app) {
// check if error reporting is enabled in Gservices
int enabled = Settings.Gservices.getInt(mContext.getContentResolver(),
Settings.Gservices.SEND_ACTION_APP_ERROR, 0);
if (enabled == 0) {
return null;
}
IPackageManager pm = ActivityThread.getPackageManager(); IPackageManager pm = ActivityThread.getPackageManager();
try { try {