Java.perform(function(){ function showStacks(){ console.log( Java.use("android.util.Log") .getStackTraceString( Java.use("java.util.Throwable").$new() ) ); } var collections = Java.use("java.util.Collections"); collections.sort.overload('java.util.List').implementation = function(a){ showStacks(); var result = Java.cast(a,Java.use("java.util.ArrayList")); console.log("collections.sort List: ", result.toString()); return this.sort(a); } collections.sort.overload('java.util.List', 'java.util.Comparator').implementation = function(a,b){ showStacks(); var result = Java.cast(a,Java.use("java.util.ArrayList")); console.log("collections.sort List: ", result.toString()); return this.sort(a,b); } });
|