mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-03-01 00:06:47 +00:00
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:
@@ -22,6 +22,8 @@ import android.os.Message;
|
||||
import android.os.MessageQueue;
|
||||
import android.util.Pair;
|
||||
|
||||
import com.android.launcher3.util.Thunk;
|
||||
|
||||
import java.util.LinkedList;
|
||||
import java.util.ListIterator;
|
||||
|
||||
@@ -33,11 +35,11 @@ import java.util.ListIterator;
|
||||
* This class is fifo.
|
||||
*/
|
||||
public class DeferredHandler {
|
||||
private LinkedList<Pair<Runnable, Integer>> mQueue = new LinkedList<Pair<Runnable, Integer>>();
|
||||
@Thunk LinkedList<Pair<Runnable, Integer>> mQueue = new LinkedList<Pair<Runnable, Integer>>();
|
||||
private MessageQueue mMessageQueue = Looper.myQueue();
|
||||
private Impl mHandler = new Impl();
|
||||
|
||||
private class Impl extends Handler implements MessageQueue.IdleHandler {
|
||||
@Thunk class Impl extends Handler implements MessageQueue.IdleHandler {
|
||||
public void handleMessage(Message msg) {
|
||||
Pair<Runnable, Integer> p;
|
||||
Runnable r;
|
||||
|
||||
Reference in New Issue
Block a user