Commit 7ead6c96 authored by marcin's avatar marcin Committed by Commit Bot

Removing overshadowing variable from superclass

Changing names of variables from subclass
to make them different from variables in superclass
(which will remove Prone warnings)

Bug: 
Change-Id: I3591cb6b64062c94e9f84f30dd505d0c31fbf3d2
Reviewed-on: https://chromium-review.googlesource.com/802435Reviewed-by: default avatarTheresa <twellington@chromium.org>
Commit-Queue: Marcin Wiącek <marcin@mwiacek.com>
Cr-Commit-Position: refs/heads/master@{#520962}
parent 46a41a80
...@@ -56,7 +56,7 @@ public class DownloadItemView extends SelectableItemView<DownloadHistoryItemWrap ...@@ -56,7 +56,7 @@ public class DownloadItemView extends SelectableItemView<DownloadHistoryItemWrap
// Controls for completed downloads. // Controls for completed downloads.
private View mLayoutCompleted; private View mLayoutCompleted;
private TextView mFilenameCompletedView; private TextView mFilenameCompletedView;
private TextView mDescriptionView; private TextView mDescriptionCompletedView;
// Controls for in-progress downloads. // Controls for in-progress downloads.
private View mLayoutInProgress; private View mLayoutInProgress;
...@@ -103,7 +103,7 @@ public class DownloadItemView extends SelectableItemView<DownloadHistoryItemWrap ...@@ -103,7 +103,7 @@ public class DownloadItemView extends SelectableItemView<DownloadHistoryItemWrap
mLayoutInProgress = findViewById(R.id.progress_layout); mLayoutInProgress = findViewById(R.id.progress_layout);
mFilenameCompletedView = (TextView) findViewById(R.id.filename_completed_view); mFilenameCompletedView = (TextView) findViewById(R.id.filename_completed_view);
mDescriptionView = (TextView) findViewById(R.id.description_view); mDescriptionCompletedView = (TextView) findViewById(R.id.description_view);
mFilenameInProgressView = (TextView) findViewById(R.id.filename_progress_view); mFilenameInProgressView = (TextView) findViewById(R.id.filename_progress_view);
mDownloadStatusView = (TextView) findViewById(R.id.status_view); mDownloadStatusView = (TextView) findViewById(R.id.status_view);
...@@ -189,13 +189,13 @@ public class DownloadItemView extends SelectableItemView<DownloadHistoryItemWrap ...@@ -189,13 +189,13 @@ public class DownloadItemView extends SelectableItemView<DownloadHistoryItemWrap
if (mThumbnailBitmap == null) updateIconView(); if (mThumbnailBitmap == null) updateIconView();
Context context = mDescriptionView.getContext(); Context context = mDescriptionCompletedView.getContext();
mFilenameCompletedView.setText(item.getDisplayFileName()); mFilenameCompletedView.setText(item.getDisplayFileName());
mFilenameInProgressView.setText(item.getDisplayFileName()); mFilenameInProgressView.setText(item.getDisplayFileName());
String description = String.format(Locale.getDefault(), "%s - %s", String description = String.format(Locale.getDefault(), "%s - %s",
Formatter.formatFileSize(context, item.getFileSize()), item.getDisplayHostname()); Formatter.formatFileSize(context, item.getFileSize()), item.getDisplayHostname());
mDescriptionView.setText(description); mDescriptionCompletedView.setText(description);
if (item.isComplete()) { if (item.isComplete()) {
showLayout(mLayoutCompleted); showLayout(mLayoutCompleted);
......
...@@ -41,9 +41,9 @@ public class OfflineGroupHeaderView ...@@ -41,9 +41,9 @@ public class OfflineGroupHeaderView
private DownloadHistoryAdapter mAdapter; private DownloadHistoryAdapter mAdapter;
private DownloadItemSelectionDelegate mSelectionDelegate; private DownloadItemSelectionDelegate mSelectionDelegate;
private TextView mDescriptionView; private TextView mDescriptionTextView;
private ImageView mExpandImage; private ImageView mExpandImage;
private TintedImageView mIconView; private TintedImageView mIconImageView;
public OfflineGroupHeaderView(Context context, AttributeSet attrs) { public OfflineGroupHeaderView(Context context, AttributeSet attrs) {
super(context, attrs); super(context, attrs);
...@@ -65,8 +65,8 @@ public class OfflineGroupHeaderView ...@@ -65,8 +65,8 @@ public class OfflineGroupHeaderView
protected void onFinishInflate() { protected void onFinishInflate() {
super.onFinishInflate(); super.onFinishInflate();
mIconView = (TintedImageView) findViewById(R.id.icon_view); mIconImageView = (TintedImageView) findViewById(R.id.icon_view);
mDescriptionView = (TextView) findViewById(R.id.description); mDescriptionTextView = (TextView) findViewById(R.id.description);
mExpandImage = (ImageView) findViewById(R.id.expand_icon); mExpandImage = (ImageView) findViewById(R.id.expand_icon);
} }
...@@ -102,7 +102,7 @@ public class OfflineGroupHeaderView ...@@ -102,7 +102,7 @@ public class OfflineGroupHeaderView
String description = String.format(Locale.getDefault(), "%s - %s", String description = String.format(Locale.getDefault(), "%s - %s",
Formatter.formatFileSize(getContext(), header.getTotalFileSize()), Formatter.formatFileSize(getContext(), header.getTotalFileSize()),
getContext().getString(R.string.download_manager_offline_header_description)); getContext().getString(R.string.download_manager_offline_header_description));
mDescriptionView.setText(description); mDescriptionTextView.setText(description);
updateExpandIcon(header.isExpanded()); updateExpandIcon(header.isExpanded());
setChecked(mSelectionDelegate.isHeaderSelected(header)); setChecked(mSelectionDelegate.isHeaderSelected(header));
} }
...@@ -117,26 +117,26 @@ public class OfflineGroupHeaderView ...@@ -117,26 +117,26 @@ public class OfflineGroupHeaderView
private void updateCheckIcon(boolean checked) { private void updateCheckIcon(boolean checked) {
if (checked) { if (checked) {
if (FeatureUtilities.isChromeHomeEnabled()) { if (FeatureUtilities.isChromeHomeEnabled()) {
mIconView.setBackgroundResource(mIconBackgroundResId); mIconImageView.setBackgroundResource(mIconBackgroundResId);
mIconView.getBackground().setLevel( mIconImageView.getBackground().setLevel(
getResources().getInteger(R.integer.list_item_level_selected)); getResources().getInteger(R.integer.list_item_level_selected));
} else { } else {
mIconView.setBackgroundColor(mIconBackgroundColorSelected); mIconImageView.setBackgroundColor(mIconBackgroundColorSelected);
} }
mIconView.setImageResource(R.drawable.ic_check_googblue_24dp); mIconImageView.setImageResource(R.drawable.ic_check_googblue_24dp);
mIconView.setTint(mCheckedIconForegroundColorList); mIconImageView.setTint(mCheckedIconForegroundColorList);
} else { } else {
if (FeatureUtilities.isChromeHomeEnabled()) { if (FeatureUtilities.isChromeHomeEnabled()) {
mIconView.setBackgroundResource(mIconBackgroundResId); mIconImageView.setBackgroundResource(mIconBackgroundResId);
mIconView.getBackground().setLevel( mIconImageView.getBackground().setLevel(
getResources().getInteger(R.integer.list_item_level_default)); getResources().getInteger(R.integer.list_item_level_default));
} else { } else {
mIconView.setBackgroundColor(mIconBackgroundColor); mIconImageView.setBackgroundColor(mIconBackgroundColor);
} }
mIconView.setImageResource(R.drawable.ic_chrome); mIconImageView.setImageResource(R.drawable.ic_chrome);
mIconView.setTint(mIconForegroundColorList); mIconImageView.setTint(mIconForegroundColorList);
} }
} }
......
...@@ -34,7 +34,7 @@ import org.chromium.chrome.browser.widget.accessibility.AccessibilityTabModelWra ...@@ -34,7 +34,7 @@ import org.chromium.chrome.browser.widget.accessibility.AccessibilityTabModelWra
*/ */
public class OverviewListLayout extends Layout implements AccessibilityTabModelAdapterListener { public class OverviewListLayout extends Layout implements AccessibilityTabModelAdapterListener {
private AccessibilityTabModelWrapper mTabModelWrapper; private AccessibilityTabModelWrapper mTabModelWrapper;
private final float mDpToPx; private final float mDensity;
private final BlackHoleEventFilter mBlackHoleEventFilter; private final BlackHoleEventFilter mBlackHoleEventFilter;
private final SceneLayer mSceneLayer; private final SceneLayer mSceneLayer;
...@@ -42,7 +42,7 @@ public class OverviewListLayout extends Layout implements AccessibilityTabModelA ...@@ -42,7 +42,7 @@ public class OverviewListLayout extends Layout implements AccessibilityTabModelA
Context context, LayoutUpdateHost updateHost, LayoutRenderHost renderHost) { Context context, LayoutUpdateHost updateHost, LayoutRenderHost renderHost) {
super(context, updateHost, renderHost); super(context, updateHost, renderHost);
mBlackHoleEventFilter = new BlackHoleEventFilter(context); mBlackHoleEventFilter = new BlackHoleEventFilter(context);
mDpToPx = context.getResources().getDisplayMetrics().density; mDensity = context.getResources().getDisplayMetrics().density;
mSceneLayer = new SceneLayer(); mSceneLayer = new SceneLayer();
} }
...@@ -81,7 +81,7 @@ public class OverviewListLayout extends Layout implements AccessibilityTabModelA ...@@ -81,7 +81,7 @@ public class OverviewListLayout extends Layout implements AccessibilityTabModelA
(FrameLayout.LayoutParams) mTabModelWrapper.getLayoutParams(); (FrameLayout.LayoutParams) mTabModelWrapper.getLayoutParams();
if (params == null) return; if (params == null) return;
int margin = (int) ((getHeight() - getHeightMinusBrowserControls()) * mDpToPx); int margin = (int) ((getHeight() - getHeightMinusBrowserControls()) * mDensity);
if (FeatureUtilities.isChromeHomeEnabled()) { if (FeatureUtilities.isChromeHomeEnabled()) {
params.bottomMargin = margin; params.bottomMargin = margin;
} else { } else {
......
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