Android Open Source - XposedWifiDeepSleep Singleton Method Hook

From Project

Back to project page XposedWifiDeepSleep.


The source code is released under:

MIT License

If you think the Android project XposedWifiDeepSleep listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.

Java Source Code

package ru.abusalimov.xposed.util;
/*from   ww  w .ja va  2s .c o m*/

 * Singleton-like: all instances are the same to avoid unnecessary
 * repeated hook invocations.
public abstract class SingletonMethodHook extends XC_MethodHook {

  public int compareTo(XCallback other) {
    if (this.equals(other)) {
      return 0;
    return super.compareTo(other);

  public boolean equals(Object o) {
    if (getClass().isInstance(o)) {
      return true;
    return super.equals(o);

  public int hashCode() {
    return ~getClass().hashCode() ^ 0xdeadbeef;


Java Source Code List