From 086f915e203ba3b40017dfe16c7e89f3f4bc51a9 Mon Sep 17 00:00:00 2001 From: anthony restaino Date: Sat, 6 May 2017 14:34:44 -0400 Subject: [PATCH] Switching from getSimpleName to hardcoded tag --- .../java/acr/browser/lightning/activity/BrowserActivity.java | 2 +- .../java/acr/browser/lightning/activity/ReadingActivity.java | 2 +- .../main/java/acr/browser/lightning/activity/TabsManager.java | 3 ++- app/src/main/java/acr/browser/lightning/app/BrowserApp.java | 2 +- .../java/acr/browser/lightning/browser/BrowserPresenter.java | 2 +- .../main/java/acr/browser/lightning/constant/HistoryPage.java | 2 +- .../java/acr/browser/lightning/database/BookmarkLocalSync.java | 2 +- .../java/acr/browser/lightning/database/BookmarkManager.java | 2 +- .../java/acr/browser/lightning/download/DownloadHandler.java | 3 ++- .../java/acr/browser/lightning/download/FetchUrlMimeType.java | 2 +- .../java/acr/browser/lightning/fragment/BookmarksFragment.java | 2 +- .../main/java/acr/browser/lightning/fragment/TabsFragment.java | 2 +- .../acr/browser/lightning/search/BaseSuggestionsModel.java | 2 +- .../main/java/acr/browser/lightning/utils/MemoryLeakUtils.java | 2 +- app/src/main/java/acr/browser/lightning/utils/Utils.java | 2 +- .../main/java/acr/browser/lightning/view/LightningView.java | 2 +- 16 files changed, 18 insertions(+), 16 deletions(-) diff --git a/app/src/main/java/acr/browser/lightning/activity/BrowserActivity.java b/app/src/main/java/acr/browser/lightning/activity/BrowserActivity.java index 3813360..176c140 100644 --- a/app/src/main/java/acr/browser/lightning/activity/BrowserActivity.java +++ b/app/src/main/java/acr/browser/lightning/activity/BrowserActivity.java @@ -124,7 +124,7 @@ import butterknife.ButterKnife; public abstract class BrowserActivity extends ThemableBrowserActivity implements BrowserView, UIController, OnClickListener { - private static final String TAG = BrowserActivity.class.getSimpleName(); + private static final String TAG = "BrowserActivity"; private static final String INTENT_PANIC_TRIGGER = "info.guardianproject.panic.action.TRIGGER"; diff --git a/app/src/main/java/acr/browser/lightning/activity/ReadingActivity.java b/app/src/main/java/acr/browser/lightning/activity/ReadingActivity.java index 5b442dd..bf2e0df 100644 --- a/app/src/main/java/acr/browser/lightning/activity/ReadingActivity.java +++ b/app/src/main/java/acr/browser/lightning/activity/ReadingActivity.java @@ -45,7 +45,7 @@ import butterknife.ButterKnife; public class ReadingActivity extends AppCompatActivity { - private static final String TAG = ReadingActivity.class.getSimpleName(); + private static final String TAG = "ReadingActivity"; @BindView(R.id.textViewTitle) TextView mTitle; @BindView(R.id.textViewBody) TextView mBody; diff --git a/app/src/main/java/acr/browser/lightning/activity/TabsManager.java b/app/src/main/java/acr/browser/lightning/activity/TabsManager.java index ee189a3..02f825d 100644 --- a/app/src/main/java/acr/browser/lightning/activity/TabsManager.java +++ b/app/src/main/java/acr/browser/lightning/activity/TabsManager.java @@ -50,7 +50,8 @@ import acr.browser.lightning.view.LightningView; */ public class TabsManager { - private static final String TAG = TabsManager.class.getSimpleName(); + private static final String TAG = "TabsManager"; + private static final String BUNDLE_KEY = "WEBVIEW_"; private static final String URL_KEY = "URL_KEY"; private static final String BUNDLE_STORAGE = "SAVED_TABS.parcel"; diff --git a/app/src/main/java/acr/browser/lightning/app/BrowserApp.java b/app/src/main/java/acr/browser/lightning/app/BrowserApp.java index d7679c5..1fd4962 100644 --- a/app/src/main/java/acr/browser/lightning/app/BrowserApp.java +++ b/app/src/main/java/acr/browser/lightning/app/BrowserApp.java @@ -27,7 +27,7 @@ import acr.browser.lightning.utils.Preconditions; public class BrowserApp extends Application { - private static final String TAG = BrowserApp.class.getSimpleName(); + private static final String TAG = "BrowserApp"; @Nullable private static AppComponent sAppComponent; private static final Executor mIOThread = Executors.newSingleThreadExecutor(); diff --git a/app/src/main/java/acr/browser/lightning/browser/BrowserPresenter.java b/app/src/main/java/acr/browser/lightning/browser/BrowserPresenter.java index cb3d4a5..291ec1c 100644 --- a/app/src/main/java/acr/browser/lightning/browser/BrowserPresenter.java +++ b/app/src/main/java/acr/browser/lightning/browser/BrowserPresenter.java @@ -29,7 +29,7 @@ import acr.browser.lightning.view.LightningView; */ public class BrowserPresenter { - private static final String TAG = BrowserPresenter.class.getSimpleName(); + private static final String TAG = "BrowserPresenter"; @NonNull private final TabsManager mTabsModel; @Inject PreferenceManager mPreferences; diff --git a/app/src/main/java/acr/browser/lightning/constant/HistoryPage.java b/app/src/main/java/acr/browser/lightning/constant/HistoryPage.java index 2653664..6c179c6 100644 --- a/app/src/main/java/acr/browser/lightning/constant/HistoryPage.java +++ b/app/src/main/java/acr/browser/lightning/constant/HistoryPage.java @@ -33,7 +33,7 @@ import acr.browser.lightning.utils.Utils; public class HistoryPage { - private static final String TAG = HistoryPage.class.getSimpleName(); + private static final String TAG = "HistoryPage"; public static final String FILENAME = "history.html"; diff --git a/app/src/main/java/acr/browser/lightning/database/BookmarkLocalSync.java b/app/src/main/java/acr/browser/lightning/database/BookmarkLocalSync.java index 945c59c..ce329a9 100644 --- a/app/src/main/java/acr/browser/lightning/database/BookmarkLocalSync.java +++ b/app/src/main/java/acr/browser/lightning/database/BookmarkLocalSync.java @@ -19,7 +19,7 @@ import acr.browser.lightning.utils.Utils; public class BookmarkLocalSync { - private static final String TAG = BookmarkLocalSync.class.getSimpleName(); + private static final String TAG = "BookmarkLocalSync"; private static final String STOCK_BOOKMARKS_CONTENT = "content://browser/bookmarks"; private static final String CHROME_BOOKMARKS_CONTENT = "content://com.android.chrome.browser/bookmarks"; diff --git a/app/src/main/java/acr/browser/lightning/database/BookmarkManager.java b/app/src/main/java/acr/browser/lightning/database/BookmarkManager.java index cabbdf5..045ae1e 100644 --- a/app/src/main/java/acr/browser/lightning/database/BookmarkManager.java +++ b/app/src/main/java/acr/browser/lightning/database/BookmarkManager.java @@ -42,7 +42,7 @@ import acr.browser.lightning.utils.Utils; @Singleton public class BookmarkManager { - private static final String TAG = BookmarkManager.class.getSimpleName(); + private static final String TAG = "BookmarkManager"; private static final String TITLE = "title"; private static final String URL = "url"; diff --git a/app/src/main/java/acr/browser/lightning/download/DownloadHandler.java b/app/src/main/java/acr/browser/lightning/download/DownloadHandler.java index 1f55e17..7fdab9b 100644 --- a/app/src/main/java/acr/browser/lightning/download/DownloadHandler.java +++ b/app/src/main/java/acr/browser/lightning/download/DownloadHandler.java @@ -39,7 +39,8 @@ import acr.browser.lightning.utils.Utils; */ public class DownloadHandler { - private static final String TAG = DownloadHandler.class.getSimpleName(); + private static final String TAG = "DownloadHandler"; + private static final String COOKIE_REQUEST_HEADER = "Cookie"; public static final String DEFAULT_DOWNLOAD_PATH = diff --git a/app/src/main/java/acr/browser/lightning/download/FetchUrlMimeType.java b/app/src/main/java/acr/browser/lightning/download/FetchUrlMimeType.java index e89798a..fcef5ce 100644 --- a/app/src/main/java/acr/browser/lightning/download/FetchUrlMimeType.java +++ b/app/src/main/java/acr/browser/lightning/download/FetchUrlMimeType.java @@ -31,7 +31,7 @@ import acr.browser.lightning.utils.Utils; */ class FetchUrlMimeType extends Thread { - private static final String TAG = FetchUrlMimeType.class.getSimpleName(); + private static final String TAG = "FetchUrlMimeType"; private final Activity mContext; private final DownloadManager.Request mRequest; diff --git a/app/src/main/java/acr/browser/lightning/fragment/BookmarksFragment.java b/app/src/main/java/acr/browser/lightning/fragment/BookmarksFragment.java index 8862ee8..aaf4a47 100644 --- a/app/src/main/java/acr/browser/lightning/fragment/BookmarksFragment.java +++ b/app/src/main/java/acr/browser/lightning/fragment/BookmarksFragment.java @@ -68,7 +68,7 @@ public class BookmarksFragment extends Fragment implements View.OnClickListener, return bookmarksFragment; } - private final static String TAG = BookmarksFragment.class.getSimpleName(); + private static final String TAG = "BookmarksFragment"; public final static String INCOGNITO_MODE = TAG + ".INCOGNITO_MODE"; diff --git a/app/src/main/java/acr/browser/lightning/fragment/TabsFragment.java b/app/src/main/java/acr/browser/lightning/fragment/TabsFragment.java index 9723e7a..7d077da 100644 --- a/app/src/main/java/acr/browser/lightning/fragment/TabsFragment.java +++ b/app/src/main/java/acr/browser/lightning/fragment/TabsFragment.java @@ -70,7 +70,7 @@ public class TabsFragment extends Fragment implements View.OnClickListener, View return tabsFragment; } - private static final String TAG = TabsFragment.class.getSimpleName(); + private static final String TAG = "TabsFragment"; /** * Arguments boolean to tell the fragment it is displayed in the drawner or on the tab strip diff --git a/app/src/main/java/acr/browser/lightning/search/BaseSuggestionsModel.java b/app/src/main/java/acr/browser/lightning/search/BaseSuggestionsModel.java index 6e279c4..05e1b93 100644 --- a/app/src/main/java/acr/browser/lightning/search/BaseSuggestionsModel.java +++ b/app/src/main/java/acr/browser/lightning/search/BaseSuggestionsModel.java @@ -29,7 +29,7 @@ import okhttp3.Response; abstract class BaseSuggestionsModel { - private static final String TAG = BaseSuggestionsModel.class.getSimpleName(); + private static final String TAG = "BaseSuggestionsModel"; static final int MAX_RESULTS = 5; private static final long INTERVAL_DAY = TimeUnit.DAYS.toSeconds(1); diff --git a/app/src/main/java/acr/browser/lightning/utils/MemoryLeakUtils.java b/app/src/main/java/acr/browser/lightning/utils/MemoryLeakUtils.java index 814e1eb..17d08e7 100644 --- a/app/src/main/java/acr/browser/lightning/utils/MemoryLeakUtils.java +++ b/app/src/main/java/acr/browser/lightning/utils/MemoryLeakUtils.java @@ -16,7 +16,7 @@ import java.lang.reflect.Method; public class MemoryLeakUtils { - private static final String TAG = MemoryLeakUtils.class.getSimpleName(); + private static final String TAG = "MemoryLeakUtils"; @Nullable private static Method sFinishInputLocked = null; diff --git a/app/src/main/java/acr/browser/lightning/utils/Utils.java b/app/src/main/java/acr/browser/lightning/utils/Utils.java index 9b838b7..62a2669 100644 --- a/app/src/main/java/acr/browser/lightning/utils/Utils.java +++ b/app/src/main/java/acr/browser/lightning/utils/Utils.java @@ -56,7 +56,7 @@ import acr.browser.lightning.preference.PreferenceManager; public final class Utils { - private static final String TAG = Utils.class.getSimpleName(); + private static final String TAG = "Utils"; public static boolean doesSupportHeaders() { return Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT; diff --git a/app/src/main/java/acr/browser/lightning/view/LightningView.java b/app/src/main/java/acr/browser/lightning/view/LightningView.java index ad267c4..4bf514e 100644 --- a/app/src/main/java/acr/browser/lightning/view/LightningView.java +++ b/app/src/main/java/acr/browser/lightning/view/LightningView.java @@ -69,7 +69,7 @@ import acr.browser.lightning.utils.Utils; */ public class LightningView { - private static final String TAG = LightningView.class.getSimpleName(); + private static final String TAG = "LightningView"; public static final String HEADER_REQUESTED_WITH = "X-Requested-With"; public static final String HEADER_WAP_PROFILE = "X-Wap-Profile";