Bug 1047971: Delete redundant initialisers-to-default-values from constructors r=rnewman

This commit is contained in:
Chris Kitching 2014-08-03 21:06:05 -07:00
parent fe0fcb8e82
commit e34153973d
24 changed files with 2 additions and 57 deletions

View File

@ -97,7 +97,6 @@ public class ContactService implements GeckoEventListener {
mEventDispatcher = eventDispatcher;
mActivity = activity;
mContentResolver = mActivity.getContentResolver();
mGotDeviceAccount = false;
EventDispatcher.getInstance().registerGeckoThreadListener(this,
"Android:Contacts:Clear",

View File

@ -74,7 +74,6 @@ class Envelope
public Envelope(int aId, int aParts) {
mId = aId;
mMessageId = -1;
mMessageTimestamp = 0;
mError = GeckoSmsManager.kNoError;
int size = Envelope.SubParts.values().length;

View File

@ -61,7 +61,6 @@ class MemoryMonitor extends BroadcastReceiver {
private MemoryMonitor() {
mPressureDecrementer = new PressureDecrementer();
mMemoryPressure = MEMORY_PRESSURE_NONE;
mStoragePressure = false;
}
public void init(final Context context) {

View File

@ -96,27 +96,14 @@ public class Tab {
public Tab(Context context, int id, String url, boolean external, int parentId, String title) {
mAppContext = context.getApplicationContext();
mId = id;
mLastUsed = 0;
mUrl = url;
mBaseDomain = "";
mUserSearch = "";
mExternal = external;
mParentId = parentId;
mTitle = title == null ? "" : title;
mFavicon = null;
mFaviconUrl = null;
mFaviconSize = 0;
mHasFeeds = false;
mHasOpenSearch = false;
mSiteIdentity = new SiteIdentity();
mReaderEnabled = false;
mEnteringReaderMode = false;
mThumbnail = null;
mHistoryIndex = -1;
mHistorySize = 0;
mBookmark = false;
mReadingListItem = false;
mFaviconLoadId = 0;
mContentType = "";
mZoomConstraints = new ZoomConstraints(false);
mPluginViews = new ArrayList<View>();

View File

@ -57,7 +57,6 @@ class TextSelectionHandle extends ImageView implements View.OnTouchListener {
else
mHandleType = HandleType.END;
mIsRTL = false;
mGeckoPoint = new PointF(0.0f, 0.0f);
mWidth = getResources().getDimensionPixelSize(R.dimen.text_selection_handle_width);

View File

@ -162,8 +162,6 @@ class AnimatorProxy {
mTempMatrix = new Matrix();
mAlpha = 1;
mTranslationX = 0;
mTranslationY = 0;
loadCurrentTransformation(view);

View File

@ -66,7 +66,6 @@ public class PropertyAnimator implements Runnable {
mElementsList = new ArrayList<ElementHolder>();
mFramePoster = FramePoster.create(this);
mUseHardwareLayer = true;
mListeners = null;
}
public void setUseHardwareLayer(boolean useHardwareLayer) {

View File

@ -96,7 +96,6 @@ public class LocalBrowserDB implements BrowserDB.BrowserDBIface {
public LocalBrowserDB(String profile) {
mProfile = profile;
mFolderIdMap = new HashMap<String, Long>();
mDesktopBookmarksExist = null;
mBookmarksUriWithProfile = appendProfile(Bookmarks.CONTENT_URI);
mParentsUriWithProfile = appendProfile(Bookmarks.PARENTS_CONTENT_URI);
@ -1456,8 +1455,6 @@ public class LocalBrowserDB implements BrowserDB.BrowserDBIface {
public SpecialFoldersCursorWrapper(Cursor c, boolean showDesktopBookmarks) {
super(c);
mIndexOffset = 0;
if (showDesktopBookmarks) {
mDesktopBookmarksIndex = mIndexOffset;
mIndexOffset++;

View File

@ -37,7 +37,6 @@ final class DrawTimingQueue {
mMetrics = new DisplayPortMetrics[BUFFER_SIZE];
mTimestamps = new long[BUFFER_SIZE];
mHead = BUFFER_SIZE - 1;
mTail = 0;
}
/**

View File

@ -118,8 +118,6 @@ class GeckoLayerClient implements LayerView.Listener, PanZoomTarget
mCurrentViewTransformMargins = new RectF();
mProgressiveUpdateData = new ProgressiveUpdateData();
mProgressiveUpdateDisplayPort = new DisplayPortMetrics();
mLastProgressiveUpdateWasLowPrecision = false;
mProgressiveUpdateWasInDanger = false;
mForceRedraw = true;
DisplayMetrics displayMetrics = context.getResources().getDisplayMetrics();

View File

@ -155,7 +155,6 @@ class JavaPanZoomController
String[] prefs = { "ui.scrolling.axis_lock_mode",
"ui.scrolling.negate_wheel_scrollY",
"ui.scrolling.gamepad_dead_zone" };
mNegateWheelScrollY = false;
PrefsHelper.getPrefs(prefs, new PrefsHelper.PrefHandlerBase() {
@Override public void prefValue(String pref, String value) {
if (pref.equals("ui.scrolling.axis_lock_mode")) {

View File

@ -23,12 +23,6 @@ public class ViewTransform {
x = inX;
y = inY;
scale = inScale;
fixedLayerMarginLeft = 0;
fixedLayerMarginTop = 0;
fixedLayerMarginRight = 0;
fixedLayerMarginBottom = 0;
offsetX = 0;
offsetY = 0;
}
}

View File

@ -772,7 +772,6 @@ public class BrowserSearch extends HomeFragment
super(context);
mSuggestClient = suggestClient;
mSearchTerm = searchTerm;
mSuggestions = null;
}
@Override

View File

@ -1072,9 +1072,7 @@ public final class HomeConfig {
mConfigMap = new HashMap<String, PanelConfig>();
mConfigOrder = new LinkedList<String>();
mEventQueue = new LinkedList<GeckoEvent>();
mEnabledCount = 0;
mHasChanged = false;
mIsFromDefault = configState.isDefault();
initFromState(configState);

View File

@ -60,7 +60,6 @@ public class SuggestClient {
@RobocopTarget
public SuggestClient(Context context, String suggestTemplate, int timeout) {
this(context, suggestTemplate, timeout, Integer.MAX_VALUE);
mCheckNetwork = false;
}
/**

View File

@ -90,8 +90,6 @@ public class TopSitesGridView extends GridView {
mHorizontalSpacing = a.getDimensionPixelOffset(R.styleable.TopSitesGridView_android_horizontalSpacing, 0x00);
mVerticalSpacing = a.getDimensionPixelOffset(R.styleable.TopSitesGridView_android_verticalSpacing, 0x00);
a.recycle();
mIsHandlingFocusChange = false;
}
/**

View File

@ -110,10 +110,6 @@ public class TopSitesPanel extends HomeFragment {
return new TopSitesPanel();
}
public TopSitesPanel() {
mUrlOpenListener = null;
}
private static boolean logDebug = Log.isLoggable(LOGTAG, Log.DEBUG);
private static boolean logVerbose = Log.isLoggable(LOGTAG, Log.VERBOSE);

View File

@ -133,7 +133,6 @@ public class GeckoMenu extends ListView
setAdapter(mAdapter);
setOnItemClickListener(this);
mShowIcons = false;
mItems = new ArrayList<GeckoMenuItem>();
mPrimaryActionItems = new HashMap<GeckoMenuItem, View>();
mSecondaryActionItems = new HashMap<GeckoMenuItem, View>();

View File

@ -21,7 +21,6 @@ public class NativeZip implements NativeReference {
public NativeZip(String path) {
mObj = getZip(path);
mInput = null;
}
public NativeZip(InputStream input) {

View File

@ -100,10 +100,6 @@ public class TabsPanel extends LinearLayout
setOrientation(LinearLayout.VERTICAL);
mCurrentPanel = Panel.NORMAL_TABS;
mVisible = false;
mHeaderVisible = false;
mIsSideBar = false;
mPopupMenu = new GeckoPopupMenu(context);
mPopupMenu.inflate(R.menu.tabs_menu);

View File

@ -510,8 +510,6 @@ class TabsTray extends TwoWayView
private boolean mEnabled;
public TabSwipeGestureListener() {
mSwipeView = null;
mSwiping = false;
mEnabled = true;
ViewConfiguration vc = ViewConfiguration.get(TabsTray.this.getContext());

View File

@ -182,7 +182,6 @@ public class BrowserToolbar extends ThemedRelativeLayout
Tabs.registerOnTabsChangedListener(this);
isSwitchingTabs = true;
isAnimatingEntry = false;
EventDispatcher.getInstance().registerGeckoThreadListener(this,
"Reader:Click",
@ -198,8 +197,7 @@ public class BrowserToolbar extends ThemedRelativeLayout
urlBarEntryDefaultLayoutParams = (RelativeLayout.LayoutParams) urlBarEntry.getLayoutParams();
// API level 19 adds a RelativeLayout.LayoutParams copy constructor, so we explicitly cast
// to ViewGroup.MarginLayoutParams to ensure consistency across platforms.
urlBarEntryShrunkenLayoutParams = new RelativeLayout.LayoutParams(
(ViewGroup.MarginLayoutParams) urlBarEntryDefaultLayoutParams);
urlBarEntryShrunkenLayoutParams = new RelativeLayout.LayoutParams(urlBarEntryDefaultLayoutParams);
// Note: a shrunken phone layout is not displayed on any known devices,
// and thus shrunken layout params for phone are not maintained.
if (HardwareUtils.isTablet()) {
@ -488,7 +486,7 @@ public class BrowserToolbar extends ThemedRelativeLayout
@Override
public boolean onTouchEvent(MotionEvent event) {
// If the motion event has occured below the toolbar (due to the scroll
// If the motion event has occurred below the toolbar (due to the scroll
// offset), let it pass through to the page.
if (event != null && event.getY() > getHeight() + ViewHelper.getTranslationY(this)) {
return false;

View File

@ -29,7 +29,6 @@ class ToolbarTitlePrefs {
private Integer mPrefObserverId;
ToolbarTitlePrefs() {
mShowUrl = false;
mTrimUrls = true;
mPrefObserverId = PrefsHelper.getPrefs(prefs, new TitlePrefsHandler());

View File

@ -19,7 +19,6 @@ public class TabRow extends LinearLayout
public TabRow(Context context, AttributeSet attrs) {
super(context, attrs);
mChecked = false;
}
@Override