Commit 3eb6408e authored by Natalie Chouinard's avatar Natalie Chouinard Committed by Commit Bot

Resolve settings presubmit errors

Fix some of the more trivial presubmit warnings and  errors in the
preferences package. This will reduce the number of failures we'll need
to bypass in the upcoming package renaming.

Bug: 1027271
Change-Id: I5bda8192c91158d281f214a4d91e907f058a24d7
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1935716Reviewed-by: default avatarGang Wu <gangwu@chromium.org>
Commit-Queue: Natalie Chouinard <chouinard@chromium.org>
Cr-Commit-Position: refs/heads/master@{#719390}
parent 1044617e
......@@ -113,8 +113,9 @@ public class PreferenceUtils {
*/
private static boolean isOverflowMenuButton(View button, ActionMenuView parentMenu) {
if (button == null) return false;
if (!(button instanceof ImageView))
if (!(button instanceof ImageView)) {
return false; // Normal items are usually TextView or LinearLayouts.
}
ImageView imageButton = (ImageView) button;
return imageButton.getDrawable() == parentMenu.getOverflowIcon();
}
......
......@@ -22,8 +22,8 @@ import org.chromium.chrome.browser.widget.prefeditor.EditorObserverForTest;
* Launches the UI to edit, create or delete an Autofill profile entry.
*/
public class AutofillProfileEditorPreference extends Preference {
final private Activity mActivity;
final private EditorObserverForTest mObserverForTest;
private final Activity mActivity;
private final EditorObserverForTest mObserverForTest;
private EditorDialog mEditorDialog;
private AutofillAddress mAutofillAddress;
private String mGUID;
......
......@@ -23,7 +23,7 @@ public class BandwidthType {
int NUM_ENTRIES = 3;
}
private final static String[] TITLES = {
private static final String[] TITLES = {
"never_prefetch", "prefetch_on_wifi", "always_prefetch"};
/**
......
......@@ -81,8 +81,9 @@ public class ClearBrowsingDataFetcher
* shown yet.
*/
public void requestInfoAboutOtherFormsOfBrowsingHistory() {
if (!OtherFormsOfHistoryDialogFragment.wasDialogShown())
if (!OtherFormsOfHistoryDialogFragment.wasDialogShown()) {
BrowsingDataBridge.getInstance().requestInfoAboutOtherFormsOfBrowsingHistory(this);
}
}
/**
......
......@@ -17,7 +17,7 @@ import androidx.annotation.Nullable;
*/
public class ContentSetting {
// Indexed by {@link ContentSettingValues}.
private final static String[] STRING_VALUES = {
private static final String[] STRING_VALUES = {
"DEFAULT", // ContentSettingValues.DEFAULT
"ALLOW", // ContentSettingValues.ALLOW
"BLOCK", // ContentSettingValues.BLOCK
......
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