Skip to content

Instantly share code, notes, and snippets.

View xinghui's full-sized avatar
🏠
Working from home

Xinghui xinghui

🏠
Working from home
  • Tencent
  • ShenZhen, GuangDong, China
View GitHub Profile
package com.xinghui.notificationlistenerservicedemo;
import android.app.ActivityManager;
import android.app.Service;
import android.content.ComponentName;
import android.content.Context;
import android.content.Intent;
import android.content.pm.PackageManager;
import android.os.IBinder;
import android.os.Process;
package com.xinghui.java.weakreference;
import java.lang.ref.Reference;
import java.lang.ref.ReferenceQueue;
import java.lang.ref.WeakReference;
import java.util.Set;
import java.util.concurrent.CopyOnWriteArraySet;
/**
* https://github.com/square/leakcanary 中判断是否有内存泄漏的原理。