修改名称。
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
package com.xscm.moduleutil.service;
|
||||
|
||||
import android.content.Context;
|
||||
import android.os.Handler;
|
||||
|
||||
import java.lang.ref.WeakReference;
|
||||
|
||||
public class HandlerUtil extends Handler {
|
||||
|
||||
private static HandlerUtil instance = null;
|
||||
WeakReference<Context> mActivityReference;
|
||||
|
||||
public static HandlerUtil getInstance(Context context) {
|
||||
if (instance == null) {
|
||||
instance = new HandlerUtil(context.getApplicationContext());
|
||||
}
|
||||
return instance;
|
||||
}
|
||||
|
||||
HandlerUtil(Context context) {
|
||||
mActivityReference = new WeakReference<>(context);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user