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 /src/com/android/launcher3/AutoInstallsLayout.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 'src/com/android/launcher3/AutoInstallsLayout.java')
-rw-r--r-- | src/com/android/launcher3/AutoInstallsLayout.java | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/com/android/launcher3/AutoInstallsLayout.java b/src/com/android/launcher3/AutoInstallsLayout.java index 908bd3d79..cbab08bec 100644 --- a/src/com/android/launcher3/AutoInstallsLayout.java +++ b/src/com/android/launcher3/AutoInstallsLayout.java @@ -37,6 +37,7 @@ import android.util.Patterns; import com.android.launcher3.LauncherProvider.SqlArguments; import com.android.launcher3.LauncherSettings.Favorites; +import com.android.launcher3.util.Thunk; import org.xmlpull.v1.XmlPullParser; import org.xmlpull.v1.XmlPullParserException; @@ -114,8 +115,8 @@ public class AutoInstallsLayout { private static final String ACTION_APPWIDGET_DEFAULT_WORKSPACE_CONFIGURE = "com.android.launcher.action.APPWIDGET_DEFAULT_WORKSPACE_CONFIGURE"; - private final Context mContext; - private final AppWidgetHost mAppWidgetHost; + @Thunk final Context mContext; + @Thunk final AppWidgetHost mAppWidgetHost; protected final LayoutParserCallback mCallback; protected final PackageManager mPackageManager; @@ -125,7 +126,7 @@ public class AutoInstallsLayout { private final int mHotseatAllAppsRank; private final long[] mTemp = new long[2]; - private final ContentValues mValues; + @Thunk final ContentValues mValues; protected final String mRootTag; protected SQLiteDatabase mDb; @@ -648,7 +649,7 @@ public class AutoInstallsLayout { long insertAndCheck(SQLiteDatabase db, ContentValues values); } - private static void copyInteger(ContentValues from, ContentValues to, String key) { + @Thunk static void copyInteger(ContentValues from, ContentValues to, String key) { to.put(key, from.getAsInteger(key)); } } |