Commit c7b778b1 authored by Marcin Wiacek's avatar Marcin Wiacek Committed by Commit Bot

Sharing TAG inside searchwidget

Change-Id: I7a5297201257fffe5dd89d2b9704d58fa72d463d
Reviewed-on: https://chromium-review.googlesource.com/1146187Reviewed-by: default avatarYusuf Ozuysal <yusufo@chromium.org>
Commit-Queue: Marcin Wiącek <marcin@mwiacek.com>
Cr-Commit-Position: refs/heads/master@{#577687}
parent 241e83cd
......@@ -42,6 +42,9 @@ import org.chromium.ui.base.ActivityWindowAndroid;
/** Queries the user's default search engine and shows autocomplete suggestions. */
public class SearchActivity extends AsyncInitializationActivity
implements SnackbarManageable, SearchActivityLocationBarLayout.Delegate {
// Shared with other org.chromium.chrome.browser.searchwidget classes.
protected static final String TAG = "searchwidget";
/** Notified about events happening inside a SearchActivity. */
public static class SearchActivityDelegate {
/**
......@@ -73,7 +76,6 @@ public class SearchActivity extends AsyncInitializationActivity
}
}
private static final String TAG = "searchwidget";
private static final Object DELEGATE_LOCK = new Object();
/** Notified about events happening for the SearchActivity. */
......
......@@ -133,7 +133,6 @@ public class SearchWidgetProvider extends AppWidgetProvider {
/** Number of consecutive crashes this widget will absorb before giving up. */
private static final int CRASH_LIMIT = 3;
private static final String TAG = "searchwidget";
private static final Object DELEGATE_LOCK = new Object();
private static final Object OBSERVER_LOCK = new Object();
......@@ -219,7 +218,7 @@ public class SearchWidgetProvider extends AppWidgetProvider {
@VisibleForTesting
static void startSearchActivity(Intent intent, boolean startVoiceSearch) {
Log.d(TAG, "Launching SearchActivity: VOICE=" + startVoiceSearch);
Log.d(SearchActivity.TAG, "Launching SearchActivity: VOICE=" + startVoiceSearch);
Context context = getDelegate().getContext();
// Abort if the user needs to go through First Run.
......@@ -403,7 +402,8 @@ public class SearchWidgetProvider extends AppWidgetProvider {
if (numCrashes < CRASH_LIMIT) {
// Absorb the crash.
Log.e(TAG, "Absorbing exception caught when attempting to launch widget.", e);
Log.e(SearchActivity.TAG,
"Absorbing exception caught when attempting to launch widget.", e);
} else {
// Too many crashes have happened consecutively. Let Android handle it.
throw e;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment