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
This commit is contained in:
1 parent
f846b9054c
commit
091440a9cb
44 files changed
+364
-260
No files matched your search
@@ -25,6 +25,7 @@ import android.view.ViewGroup;
|
||||
|
||||
import com.android.launcher3.FocusHelper.PagedViewKeyListener;
|
||||
import com.android.launcher3.util.FocusLogic;
|
||||
import com.android.launcher3.util.Thunk;
|
||||
|
||||
/**
|
||||
* A keyboard listener we set on all the workspace icons.
|
||||
@@ -480,7 +481,7 @@ public class FocusHelper {
|
||||
/**
|
||||
* Returns the Viewgroup containing page contents for the page at the index specified.
|
||||
*/
|
||||
private static ViewGroup getAppsCustomizePage(ViewGroup container, int index) {
|
||||
@Thunk static ViewGroup getAppsCustomizePage(ViewGroup container, int index) {
|
||||
ViewGroup page = (ViewGroup) ((PagedView) container).getPageAt(index);
|
||||
if (page instanceof CellLayout) {
|
||||
// There are two layers, a PagedViewCellLayout and PagedViewCellLayoutChildren
|
||||
@@ -510,7 +511,7 @@ public class FocusHelper {
|
||||
/**
|
||||
* Helper method to be used for playing sound effects.
|
||||
*/
|
||||
private static void playSoundEffect(int keyCode, View v) {
|
||||
@Thunk static void playSoundEffect(int keyCode, View v) {
|
||||
switch (keyCode) {
|
||||
case KeyEvent.KEYCODE_DPAD_LEFT:
|
||||
v.playSoundEffect(SoundEffectConstants.NAVIGATION_LEFT);
|
||||
|
||||
Reference in new issue
Block a user