diff options
author | Adam Cohen <adamcohen@google.com> | 2015-03-18 14:16:05 -0700 |
---|---|---|
committer | Adam Cohen <adamcohen@google.com> | 2015-03-20 11:15:54 -0700 |
commit | 091440a9cb9d4f42406631004aa484cbb79214ca (patch) | |
tree | 828aaa4033c73fe84a2e7e567c9cc4909c5a014f /WallpaperPicker/src/com/android/launcher3/WallpaperCropActivity.java | |
parent | f846b9054c90e73cb824310e75ea904b5a459c01 (diff) | |
download | android_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 'WallpaperPicker/src/com/android/launcher3/WallpaperCropActivity.java')
-rw-r--r-- | WallpaperPicker/src/com/android/launcher3/WallpaperCropActivity.java | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/WallpaperPicker/src/com/android/launcher3/WallpaperCropActivity.java b/WallpaperPicker/src/com/android/launcher3/WallpaperCropActivity.java index a3a3c537b..5b2943a65 100644 --- a/WallpaperPicker/src/com/android/launcher3/WallpaperCropActivity.java +++ b/WallpaperPicker/src/com/android/launcher3/WallpaperCropActivity.java @@ -44,6 +44,7 @@ import android.widget.Toast; import com.android.gallery3d.common.BitmapCropTask; import com.android.gallery3d.common.BitmapUtils; import com.android.gallery3d.common.Utils; +import com.android.launcher3.util.Thunk; import com.android.photos.BitmapRegionTileSource; import com.android.photos.BitmapRegionTileSource.BitmapSource; import com.android.photos.BitmapRegionTileSource.BitmapSource.InBitmapProvider; @@ -78,10 +79,10 @@ public class WallpaperCropActivity extends Activity implements Handler.Callback private HandlerThread mLoaderThread; private Handler mLoaderHandler; - private LoadRequest mCurrentLoadRequest; + @Thunk LoadRequest mCurrentLoadRequest; private byte[] mTempStorageForDecoding = new byte[16 * 1024]; // A weak-set of reusable bitmaps - private Set<Bitmap> mReusableBitmaps = + @Thunk Set<Bitmap> mReusableBitmaps = Collections.newSetFromMap(new WeakHashMap<Bitmap, Boolean>()); @Override @@ -220,7 +221,7 @@ public class WallpaperCropActivity extends Activity implements Handler.Callback return false; } - private void addReusableBitmap(TileSource src) { + @Thunk void addReusableBitmap(TileSource src) { synchronized (mReusableBitmaps) { if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT && src instanceof BitmapRegionTileSource) { |