| Index: content/public/android/java/src/org/chromium/content/browser/TracingControllerAndroid.java
|
| diff --git a/content/public/android/java/src/org/chromium/content/browser/TracingControllerAndroid.java b/content/public/android/java/src/org/chromium/content/browser/TracingControllerAndroid.java
|
| index 43183631f4fa30a593d38f810f5db03b14645881..e12e9094c8aa6c42142e04e3cab74c5db153cba4 100644
|
| --- a/content/public/android/java/src/org/chromium/content/browser/TracingControllerAndroid.java
|
| +++ b/content/public/android/java/src/org/chromium/content/browser/TracingControllerAndroid.java
|
| @@ -278,28 +278,33 @@ public class TracingControllerAndroid {
|
| class TracingBroadcastReceiver extends BroadcastReceiver {
|
| @Override
|
| public void onReceive(Context context, Intent intent) {
|
| - if (intent.getAction().endsWith(ACTION_START)) {
|
| - String categories = intent.getStringExtra(CATEGORIES_EXTRA);
|
| - if (TextUtils.isEmpty(categories)) {
|
| - categories = nativeGetDefaultCategories();
|
| + try {
|
| + if (intent.getAction().endsWith(ACTION_START)) {
|
| + String categories = intent.getStringExtra(CATEGORIES_EXTRA);
|
| + if (TextUtils.isEmpty(categories)) {
|
| + categories = nativeGetDefaultCategories();
|
| + } else {
|
| + categories = categories.replaceFirst(DEFAULT_CHROME_CATEGORIES_PLACE_HOLDER,
|
| + nativeGetDefaultCategories());
|
| + }
|
| + String traceOptions = intent.getStringExtra(RECORD_CONTINUOUSLY_EXTRA) == null
|
| + ? "record-until-full"
|
| + : "record-continuously";
|
| + String filename = intent.getStringExtra(FILE_EXTRA);
|
| + if (filename != null) {
|
| + startTracing(filename, true, categories, traceOptions);
|
| + } else {
|
| + startTracing(true, categories, traceOptions);
|
| + }
|
| + } else if (intent.getAction().endsWith(ACTION_STOP)) {
|
| + stopTracing();
|
| + } else if (intent.getAction().endsWith(ACTION_LIST_CATEGORIES)) {
|
| + getCategoryGroups();
|
| } else {
|
| - categories = categories.replaceFirst(
|
| - DEFAULT_CHROME_CATEGORIES_PLACE_HOLDER, nativeGetDefaultCategories());
|
| + Log.e(TAG, "Unexpected intent: %s", intent);
|
| }
|
| - String traceOptions = intent.getStringExtra(RECORD_CONTINUOUSLY_EXTRA) == null
|
| - ? "record-until-full" : "record-continuously";
|
| - String filename = intent.getStringExtra(FILE_EXTRA);
|
| - if (filename != null) {
|
| - startTracing(filename, true, categories, traceOptions);
|
| - } else {
|
| - startTracing(true, categories, traceOptions);
|
| - }
|
| - } else if (intent.getAction().endsWith(ACTION_STOP)) {
|
| - stopTracing();
|
| - } else if (intent.getAction().endsWith(ACTION_LIST_CATEGORIES)) {
|
| - getCategoryGroups();
|
| - } else {
|
| - Log.e(TAG, "Unexpected intent: %s", intent);
|
| + } catch (java.lang.UnsatisfiedLinkError e) {
|
| + Log.w(TAG, "onReceive(action=%s) failed: %s", intent.getAction(), e);
|
| }
|
| }
|
| }
|
|
|