From 6e7e82ed9b84c6b6c3831dcd90ba9e5224ae053c Mon Sep 17 00:00:00 2001 From: Alex Deaconu Date: Sat, 19 Apr 2014 15:17:17 +0300 Subject: [PATCH] Bug 959185 - Changed access modifiers of methods and variables unused outside toolbar package from 'public' to 'default' or 'private'. r=vp --- mobile/android/base/toolbar/BrowserToolbar.java | 6 +++--- mobile/android/base/toolbar/CanvasDelegate.java | 10 +++++----- mobile/android/base/toolbar/PageActionLayout.java | 8 ++++---- mobile/android/base/toolbar/TabCounter.java | 4 ++-- mobile/android/base/toolbar/ToolbarDisplayLayout.java | 2 +- mobile/android/base/toolbar/ToolbarTitlePrefs.java | 4 ++-- 6 files changed, 17 insertions(+), 17 deletions(-) diff --git a/mobile/android/base/toolbar/BrowserToolbar.java b/mobile/android/base/toolbar/BrowserToolbar.java index c9fa7c0ad8be..e722e48035ca 100644 --- a/mobile/android/base/toolbar/BrowserToolbar.java +++ b/mobile/android/base/toolbar/BrowserToolbar.java @@ -146,7 +146,7 @@ public class BrowserToolbar extends ThemedRelativeLayout private OnStartEditingListener startEditingListener; private OnStopEditingListener stopEditingListener; - final private BrowserApp activity; + private final BrowserApp activity; private boolean hasSoftMenuButton; private UIMode uiMode; @@ -581,7 +581,7 @@ public class BrowserToolbar extends ThemedRelativeLayout } } - public boolean isVisible() { + private boolean isVisible() { return ViewHelper.getTranslationY(this) == 0; } @@ -1200,7 +1200,7 @@ public class BrowserToolbar extends ThemedRelativeLayout contentAnimator.start(); } - public void setButtonEnabled(ImageButton button, boolean enabled) { + private void setButtonEnabled(ImageButton button, boolean enabled) { final Drawable drawable = button.getDrawable(); if (drawable != null) { // This alpha value has to be in sync with the one used diff --git a/mobile/android/base/toolbar/CanvasDelegate.java b/mobile/android/base/toolbar/CanvasDelegate.java index 2c0539be1d68..61d777e62785 100644 --- a/mobile/android/base/toolbar/CanvasDelegate.java +++ b/mobile/android/base/toolbar/CanvasDelegate.java @@ -13,17 +13,17 @@ import android.graphics.PorterDuffXfermode; import android.graphics.Shader; import android.os.Build; -public class CanvasDelegate { +class CanvasDelegate { Paint mPaint; PorterDuffXfermode mMode; DrawManager mDrawManager; // DrawManager would do a default draw of the background. - public static interface DrawManager { + static interface DrawManager { public void defaultDraw(Canvas cavas); } - public CanvasDelegate(DrawManager drawManager, Mode mode) { + CanvasDelegate(DrawManager drawManager, Mode mode) { mDrawManager = drawManager; // DST_IN masks, DST_OUT clips. @@ -35,7 +35,7 @@ public class CanvasDelegate { mPaint.setStrokeWidth(0.0f); } - public void draw(Canvas canvas, Path path, int width, int height) { + void draw(Canvas canvas, Path path, int width, int height) { // Save the canvas. All PorterDuff operations should be done in a offscreen bitmap. int count = canvas.saveLayer(0, 0, width, height, null, Canvas.MATRIX_SAVE_FLAG | @@ -70,7 +70,7 @@ public class CanvasDelegate { canvas.restoreToCount(count); } - public void setShader(Shader shader) { + void setShader(Shader shader) { mPaint.setShader(shader); } } diff --git a/mobile/android/base/toolbar/PageActionLayout.java b/mobile/android/base/toolbar/PageActionLayout.java index 4a0e678f133d..ea81307593a1 100644 --- a/mobile/android/base/toolbar/PageActionLayout.java +++ b/mobile/android/base/toolbar/PageActionLayout.java @@ -64,7 +64,7 @@ public class PageActionLayout extends LinearLayout implements GeckoEventListener registerEventListener("PageActions:Remove"); } - public void setNumberShown(int count) { + private void setNumberShown(int count) { mMaxVisiblePageActions = count; for(int index = 0; index < count; index++) { @@ -118,7 +118,7 @@ public class PageActionLayout extends LinearLayout implements GeckoEventListener } } - public void addPageAction(final String id, final String title, final String imageData, final OnPageActionClickListeners mOnPageActionClickListeners, boolean mImportant) { + private void addPageAction(final String id, final String title, final String imageData, final OnPageActionClickListeners mOnPageActionClickListeners, boolean mImportant) { final PageAction pageAction = new PageAction(id, title, null, mOnPageActionClickListeners, mImportant); int insertAt = mPageActionList.size(); @@ -138,7 +138,7 @@ public class PageActionLayout extends LinearLayout implements GeckoEventListener }); } - public void removePageAction(String id) { + private void removePageAction(String id) { for(int i = 0; i < mPageActionList.size(); i++) { if (mPageActionList.get(i).getID().equals(id)) { mPageActionList.remove(i); @@ -291,7 +291,7 @@ public class PageActionLayout extends LinearLayout implements GeckoEventListener mPageActionsMenu.show(); } - public static interface OnPageActionClickListeners { + private static interface OnPageActionClickListeners { public void onClick(String id); public boolean onLongClick(String id); } diff --git a/mobile/android/base/toolbar/TabCounter.java b/mobile/android/base/toolbar/TabCounter.java index b38a5c731b31..5670765854aa 100644 --- a/mobile/android/base/toolbar/TabCounter.java +++ b/mobile/android/base/toolbar/TabCounter.java @@ -67,7 +67,7 @@ public class TabCounter extends ThemedTextSwitcher } } - public void setCountWithAnimation(int count) { + void setCountWithAnimation(int count) { // Don't animate from initial state if (mCount == 0) { setCount(count); @@ -97,7 +97,7 @@ public class TabCounter extends ThemedTextSwitcher mCount = count; } - public void setCount(int count) { + void setCount(int count) { setCurrentText(String.valueOf(count)); mCount = count; } diff --git a/mobile/android/base/toolbar/ToolbarDisplayLayout.java b/mobile/android/base/toolbar/ToolbarDisplayLayout.java index 018bc4b03110..cebbadf1698a 100644 --- a/mobile/android/base/toolbar/ToolbarDisplayLayout.java +++ b/mobile/android/base/toolbar/ToolbarDisplayLayout.java @@ -95,7 +95,7 @@ public class ToolbarDisplayLayout extends ThemedLinearLayout public void onTitleChange(CharSequence title); } - final private BrowserApp mActivity; + private final BrowserApp mActivity; private UIMode mUiMode; diff --git a/mobile/android/base/toolbar/ToolbarTitlePrefs.java b/mobile/android/base/toolbar/ToolbarTitlePrefs.java index ca129487c354..e209a082f04f 100644 --- a/mobile/android/base/toolbar/ToolbarTitlePrefs.java +++ b/mobile/android/base/toolbar/ToolbarTitlePrefs.java @@ -11,8 +11,8 @@ import org.mozilla.gecko.Tabs; import org.mozilla.gecko.util.ThreadUtils; class ToolbarTitlePrefs { - public static final String PREF_TITLEBAR_MODE = "browser.chrome.titlebarMode"; - public static final String PREF_TRIM_URLS = "browser.urlbar.trimURLs"; + static final String PREF_TITLEBAR_MODE = "browser.chrome.titlebarMode"; + static final String PREF_TRIM_URLS = "browser.urlbar.trimURLs"; interface OnChangeListener { public void onChange();