2024年4月11日发(作者:电脑闪屏按什么键恢复)
import ist;
import p;
import ;
import ;
import ;
import Event;
import Listener;
import ;
import tory;
public abstract class ThreadContext {
private static Log log =
();
public static void init() {
final Bundle coreBundle = ndle;
dleContext().addBundleListener(new
BundleListener() {
@Override
public void bundleChanged(BundleEvent arg0) {
int eventType = e();
Bundle bundle = dle();
// 如果插件的状态是正在停止或已经停止
if (eventType == D
|| eventType ==
NG) {
if ((coreBundle)) {
removeAllFilter();
} else {
removeBundleAllThread
(bundle);
}
}
}
});
}
private static List
ArrayList
private static Map
new HashMap
/**
* 得到线程列表
*
* @return
*/
public static List
return threadList;
}
/**
* 移除所有的线程
*/
public static void removeAllFilter() {
for (Bundle bundle : ()
.toArray(new Bundle[0])) {
removeBundleAllThread(bundle);
}
}
/**
* 移除某Bundle所有的线程
*
* @param bundle
*/
public static void removeBundleAllThread(Bundle bundle) {
if (!nsKey(bundle))
return;
Thread[] bundleThreadArray =
(bundle).toArray(
new Thread[0]);
发布者:admin,转转请注明出处:http://www.yc00.com/xitong/1712769704a2118829.html
评论列表(0条)