summaryrefslogtreecommitdiffstats
path: root/src/com/android/launcher3/PagedView.java
diff options
context:
space:
mode:
authorAdam Cohen <adamcohen@google.com>2015-03-18 14:16:05 -0700
committerAdam Cohen <adamcohen@google.com>2015-03-20 11:15:54 -0700
commit091440a9cb9d4f42406631004aa484cbb79214ca (patch)
tree828aaa4033c73fe84a2e7e567c9cc4909c5a014f /src/com/android/launcher3/PagedView.java
parentf846b9054c90e73cb824310e75ea904b5a459c01 (diff)
downloadandroid_packages_apps_Trebuchet-091440a9cb9d4f42406631004aa484cbb79214ca.tar.gz
android_packages_apps_Trebuchet-091440a9cb9d4f42406631004aa484cbb79214ca.tar.bz2
android_packages_apps_Trebuchet-091440a9cb9d4f42406631004aa484cbb79214ca.zip
Reducing method count by eliminating synthetic accessors
Elimates 304 methods based on dex analysis The java compiler generates sythetic accessor methods for all private fields, methods and contructors accessed from inner classes. By marking them package-private and @Thunk instead, sythentic accessor methods are no longer needeed. These annotated elements should be treated as private. Change-Id: Id0dc2c92733474250d8ff12fa793d3a8adeb1f26
Diffstat (limited to 'src/com/android/launcher3/PagedView.java')
-rw-r--r--src/com/android/launcher3/PagedView.java20
1 files changed, 11 insertions, 9 deletions
diff --git a/src/com/android/launcher3/PagedView.java b/src/com/android/launcher3/PagedView.java
index 7d65f4686..e7049e2ac 100644
--- a/src/com/android/launcher3/PagedView.java
+++ b/src/com/android/launcher3/PagedView.java
@@ -51,6 +51,8 @@ import android.view.animation.DecelerateInterpolator;
import android.view.animation.Interpolator;
import android.view.animation.LinearInterpolator;
+import com.android.launcher3.util.Thunk;
+
import java.util.ArrayList;
interface Page {
@@ -124,7 +126,7 @@ public abstract class PagedView extends ViewGroup implements ViewGroup.OnHierarc
protected LauncherScroller mScroller;
private Interpolator mDefaultInterpolator;
private VelocityTracker mVelocityTracker;
- private int mPageSpacing = 0;
+ @Thunk int mPageSpacing = 0;
private float mParentDownMotionX;
private float mParentDownMotionY;
@@ -207,8 +209,8 @@ public abstract class PagedView extends ViewGroup implements ViewGroup.OnHierarc
private boolean mWasInOverscroll = false;
// Page Indicator
- private int mPageIndicatorViewId;
- private PageIndicator mPageIndicator;
+ @Thunk int mPageIndicatorViewId;
+ @Thunk PageIndicator mPageIndicator;
private boolean mAllowPagedViewAnimations = true;
// The viewport whether the pages are to be contained (the actual view may be larger than the
@@ -227,7 +229,7 @@ public abstract class PagedView extends ViewGroup implements ViewGroup.OnHierarc
protected View mDragView;
protected AnimatorSet mZoomInOutAnim;
private Runnable mSidePageHoverRunnable;
- private int mSidePageHoverIndex = -1;
+ @Thunk int mSidePageHoverIndex = -1;
// This variable's scope is only for the duration of startReordering() and endReordering()
private boolean mReorderingStarted = false;
// This variable's scope is for the duration of startReordering() and after the zoomIn()
@@ -246,14 +248,14 @@ public abstract class PagedView extends ViewGroup implements ViewGroup.OnHierarc
private Rect mAltTmpRect = new Rect();
// Fling to delete
- private int FLING_TO_DELETE_FADE_OUT_DURATION = 350;
+ @Thunk int FLING_TO_DELETE_FADE_OUT_DURATION = 350;
private float FLING_TO_DELETE_FRICTION = 0.035f;
// The degrees specifies how much deviation from the up vector to still consider a fling "up"
private float FLING_TO_DELETE_MAX_FLING_DEGREES = 65f;
protected int mFlingToDeleteThresholdVelocity = -1400;
// Drag to delete
- private boolean mDeferringForDelete = false;
- private int DELETE_SLIDE_IN_SIDE_PAGE_DURATION = 250;
+ @Thunk boolean mDeferringForDelete = false;
+ @Thunk int DELETE_SLIDE_IN_SIDE_PAGE_DURATION = 250;
private int DRAG_TO_DELETE_FADE_OUT_DURATION = 350;
// Drop to delete
@@ -2356,7 +2358,7 @@ public abstract class PagedView extends ViewGroup implements ViewGroup.OnHierarc
super(superState);
}
- private SavedState(Parcel in) {
+ @Thunk SavedState(Parcel in) {
super(in);
currentPage = in.readInt();
}
@@ -2514,7 +2516,7 @@ public abstract class PagedView extends ViewGroup implements ViewGroup.OnHierarc
invalidate();
}
- private void onPostReorderingAnimationCompleted() {
+ @Thunk void onPostReorderingAnimationCompleted() {
// Trigger the callback when reordering has settled
--mPostReorderingPreZoomInRemainingAnimationCount;
if (mPostReorderingPreZoomInRunnable != null &&