optimizing Android Plugin.java