Commit bdb01fcd authored by Aiden Benner's avatar Aiden Benner Committed by Commit Bot

Fix redundant field initializations

Normally custom ErrorProne checks would catch this,
but they were inadvertently disabled.
In preparation for for re-enabling these custom ErrorProne checks
this CL fixes all the redundant field initializations that have
crept into the codebase.

Trivial mechanical change

TBR=yfriedman@chromium.org

Bug: 904524
Change-Id: I96a81a1cb3b8c67bc682728aa9035c4757ed319b
Reviewed-on: https://chromium-review.googlesource.com/c/1334188
Commit-Queue: Aiden Benner <abenner@google.com>
Reviewed-by: default avatarEric Stevenson <estevenson@chromium.org>
Cr-Commit-Position: refs/heads/master@{#608197}
parent fa9ef46b
...@@ -31,7 +31,7 @@ public class FeedProcessScopeFactory { ...@@ -31,7 +31,7 @@ public class FeedProcessScopeFactory {
/** Flag that tracks whether we've ever been disabled via enterprise policy. Should only be /** Flag that tracks whether we've ever been disabled via enterprise policy. Should only be
* accessed through isFeedProcessScopeEnabled(). */ * accessed through isFeedProcessScopeEnabled(). */
private static boolean sEverDisabledForPolicy = false; private static boolean sEverDisabledForPolicy;
private static PrefChangeRegistrar sPrefChangeRegistrar; private static PrefChangeRegistrar sPrefChangeRegistrar;
private static FeedAppLifecycle sFeedAppLifecycle; private static FeedAppLifecycle sFeedAppLifecycle;
private static FeedProcessScope sFeedProcessScope; private static FeedProcessScope sFeedProcessScope;
......
...@@ -45,7 +45,7 @@ class ManualFillingMediator extends EmptyTabObserver ...@@ -45,7 +45,7 @@ class ManualFillingMediator extends EmptyTabObserver
implements KeyboardAccessoryCoordinator.VisibilityDelegate, View.OnLayoutChangeListener { implements KeyboardAccessoryCoordinator.VisibilityDelegate, View.OnLayoutChangeListener {
private WindowAndroid mWindowAndroid; private WindowAndroid mWindowAndroid;
private Supplier<InsetObserverView> mInsetObserverViewSupplier; private Supplier<InsetObserverView> mInsetObserverViewSupplier;
private boolean mShouldShow = false; private boolean mShouldShow;
private final KeyboardExtensionSizeManager mKeyboardExtensionSizeManager = private final KeyboardExtensionSizeManager mKeyboardExtensionSizeManager =
new KeyboardExtensionSizeManager(); new KeyboardExtensionSizeManager();
......
...@@ -29,10 +29,10 @@ public class AnimatedProgressBar { ...@@ -29,10 +29,10 @@ public class AnimatedProgressBar {
private final int mNormalColor; private final int mNormalColor;
private final int mPulsedColor; private final int mPulsedColor;
private boolean mIsRunningProgressAnimation = false; private boolean mIsRunningProgressAnimation;
private int mLastProgress = 0; private int mLastProgress;
private Queue<ValueAnimator> mPendingIncreaseAnimations = new ArrayDeque<>(); private Queue<ValueAnimator> mPendingIncreaseAnimations = new ArrayDeque<>();
private ValueAnimator mPulseAnimation = null; private ValueAnimator mPulseAnimation;
public AnimatedProgressBar(MaterialProgressBar progressBar, int normalColor, int pulsedColor) { public AnimatedProgressBar(MaterialProgressBar progressBar, int normalColor, int pulsedColor) {
mProgressBar = progressBar; mProgressBar = progressBar;
......
...@@ -101,7 +101,7 @@ class AutofillAssistantUiDelegate { ...@@ -101,7 +101,7 @@ class AutofillAssistantUiDelegate {
private final BottomBarAnimations mBottomBarAnimations; private final BottomBarAnimations mBottomBarAnimations;
private final boolean mIsRightToLeftLayout; private final boolean mIsRightToLeftLayout;
private ValueAnimator mDetailsPulseAnimation = null; private ValueAnimator mDetailsPulseAnimation;
private AutofillAssistantPaymentRequest mPaymentRequest; private AutofillAssistantPaymentRequest mPaymentRequest;
......
...@@ -33,7 +33,7 @@ public class NotificationsPreferences extends PreferenceFragment { ...@@ -33,7 +33,7 @@ public class NotificationsPreferences extends PreferenceFragment {
// The following fields are only set if Feed is disabled, and should be null checked before // The following fields are only set if Feed is disabled, and should be null checked before
// being used. // being used.
private ChromeSwitchPreference mSuggestionsPref; private ChromeSwitchPreference mSuggestionsPref;
private SnippetsBridge mSnippetsBridge = null; private SnippetsBridge mSnippetsBridge;
@Override @Override
public void onCreate(Bundle savedInstanceState) { public void onCreate(Bundle savedInstanceState) {
......
...@@ -41,9 +41,9 @@ public class TabCountProvider { ...@@ -41,9 +41,9 @@ public class TabCountProvider {
*/ */
private TabModelSelectorTabModelObserver mTabModelSelectorTabModelObserver; private TabModelSelectorTabModelObserver mTabModelSelectorTabModelObserver;
private int mTabCount = 0; private int mTabCount;
private boolean mIsIncognito = false; private boolean mIsIncognito;
TabCountProvider() { TabCountProvider() {
mTabCountObservers = new ObserverList<TabCountObserver>(); mTabCountObservers = new ObserverList<TabCountObserver>();
......
...@@ -140,7 +140,7 @@ public class NewTabPageTest { ...@@ -140,7 +140,7 @@ public class NewTabPageTest {
UrlUtils.getIsolatedTestFilePath("/chrome/test/data/android/feed/hello_world.gcl.bin"); UrlUtils.getIsolatedTestFilePath("/chrome/test/data/android/feed/hello_world.gcl.bin");
// Anything not parameterized runs with Feed disabled. // Anything not parameterized runs with Feed disabled.
private boolean mInterestFeedEnabled = false; private boolean mInterestFeedEnabled;
private Tab mTab; private Tab mTab;
private NewTabPage mNtp; private NewTabPage mNtp;
private View mFakebox; private View mFakebox;
......
...@@ -87,7 +87,7 @@ public class FeedActionHandlerTest { ...@@ -87,7 +87,7 @@ public class FeedActionHandlerTest {
@Captor @Captor
ArgumentCaptor<WebContentsObserver> mWebContentsObserverCaptor; ArgumentCaptor<WebContentsObserver> mWebContentsObserverCaptor;
int mLastCommittedEntryIndex = 0; int mLastCommittedEntryIndex;
private FeedActionHandler mActionHandler; private FeedActionHandler mActionHandler;
private void verifyOpenedOffline(int expectedDisposition) { private void verifyOpenedOffline(int expectedDisposition) {
......
...@@ -319,7 +319,7 @@ public class MainActivity extends Activity implements View.OnClickListener { ...@@ -319,7 +319,7 @@ public class MainActivity extends Activity implements View.OnClickListener {
private final String mSpeculationMode; private final String mSpeculationMode;
private final int mDelayToMayLaunchUrl; private final int mDelayToMayLaunchUrl;
private final int mDelayToLaunchUrl; private final int mDelayToLaunchUrl;
public boolean mWarmupCompleted = false; public boolean mWarmupCompleted;
private long mIntentSentMs = NONE; private long mIntentSentMs = NONE;
private long mPageLoadStartedMs = NONE; private long mPageLoadStartedMs = NONE;
private long mPageLoadFinishedMs = NONE; private long mPageLoadFinishedMs = NONE;
......
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