diff --git a/app/build.gradle b/app/build.gradle
index 388c8e1..e6f500c 100644
--- a/app/build.gradle
+++ b/app/build.gradle
@@ -75,31 +75,22 @@ android {
versionCode 21
versionName "3.0"
buildConfigField "String", "platform", '"ZhanRui"'
- manifestPlaceholders = [
- AMAP_KEY: "6e339305206eeb43f2b4cc1f31751f89"
- ]
}
//酷比魔方
cube {
flavorDimensions "default"
- versionCode 43
- versionName "5.2"
+ versionCode 44
+ versionName "5.3"
buildConfigField "String", "platform", '"ZhanRuiCube"'
- manifestPlaceholders = [
- AMAP_KEY: "6e339305206eeb43f2b4cc1f31751f89"
- ]
}
//MTK
MTKnewly {
flavorDimensions "default"
- versionCode 21
- versionName "3.0"
+ versionCode 22
+ versionName "3.1"
buildConfigField "String", "platform", '"MTK"'
- manifestPlaceholders = [
- AMAP_KEY: "1af68e0a7edcaac82678b1cbb7643408"
- ]
}
}
@@ -280,49 +271,34 @@ dependencies {
//implementation "com.uber.autodispose:autodispose-android-archcomponents:1.3.0"
//Google
implementation 'com.google.code.gson:gson:2.9.0'
- implementation 'com.google.zxing:core:3.4.1'
+ implementation 'com.google.zxing:core:3.5.0'
//图片加载框架
- implementation 'com.github.bumptech.glide:glide:4.13.1'
- annotationProcessor 'com.github.bumptech.glide:compiler:4.13.1'
+ implementation 'com.github.bumptech.glide:glide:4.13.2'
+ annotationProcessor 'com.github.bumptech.glide:compiler:4.13.2'
// debugImplementation because LeakCanary should only run in debug builds.
- debugImplementation 'com.squareup.leakcanary:leakcanary-android:2.8.1'
+ debugImplementation 'com.squareup.leakcanary:leakcanary-android:2.9.1'
//磁盘缓存
implementation 'com.jakewharton:disklrucache:2.0.2'
//fastjson
- implementation 'com.alibaba:fastjson:1.2.79'
- //极光推送
-// implementation 'cn.jiguang.sdk:jpush:4.3.0' // 此处以JPush 3.5.6 版本为例。
-// implementation 'cn.jiguang.sdk:jcore:2.9.0' // 此处以JCore 2.2.8 版本为例。
- //高德地图定位
-// implementation 'com.amap.api:location:5.1.0'
+ implementation 'com.alibaba:fastjson:1.2.83'
//百度地图
implementation 'com.baidu.lbsyun:BaiduMapSDK_Location:9.1.8'
//MMKV
implementation 'com.tencent:mmkv-static:1.2.13'
//腾讯移动推送 TPNS
implementation 'com.tencent.tpns:tpns:1.3.2.0-release'
-// //RxHttp
-// implementation 'com.github.liujingxing.rxhttp:rxhttp:2.6.5'
-// //implementation 'com.squareup.okhttp3:okhttp:4.9.1' //rxhttp v2.2.2版本起,需要手动依赖okhttp
-// annotationProcessor 'com.github.liujingxing.rxhttp:rxhttp-compiler:2.6.5'
-// //生成RxHttp类,纯Java项目,请使用annotationProcessor代替kapt
-// implementation 'com.github.liujingxing.rxlife:rxlife-coroutine:2.1.0' //管理协程生命周期,页面销毁,关闭请求
-// //rxjava2 (RxJava2/Rxjava3二选一,使用asXxx方法时必须)
-// //implementation 'io.reactivex.rxjava2:rxjava:2.2.8'
-// //implementation 'io.reactivex.rxjava2:rxandroid:2.1.1'
-// implementation 'com.github.liujingxing.rxlife:rxlife-rxjava2:2.1.0' //管理RxJava2生命周期,页面销毁,关闭请求
//工具类
implementation 'com.blankj:utilcodex:1.31.0'
//Aria
implementation 'com.arialyy.aria:core:3.8.15'
annotationProcessor 'com.arialyy.aria:compiler:3.8.15'
//压缩文件解压
- implementation 'org.zeroturnaround:zt-zip:1.14'
+ implementation 'org.zeroturnaround:zt-zip:1.15'
//更换字体框架
implementation 'uk.co.chrisjenx:calligraphy:2.3.0'
//Java WebSocket
- implementation "org.java-websocket:Java-WebSocket:1.5.2"
+ implementation "org.java-websocket:Java-WebSocket:1.5.3"
//状态栏透明
implementation 'com.gitee.zackratos:UltimateBarX:0.8.0'
// // 基础依赖包,必须要依赖
diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml
index 9bab9a2..f4683f4 100644
--- a/app/src/main/AndroidManifest.xml
+++ b/app/src/main/AndroidManifest.xml
@@ -120,15 +120,6 @@
-
-
-
-
-
-
-
-
-
@@ -293,202 +284,25 @@
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/app/src/main/java/com/aoleyun/sn/activity/SplashActivity.java b/app/src/main/java/com/aoleyun/sn/activity/SplashActivity.java
index fa4b805..ede6cee 100644
--- a/app/src/main/java/com/aoleyun/sn/activity/SplashActivity.java
+++ b/app/src/main/java/com/aoleyun/sn/activity/SplashActivity.java
@@ -162,7 +162,6 @@ public class SplashActivity extends AppCompatActivity {
// Log.i(TAG, "debugTest: iptables = " + CmdUtil.execute("iptables -L -n" ).toString());
Log.i(TAG, "debugTest: " + Utils.getAndroid10MAC(this));
-// Log.i(TAG, "debugTest: " + JPushInterface.getRegistrationID(this));
Log.e(TAG, "getCustomVersion: " + Utils.getCustomVersion());
Log.e(TAG, "getRomVersion: " + Utils.getRomVersion());
Log.i(TAG, "debugTest: " + BuildConfig.VERSION_NAME);
@@ -177,8 +176,6 @@ public class SplashActivity extends AppCompatActivity {
// }
// ActivityManager mAm = (ActivityManager) getSystemService(Context.ACTIVITY_SERVICE);
// mAm.killBackgroundProcesses("com.android.documentsui");
-// BaseApplication.cleanJpushAlias();
-// BaseApplication.cleanJpushTag();
Log.e(TAG, "debugTest: " + new Gson().toJson(MMKV.defaultMMKV().allKeys()));
Log.e(TAG, "debugTest: SPUtils all " + new Gson().toJson(SPUtils.getAll(this)));
try {
diff --git a/app/src/main/java/com/aoleyun/sn/activity/checknet/CheckNetActivity.java b/app/src/main/java/com/aoleyun/sn/activity/checknet/CheckNetActivity.java
index 8e06047..01ff889 100644
--- a/app/src/main/java/com/aoleyun/sn/activity/checknet/CheckNetActivity.java
+++ b/app/src/main/java/com/aoleyun/sn/activity/checknet/CheckNetActivity.java
@@ -189,7 +189,7 @@ public class CheckNetActivity extends BaseActivity implements CheckNetContact.Ma
}
@Override
- public void setJpushPlatformTagsFinish() {
+ public void setPushPlatformTagsFinish() {
mCheckNetPresenter.checkAoleyunUpdate();
}
diff --git a/app/src/main/java/com/aoleyun/sn/activity/checknet/CheckNetContact.java b/app/src/main/java/com/aoleyun/sn/activity/checknet/CheckNetContact.java
index 6d0744d..4dfae1b 100644
--- a/app/src/main/java/com/aoleyun/sn/activity/checknet/CheckNetContact.java
+++ b/app/src/main/java/com/aoleyun/sn/activity/checknet/CheckNetContact.java
@@ -19,7 +19,7 @@ public class CheckNetContact {
//获取电子书包激活码
void getEBagCode();
//设置极光推送平台标签
- void setJpushPlatformTags(int platform);
+ void setPushPlatformTags(int platform);
//获取设备信息更新
void checkAoleyunUpdate();
@@ -94,7 +94,7 @@ public class CheckNetContact {
//获取电子书包激活码
void getEBagCodeFinish();
//设置极光推送平台标签
- void setJpushPlatformTagsFinish();
+ void setPushPlatformTagsFinish();
//获取设备信息更新
void checkAoleyunUpdateFinish();
diff --git a/app/src/main/java/com/aoleyun/sn/activity/checknet/CheckNetPresenter.java b/app/src/main/java/com/aoleyun/sn/activity/checknet/CheckNetPresenter.java
index ec91f27..8e2cde9 100644
--- a/app/src/main/java/com/aoleyun/sn/activity/checknet/CheckNetPresenter.java
+++ b/app/src/main/java/com/aoleyun/sn/activity/checknet/CheckNetPresenter.java
@@ -164,8 +164,8 @@ public class CheckNetPresenter implements CheckNetContact.Presenter {
}
@Override
- public void setJpushPlatformTags(int platform) {
- mView.setJpushPlatformTagsFinish();
+ public void setPushPlatformTags(int platform) {
+ mView.setPushPlatformTagsFinish();
}
@Override
diff --git a/app/src/main/java/com/aoleyun/sn/base/BaseApplication.java b/app/src/main/java/com/aoleyun/sn/base/BaseApplication.java
index 1495aee..ee2a764 100644
--- a/app/src/main/java/com/aoleyun/sn/base/BaseApplication.java
+++ b/app/src/main/java/com/aoleyun/sn/base/BaseApplication.java
@@ -5,7 +5,6 @@ import android.content.Context;
import android.os.Handler;
import android.os.Looper;
import android.os.Process;
-import android.text.TextUtils;
import android.util.Log;
import androidx.multidex.MultiDexApplication;
@@ -14,7 +13,7 @@ import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.aoleyun.sn.BuildConfig;
import com.aoleyun.sn.bean.BaseResponse;
-import com.aoleyun.sn.manager.AmapManager;
+import com.aoleyun.sn.manager.MapManager;
import com.aoleyun.sn.manager.ConnectManager;
import com.aoleyun.sn.manager.FileManager;
import com.aoleyun.sn.network.NetInterfaceManager;
@@ -30,7 +29,6 @@ import com.aoleyun.sn.utils.Utils;
import com.aoleyun.sn.utils.WiFiUtils;
import com.aoleyun.sn.utils.XAPKUtils;
import com.arialyy.aria.core.Aria;
-import com.arialyy.aria.core.download.DownloadEntity;
import com.tencent.android.tpush.XGIOperateCallback;
import com.tencent.android.tpush.XGPushConfig;
import com.tencent.android.tpush.XGPushManager;
@@ -59,24 +57,20 @@ import okhttp3.Response;
public class BaseApplication extends MultiDexApplication {
private static final String TAG = BaseApplication.class.getSimpleName();
- @SuppressLint("StaticFieldLeak")
- public static Context context;
-
- public static Context getAppContext() {
- return context;
- }
-
@Override
public void onCreate() {
super.onCreate();
- context = this.getApplicationContext();
-// if (SystemUtils.isMainProcessName(this, Process.myPid())) {
- //非主进程不初始化
- init();
-// }
+ if (SystemUtils.isMainProcessName(this, Process.myPid())) {
+ //非主进程不初始化
+ init();
+ }
}
private void init() {
+ if (!BuildConfig.DEBUG) {
+ catchException();
+ }
+
String rootDir = MMKV.initialize(this);
Log.e(TAG, "mmkv root: " + rootDir);
@@ -89,35 +83,12 @@ public class BaseApplication extends MultiDexApplication {
LogDBManager.init(this);
FileManager.init(this);
ConnectManager.init(this);
- AmapManager.init(this);
- AmapManager.getInstance().initAmap();
-
+ MapManager.init(this);
+ MapManager.getInstance().initMap();
JGYUtils.getInstance().hookWebView();
-
- // 设置开启日志,发布时请关闭日志
-// JPushInterface.setDebugMode(true);
-// JPushInterface.requestPermission(this);
- //解锁设备不需要初始化
- // 初始化 JPush
- //JPushInterface.init(this);
Aria.init(this);
Aria.get(this).getDownloadConfig().setMaxTaskNum(1);
Aria.get(this).getDownloadConfig().setConvertSpeed(true);
-
- if (!BuildConfig.DEBUG) {
- catchException();
- }
-// Configuration config = getResources().getConfiguration();
-// int smallestScreenWidthDp = config.smallestScreenWidthDp;
-// Log.e("init", "smallestScreenWidthDp=" + smallestScreenWidthDp);
-// CalligraphyConfig.initDefault(new CalligraphyConfig.Builder()
-// .setDefaultFontPath("fonts/1234.ttf")
-// .setDefaultFontPath("fonts/Roboto-RobotoRegular.ttf")
-// .setFontAttrId(R.attr.fontPath)
-// .build()
-// );
- initAliasObservable();
- initTagObservable();
}
private void catchException() {
@@ -179,362 +150,4 @@ public class BaseApplication extends MultiDexApplication {
}
});
}
-
- private static void initAliasObservable() {
- Log.e(TAG, "initAliasObservable: ");
- Observable.create(new ObservableOnSubscribe() {
- @Override
- public void subscribe(ObservableEmitter emitter) throws Exception {
- onAliasResult = new OnAliasResult() {
- @Override
- public void onResult(int code) {
- Log.e("initAliasObservable", "onResult: " + code);
- emitter.onNext(code);
- }
- };
- }
- }).throttleLast(1, TimeUnit.HOURS)
- .subscribe(new Observer() {
- @Override
- public void onSubscribe(Disposable d) {
-
- }
-
- @Override
- public void onNext(Integer integer) {
- Log.e("initAliasObservable", "onNext: " + integer);
- String s = "alias:\t";
- switch (integer) {
- case 0:
- Log.e("jiguangInterface", s + "Alias绑定成功");
- break;
- case 6001:
- Log.e("jiguangInterface", s + "无效的设置");
- break;
- case 6011:
- Log.e("jiguangInterface", s + "短时间内操作过于频繁");
- break;
- case 6013:
- Log.e("jiguangInterface", s + "用户设备时间轴异常");
- ToastUtil.show("用户设备时间轴异常,修改后重新登陆\t" + s + "code:6013");
- break;
- case 6022:
- Log.e("jiguangInterface", s + "alias 操作正在进行中");
- break;
- //需要重新设置
- case 6002:
- Log.e("jiguangInterface", s + "设置超时,请重试");
- setJpushAlias();
- break;
- case 6014:
- Log.e("jiguangInterface", s + "服务器繁忙,建议重试");
- setJpushAlias();
- break;
- case 6020:
- Log.e("jiguangInterface", s + "建议过一段时间再设置");
- setJpushAlias();
- break;
- case 6024:
- Log.e("jiguangInterface", s + "服务器内部错误");
- setJpushAlias();
- break;
- case 6017:
- case 6027:
- Log.e("jiguangInterface", s + "别名绑定的设备数超过限制");
-// cleanJpushAlias();
- setJpushAlias();
- break;
- default:
- break;
- }
-
- }
-
- @Override
- public void onError(Throwable e) {
-
- }
-
- @Override
- public void onComplete() {
-
- }
- });
- }
-
-// public void onAliasOperatorResult(JPushMessage jPushMessage) {
-// if (jPushMessage == null) {
-// return;
-// }
-// int errorCode = jPushMessage.getErrorCode();
-// onAliasResult.onResult(errorCode);
-// }
-
- public static void setJpushAlias() {
- Log.e("jiguangInterface", "30s后重新设置alias");
-// JPushInterface.setAlias(getAppContext(), TagAliasOperatorHelper.sequence++, Utils.getSerial());
- }
-
- private static void initTagObservable() {
- Log.e(TAG, "initTagObservable: ");
- Observable.create(new ObservableOnSubscribe() {
- @Override
- public void subscribe(ObservableEmitter emitter) {
- onTagResult = new OnTagResult() {
- @Override
- public void onResult(int code) {
- Log.e("initTagObservable", "onResult: " + code);
- emitter.onNext(code);
- }
- };
- }
- }).throttleLast(1, TimeUnit.HOURS)
- .subscribe(new Observer() {
- @Override
- public void onSubscribe(Disposable d) {
-
- }
-
- @Override
- public void onNext(Integer integer) {
- Log.e("initTagObservable", "onNext: " + integer);
- String s = "tags:\t";
- switch (integer) {
- case 0:
- Log.e("jiguangInterface", s + "Tag绑定成功");
- break;
- case 6001:
- Log.e("jiguangInterface", s + "无效的设置");
- break;
- case 6005:
- Log.e("jiguangInterface", s + "某一个 tag 字符串不合法");
- ToastUtil.show("设备标签不合法,联系管理员修改\t" + "code:6005");
- break;
- case 6006:
- Log.e("jiguangInterface", s + "某一个 tag 超长");
- ToastUtil.show("设备标签过长,联系管理员修改\t" + "code:6006");
- break;
- case 6007:
- Log.e("jiguangInterface", s + "tags 数量超出限制");
- ToastUtil.show("设备标签数量超出限制,联系管理员修改\t" + "code:6007");
- break;
- case 6008:
- Log.e("jiguangInterface", s + "tag 超出总长度限制");
- ToastUtil.show("设备标签超出总长度限制,联系管理员修改\t" + "code:6008");
- break;
- case 6011:
- Log.e("jiguangInterface", s + "短时间内操作过于频繁");
- break;
- case 6013:
- Log.e("jiguangInterface", s + "用户设备时间轴异常");
- ToastUtil.show("用户设备时间轴异常,修改后重新登陆\t" + "code:6013");
- break;
- case 6018:
- Log.e("jiguangInterface", s + "Tags 过多");
-// cleanJpushTag();
- ToastUtil.show("设备标签数量超出限制,联系管理员修改\t" + "code:6018");
- break;
- case 6021:
- Log.e("jiguangInterface", s + "tags 操作正在进行中");
- break;
- //需要重新设置
- case 6002:
- Log.e("jiguangInterface", s + "设置超时,请重试");
- setJpushTags();
- break;
- case 6014:
- Log.e("jiguangInterface", s + "服务器繁忙,建议重试");
- setJpushTags();
- break;
- case 6020:
- Log.e("jiguangInterface", s + "建议过一段时间再设置");
- setJpushTags();
- break;
- case 6024:
- Log.e("jiguangInterface", s + "服务器内部错误");
- setJpushTags();
- break;
- default:
- break;
- }
- }
-
- @Override
- public void onError(Throwable e) {
-
- }
-
- @Override
- public void onComplete() {
-
- }
- });
- }
-
- public static void setJpushTags() {
- Log.e(TAG, "30s后重新设置tags");
- }
-
- private static OnAliasResult onAliasResult;
-
- interface OnAliasResult {
- void onResult(int code);
- }
-
- private static OnTagResult onTagResult;
-
- interface OnTagResult {
- void onResult(int code);
- }
-
- synchronized public static void cleanJpushAlias() {
- //alias的绑定的设备超过10个,但是alias应该是一个设备对应一个,在重置设备后jpush的regid会变动,所以需要清除
- //https://docs.jiguang.cn/jpush/server/push/rest_api_v3_device/#_5
- OkHttpClient client = new OkHttpClient();
- Request request = new Request.Builder()
- .url(UrlAddress.DELETE_JPUSH_ALIAS + Utils.getSerial(getAppContext()))
- .header("Authorization", JGYUtils.getAuthorization())
- .delete()
- .build();
- Call call = client.newCall(request);
- call.enqueue(new Callback() {
- @Override
- public void onFailure(@NotNull Call call, @NotNull IOException e) {
- Log.e("cleanJpushAlias", "onFailure: " + e.getMessage());
- }
-
- @Override
- public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException {
- Log.e("cleanJpushAlias", "onResponse: " + response.toString());
- Log.e(TAG, "onResponse: " + "清除Alias成功");
- }
- });
- }
-
- synchronized public static void cleanJpushTag() {
- OkHttpClient client = new OkHttpClient();
- Request request = new Request.Builder()
- .url(UrlAddress.DELETE_JPUSH_TAG + Utils.getSerial(getAppContext()))
- .header("Authorization", JGYUtils.getAuthorization())
- .delete()
- .build();
- Call call = client.newCall(request);
- call.enqueue(new Callback() {
- @Override
- public void onFailure(@NotNull Call call, @NotNull IOException e) {
- Log.e("cleanJpushTag", "onFailure: " + e.getMessage());
- }
-
- @Override
- public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException {
- Log.e("cleanJpushTag", "onResponse: " + response.toString());
- Log.e(TAG, "onResponse: " + "清除Tag成功");
- }
- });
- }
-
- public static void sendAppUsedTime(String random, String type) {
- StatisticsInfo statisticsInfo = null;
- if (type.equals("0")) {
- statisticsInfo = new StatisticsInfo(getAppContext());
- } else if (type.equals("1")) {
- statisticsInfo = new StatisticsInfo(getAppContext(), StatisticsInfo.WEEK);
- }
- List list = null;
- List localAppList = new ArrayList<>();
-
- if (statisticsInfo != null) {
- list = statisticsInfo.getShowList();
- if (list != null && list.size() > 0) {
- for (AppInformation appInformation : list) {
- if (!ApkUtils.isSystemApp(getAppContext(), appInformation.getPackageName())) {
- localAppList.add(appInformation);
- }
- }
- } else {
- Log.e("fht", "今日没有打开的应用");
- }
- } else {
- Log.e("fht", "获取信息失败");
- }
-
- JSONObject data = new JSONObject();
- JSONArray appinfo = new JSONArray();
- try {
- if (localAppList.size() > 0) {
- for (int i = 0; i < 5; i++) {
- AppInformation information = localAppList.get(i);
- JSONObject jsonObject = new JSONObject();
- jsonObject.put("package", information.getPackageName());
- jsonObject.put("use_time", (int) information.getUsedTimebyDay() / 1000);
- appinfo.add(jsonObject);
- }
- data.put("data", appinfo);
- }
- } catch (Exception e) {
- Log.e("sendAppUsedTime", e.getMessage());
- }
-
- NetInterfaceManager.getInstance()
- .getAppLogApi()
- .getAppLog(Utils.getSerial(getAppContext()), random, data.toJSONString())
- .subscribeOn(Schedulers.io())
- .observeOn(AndroidSchedulers.mainThread())
- .subscribe(new Observer() {
- @Override
- public void onSubscribe(Disposable d) {
- Log.e("sendAppUsedTime", "onSubscribe: ");
- }
-
- @Override
- public void onNext(BaseResponse baseResponse) {
- Log.e("sendAppUsedTime", "onNext: ");
- int code = baseResponse.code;
- String msg = baseResponse.msg;
- Log.e("sendAppUsedTime", "onSubscribe:" + msg);
- }
-
- @Override
- public void onError(Throwable e) {
- Log.e("sendAppUsedTime", "onError: " + e.getMessage());
-
- }
-
- @Override
- public void onComplete() {
- Log.e("sendAppUsedTime", "onComplete: ");
- }
- });
-
-
- }
-
- private static long totalTime;
- private static int totalTimes;
-
- synchronized public static void setAPPUsage() {
- StatisticsInfo statisticsInfo = new StatisticsInfo(getAppContext());
- totalTime = statisticsInfo.getTotalTime();//全部时间
- totalTimes = statisticsInfo.getTotalTimes();//全部次数
- }
-
- synchronized public static void setAPPUsage( List lists) {
- StatisticsInfo statisticsInfo = new StatisticsInfo(getAppContext());
- List list = null;
- List localAppList = new ArrayList<>();
-
- totalTime = statisticsInfo.getTotalTime();//全部时间
- totalTimes = statisticsInfo.getTotalTimes();//全部次数
-
- list = statisticsInfo.getShowList();
- if (list != null && list.size() > 0) {
- for (AppInformation appInformation : list) {
- if (lists.indexOf(appInformation.getPackageName()) != -1) {
- localAppList.add(appInformation);
- }
- }
- } else {
-
- }
- }
}
diff --git a/app/src/main/java/com/aoleyun/sn/jpush/ExampleUtil.java b/app/src/main/java/com/aoleyun/sn/jpush/ExampleUtil.java
deleted file mode 100644
index 1573fc4..0000000
--- a/app/src/main/java/com/aoleyun/sn/jpush/ExampleUtil.java
+++ /dev/null
@@ -1,131 +0,0 @@
-package com.aoleyun.sn.jpush;
-
-import android.content.Context;
-import android.content.pm.ApplicationInfo;
-import android.content.pm.PackageInfo;
-import android.content.pm.PackageManager;
-import android.content.pm.PackageManager.NameNotFoundException;
-import android.net.ConnectivityManager;
-import android.net.NetworkInfo;
-import android.os.Bundle;
-import android.os.Looper;
-import android.telephony.TelephonyManager;
-import android.text.TextUtils;
-
-import java.util.regex.Matcher;
-import java.util.regex.Pattern;
-
-
-public class ExampleUtil {
- public static final String PREFS_NAME = "JPUSH_EXAMPLE";
- public static final String PREFS_DAYS = "JPUSH_EXAMPLE_DAYS";
- public static final String PREFS_START_TIME = "PREFS_START_TIME";
- public static final String PREFS_END_TIME = "PREFS_END_TIME";
- public static final String KEY_APP_KEY = "JPUSH_APPKEY";
-
- public static boolean isEmpty(String s) {
- if (null == s)
- return true;
- if (s.length() == 0)
- return true;
- if (s.trim().length() == 0)
- return true;
- return false;
- }
- /**
- * 只能以 “+” 或者 数字开头;后面的内容只能包含 “-” 和 数字。
- * */
- private final static String MOBILE_NUMBER_CHARS = "^[+0-9][-0-9]{1,}$";
- public static boolean isValidMobileNumber(String s) {
- if(TextUtils.isEmpty(s)) return true;
- Pattern p = Pattern.compile(MOBILE_NUMBER_CHARS);
- Matcher m = p.matcher(s);
- return m.matches();
- }
- // 校验Tag Alias 只能是数字,英文字母和中文
- public static boolean isValidTagAndAlias(String s) {
- Pattern p = Pattern.compile("^[\u4E00-\u9FA50-9a-zA-Z_!@#$&*+=.|]+$");
- Matcher m = p.matcher(s);
- return m.matches();
- }
-
- // 取得AppKey
- public static String getAppKey(Context context) {
- Bundle metaData = null;
- String appKey = null;
- try {
- ApplicationInfo ai = context.getPackageManager().getApplicationInfo(
- context.getPackageName(), PackageManager.GET_META_DATA);
- if (null != ai)
- metaData = ai.metaData;
- if (null != metaData) {
- appKey = metaData.getString(KEY_APP_KEY);
- if ((null == appKey) || appKey.length() != 24) {
- appKey = null;
- }
- }
- } catch (NameNotFoundException e) {
-
- }
- return appKey;
- }
-
- // 取得版本号
- public static String GetVersion(Context context) {
- try {
- PackageInfo manager = context.getPackageManager().getPackageInfo(
- context.getPackageName(), 0);
- return manager.versionName;
- } catch (NameNotFoundException e) {
- return "Unknown";
- }
- }
-
- public static void showToast(final String toast, final Context context)
- {
- new Thread(new Runnable() {
-
- @Override
- public void run() {
- Looper.prepare();
-// Toast.makeText(context, toast, Toast.LENGTH_SHORT).show();
- Looper.loop();
- }
- }).start();
- }
-
- public static boolean isConnected(Context context) {
- ConnectivityManager conn = (ConnectivityManager) context.getSystemService(Context.CONNECTIVITY_SERVICE);
- NetworkInfo info = conn.getActiveNetworkInfo();
- return (info != null && info.isConnected());
- }
-
- public static String getImei(Context context, String imei) {
- String ret = null;
- try {
- TelephonyManager telephonyManager = (TelephonyManager) context.getSystemService(Context.TELEPHONY_SERVICE);
- ret = telephonyManager.getDeviceId();
- } catch (Exception e) {
- Logger.e(ExampleUtil.class.getSimpleName(), e.getMessage());
- }
- if (isReadableASCII(ret)){
- return ret;
- } else {
- return imei;
- }
- }
-
- private static boolean isReadableASCII(CharSequence string){
- if (TextUtils.isEmpty(string)) return false;
- try {
- Pattern p = Pattern.compile("[\\x20-\\x7E]+");
- return p.matcher(string).matches();
- } catch (Throwable e){
- return true;
- }
- }
-
-// public static String getDeviceId(Context context) {
-// return JPushInterface.getUdid(context);
-// }
-}
diff --git a/app/src/main/java/com/aoleyun/sn/jpush/LocalBroadcastManager.java b/app/src/main/java/com/aoleyun/sn/jpush/LocalBroadcastManager.java
deleted file mode 100644
index 2f6df13..0000000
--- a/app/src/main/java/com/aoleyun/sn/jpush/LocalBroadcastManager.java
+++ /dev/null
@@ -1,263 +0,0 @@
-package com.aoleyun.sn.jpush;
-
-import android.content.BroadcastReceiver;
-import android.content.Context;
-import android.content.Intent;
-import android.content.IntentFilter;
-import android.net.Uri;
-import android.os.Handler;
-import android.os.Message;
-
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.Set;
-
-/**
- * Created by efan on 2017/4/14.
- */
-
-public final class LocalBroadcastManager {
- private static final String TAG = "JIGUANG-Example";
- private static final boolean DEBUG = false;
- private final Context mAppContext;
- private final HashMap> mReceivers = new HashMap>();
- private final HashMap> mActions = new HashMap>();
- private final ArrayList mPendingBroadcasts = new ArrayList();
- static final int MSG_EXEC_PENDING_BROADCASTS = 1;
- private final Handler mHandler;
- private static final Object mLock = new Object();
- private static LocalBroadcastManager mInstance;
-
- public static LocalBroadcastManager getInstance(Context context) {
- Object var1 = mLock;
- synchronized (mLock) {
- if (mInstance == null) {
- mInstance = new LocalBroadcastManager(context.getApplicationContext());
- }
-
- return mInstance;
- }
- }
-
- private LocalBroadcastManager(Context context) {
- this.mAppContext = context;
- this.mHandler = new Handler(context.getMainLooper()) {
- public void handleMessage(Message msg) {
- switch (msg.what) {
- case 1:
- LocalBroadcastManager.this.executePendingBroadcasts();
- break;
- default:
- super.handleMessage(msg);
- }
-
- }
- };
- }
-
- public void registerReceiver(BroadcastReceiver receiver, IntentFilter filter) {
- HashMap var3 = this.mReceivers;
- synchronized (this.mReceivers) {
- ReceiverRecord entry = new ReceiverRecord(filter, receiver);
- ArrayList filters = (ArrayList) this.mReceivers.get(receiver);
- if (filters == null) {
- filters = new ArrayList(1);
- this.mReceivers.put(receiver, filters);
- }
-
- filters.add(filter);
-
- for (int i = 0; i < filter.countActions(); ++i) {
- String action = filter.getAction(i);
- ArrayList entries = (ArrayList) this.mActions.get(action);
- if (entries == null) {
- entries = new ArrayList(1);
- this.mActions.put(action, entries);
- }
-
- entries.add(entry);
- }
-
- }
- }
-
- public void unregisterReceiver(BroadcastReceiver receiver) {
- HashMap var2 = this.mReceivers;
- synchronized (this.mReceivers) {
- ArrayList filters = (ArrayList) this.mReceivers.remove(receiver);
- if (filters != null) {
- for (int i = 0; i < filters.size(); ++i) {
- IntentFilter filter = (IntentFilter) filters.get(i);
-
- for (int j = 0; j < filter.countActions(); ++j) {
- String action = filter.getAction(j);
- ArrayList receivers = (ArrayList) this.mActions.get(action);
- if (receivers != null) {
- for (int k = 0; k < receivers.size(); ++k) {
- if (((ReceiverRecord) receivers.get(k)).receiver == receiver) {
- receivers.remove(k);
- --k;
- }
- }
-
- if (receivers.size() <= 0) {
- this.mActions.remove(action);
- }
- }
- }
- }
-
- }
- }
- }
-
- public boolean sendBroadcast(Intent intent) {
- HashMap var2 = this.mReceivers;
- synchronized (this.mReceivers) {
- String action = intent.getAction();
- String type = intent.resolveTypeIfNeeded(this.mAppContext.getContentResolver());
- Uri data = intent.getData();
- String scheme = intent.getScheme();
- Set categories = intent.getCategories();
- boolean debug = (intent.getFlags() & 8) != 0;
- if (debug) {
- Logger.v("LocalBroadcastManager", "Resolving type " + type + " scheme " + scheme + " of intent " + intent);
- }
-
- ArrayList entries = (ArrayList) this.mActions.get(intent.getAction());
- if (entries != null) {
- if (debug) {
- Logger.v("LocalBroadcastManager", "Action list: " + entries);
- }
-
- ArrayList receivers = null;
-
- int i;
- for (i = 0; i < entries.size(); ++i) {
- ReceiverRecord receiver = (ReceiverRecord) entries.get(i);
- if (debug) {
- Logger.v("LocalBroadcastManager", "Matching against filter " + receiver.filter);
- }
-
- if (receiver.broadcasting) {
- if (debug) {
- Logger.v("LocalBroadcastManager", " Filter\'s target already added");
- }
- } else {
- int match = receiver.filter.match(action, type, scheme, data, categories, "LocalBroadcastManager");
- if (match >= 0) {
- if (debug) {
- Logger.v("LocalBroadcastManager", " Filter matched! match=0x" + Integer.toHexString(match));
- }
-
- if (receivers == null) {
- receivers = new ArrayList();
- }
-
- receivers.add(receiver);
- receiver.broadcasting = true;
- } else if (debug) {
- String reason;
- switch (match) {
- case -4:
- reason = "category";
- break;
- case -3:
- reason = "action";
- break;
- case -2:
- reason = "data";
- break;
- case -1:
- reason = "type";
- break;
- default:
- reason = "unknown reason";
- }
-
- Logger.v("LocalBroadcastManager", " Filter did not match: " + reason);
- }
- }
- }
-
- if (receivers != null) {
- for (i = 0; i < receivers.size(); ++i) {
- ((ReceiverRecord) receivers.get(i)).broadcasting = false;
- }
-
- this.mPendingBroadcasts.add(new BroadcastRecord(intent, receivers));
- if (!this.mHandler.hasMessages(1)) {
- this.mHandler.sendEmptyMessage(1);
- }
-
- return true;
- }
- }
-
- return false;
- }
- }
-
- public void sendBroadcastSync(Intent intent) {
- if (this.sendBroadcast(intent)) {
- this.executePendingBroadcasts();
- }
-
- }
-
- private void executePendingBroadcasts() {
- while (true) {
- BroadcastRecord[] brs = null;
- HashMap i = this.mReceivers;
- synchronized (this.mReceivers) {
- int br = this.mPendingBroadcasts.size();
- if (br <= 0) {
- return;
- }
-
- brs = new BroadcastRecord[br];
- this.mPendingBroadcasts.toArray(brs);
- this.mPendingBroadcasts.clear();
- }
-
- for (int var6 = 0; var6 < brs.length; ++var6) {
- BroadcastRecord var7 = brs[var6];
-
- for (int j = 0; j < var7.receivers.size(); ++j) {
- ((ReceiverRecord) var7.receivers.get(j)).receiver.onReceive(this.mAppContext, var7.intent);
- }
- }
- }
- }
-
- private static class BroadcastRecord {
- final Intent intent;
- final ArrayList receivers;
-
- BroadcastRecord(Intent _intent, ArrayList _receivers) {
- this.intent = _intent;
- this.receivers = _receivers;
- }
- }
-
- private static class ReceiverRecord {
- final IntentFilter filter;
- final BroadcastReceiver receiver;
- boolean broadcasting;
-
- ReceiverRecord(IntentFilter _filter, BroadcastReceiver _receiver) {
- this.filter = _filter;
- this.receiver = _receiver;
- }
-
- public String toString() {
- StringBuilder builder = new StringBuilder(128);
- builder.append("Receiver{");
- builder.append(this.receiver);
- builder.append(" filter=");
- builder.append(this.filter);
- builder.append("}");
- return builder.toString();
- }
- }
-}
\ No newline at end of file
diff --git a/app/src/main/java/com/aoleyun/sn/jpush/Logger.java b/app/src/main/java/com/aoleyun/sn/jpush/Logger.java
deleted file mode 100644
index 00f68cb..0000000
--- a/app/src/main/java/com/aoleyun/sn/jpush/Logger.java
+++ /dev/null
@@ -1,40 +0,0 @@
-package com.aoleyun.sn.jpush;
-
-import android.util.Log;
-
-/**
- * Created by efan on 2017/4/13.
- */
-
-public class Logger {
-
- //设为false关闭日志
- private static final boolean LOG_ENABLE = true;
-
- public static void i(String tag, String msg){
- if (LOG_ENABLE){
- Log.i(tag, msg);
- }
- }
- public static void v(String tag, String msg){
- if (LOG_ENABLE){
- Log.v(tag, msg);
- }
- }
- public static void d(String tag, String msg){
- if (LOG_ENABLE){
- Log.d(tag, msg);
- }
- }
- public static void w(String tag, String msg){
- if (LOG_ENABLE){
- Log.w(tag, msg);
- }
- }
- public static void e(String tag, String msg){
- if (LOG_ENABLE){
- Log.e(tag, msg);
- }
- }
-
-}
diff --git a/app/src/main/java/com/aoleyun/sn/jpush/MyJPushMessageReceiver.java b/app/src/main/java/com/aoleyun/sn/jpush/MyJPushMessageReceiver.java
deleted file mode 100644
index 07489b5..0000000
--- a/app/src/main/java/com/aoleyun/sn/jpush/MyJPushMessageReceiver.java
+++ /dev/null
@@ -1,43 +0,0 @@
-package com.aoleyun.sn.jpush;
-
-import android.content.Context;
-
-import com.aoleyun.sn.base.BaseApplication;
-
-
-/**
- * 自定义JPush message 接收器,包括操作tag/alias的结果返回(仅仅包含tag/alias新接口部分)
- * */
-//public class MyJPushMessageReceiver extends JPushMessageReceiver {
-//
-// @Override
-// public void onTagOperatorResult(Context context, JPushMessage jPushMessage) {
-// TagAliasOperatorHelper.getInstance().onTagOperatorResult(context,jPushMessage);
-// super.onTagOperatorResult(context, jPushMessage);
-// BaseApplication.getInstance().onTagOperatorResult(jPushMessage);
-// }
-// @Override
-// public void onCheckTagOperatorResult(Context context, JPushMessage jPushMessage){
-// TagAliasOperatorHelper.getInstance().onCheckTagOperatorResult(context,jPushMessage);
-// super.onCheckTagOperatorResult(context, jPushMessage);
-// }
-// @Override
-// public void onAliasOperatorResult(Context context, JPushMessage jPushMessage) {
-// TagAliasOperatorHelper.getInstance().onAliasOperatorResult(context,jPushMessage);
-// super.onAliasOperatorResult(context, jPushMessage);
-// BaseApplication.getInstance().onAliasOperatorResult(jPushMessage);
-// }
-//
-// @Override
-// public void onMobileNumberOperatorResult(Context context, JPushMessage jPushMessage) {
-// TagAliasOperatorHelper.getInstance().onMobileNumberOperatorResult(context,jPushMessage);
-// super.onMobileNumberOperatorResult(context, jPushMessage);
-// }
-//
-// @Override
-// public void onMessage(Context context, CustomMessage customMessage) {
-// super.onMessage(context, customMessage);
-// }
-//
-//
-//}
diff --git a/app/src/main/java/com/aoleyun/sn/jpush/MyJPushReceiver.java b/app/src/main/java/com/aoleyun/sn/jpush/MyJPushReceiver.java
deleted file mode 100644
index fdc2541..0000000
--- a/app/src/main/java/com/aoleyun/sn/jpush/MyJPushReceiver.java
+++ /dev/null
@@ -1,13 +0,0 @@
-package com.aoleyun.sn.jpush;
-
-import android.content.BroadcastReceiver;
-import android.content.Context;
-import android.content.Intent;
-
-public class MyJPushReceiver extends BroadcastReceiver {
- private static final String TAG = MyJPushReceiver.class.getSimpleName();
- @Override
- public void onReceive(Context context, Intent intent) {
-
- }
-}
diff --git a/app/src/main/java/com/aoleyun/sn/jpush/MyReceiver.java b/app/src/main/java/com/aoleyun/sn/jpush/MyReceiver.java
deleted file mode 100644
index fc74c06..0000000
--- a/app/src/main/java/com/aoleyun/sn/jpush/MyReceiver.java
+++ /dev/null
@@ -1,115 +0,0 @@
-package com.aoleyun.sn.jpush;
-
-
-/**
- * 自定义接收器
- *
- * 如果不定义这个 Receiver,则:
- * 1) 默认用户会打开主界面
- * 2) 接收不到自定义消息
- */
-//public class MyReceiver extends BroadcastReceiver {
-// private static final String TAG = "JIGUANG-Example";
-//
-// @Override
-// public void onReceive(Context context, Intent intent) {
-// try {
-// Bundle bundle = intent.getExtras();
-// Logger.d(TAG, "[MyReceiver] onReceive - " + intent.getAction() + ", extras: " + printBundle(bundle));
-//
-// if (JPushInterface.ACTION_REGISTRATION_ID.equals(intent.getAction())) {
-// String regId = bundle.getString(JPushInterface.EXTRA_REGISTRATION_ID);
-// Logger.d(TAG, "[MyReceiver] 接收Registration Id : " + regId);
-// //send the Registration Id to your server...
-//
-// } else if (JPushInterface.ACTION_MESSAGE_RECEIVED.equals(intent.getAction())) {
-// Logger.d(TAG, "[MyReceiver] 接收到推送下来的自定义消息: " + bundle.getString(JPushInterface.EXTRA_MESSAGE));
-// processCustomMessage(context, bundle);
-//
-// } else if (JPushInterface.ACTION_NOTIFICATION_RECEIVED.equals(intent.getAction())) {
-// Logger.d(TAG, "[MyReceiver] 接收到推送下来的通知");
-// int notifactionId = bundle.getInt(JPushInterface.EXTRA_NOTIFICATION_ID);
-// Logger.d(TAG, "[MyReceiver] 接收到推送下来的通知的ID: " + notifactionId);
-//
-// } else if (JPushInterface.ACTION_NOTIFICATION_OPENED.equals(intent.getAction())) {
-// Logger.d(TAG, "[MyReceiver] 用户点击打开了通知");
-//
-// //打开自定义的Activity
-//// Intent i = new Intent(context, TestActivity.class);
-//// i.putExtras(bundle);
-// //i.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
-//// i.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TOP );
-//// context.startActivity(i);
-//
-// } else if (JPushInterface.ACTION_RICHPUSH_CALLBACK.equals(intent.getAction())) {
-// Logger.d(TAG, "[MyReceiver] 用户收到到RICH PUSH CALLBACK: " + bundle.getString(JPushInterface.EXTRA_EXTRA));
-// //在这里根据 JPushInterface.EXTRA_EXTRA 的内容处理代码,比如打开新的Activity, 打开一个网页等..
-//
-// } else if(JPushInterface.ACTION_CONNECTION_CHANGE.equals(intent.getAction())) {
-// boolean connected = intent.getBooleanExtra(JPushInterface.EXTRA_CONNECTION_CHANGE, false);
-// Logger.w(TAG, "[MyReceiver]" + intent.getAction() +" connected state change to "+connected);
-// } else {
-// Logger.d(TAG, "[MyReceiver] Unhandled intent - " + intent.getAction());
-// }
-// } catch (Exception e){
-//
-// }
-//
-// }
-//
-// // 打印所有的 intent extra 数据
-// private static String printBundle(Bundle bundle) {
-// StringBuilder sb = new StringBuilder();
-// for (String key : bundle.keySet()) {
-// if (key.equals(JPushInterface.EXTRA_NOTIFICATION_ID)) {
-// sb.append("\nkey:" + key + ", value:" + bundle.getInt(key));
-// }else if(key.equals(JPushInterface.EXTRA_CONNECTION_CHANGE)){
-// sb.append("\nkey:" + key + ", value:" + bundle.getBoolean(key));
-// } else if (key.equals(JPushInterface.EXTRA_EXTRA)) {
-// if (TextUtils.isEmpty(bundle.getString(JPushInterface.EXTRA_EXTRA))) {
-// Logger.i(TAG, "This message has no Extra data");
-// continue;
-// }
-//
-// try {
-// JSONObject json = new JSONObject(bundle.getString(JPushInterface.EXTRA_EXTRA));
-// Iterator it = json.keys();
-//
-// while (it.hasNext()) {
-// String myKey = it.next();
-// sb.append("\nkey:" + key + ", value: [" +
-// myKey + " - " +json.optString(myKey) + "]");
-// }
-// } catch (JSONException e) {
-// Logger.e(TAG, "Get message extra JSON error!");
-// }
-//
-// } else {
-// sb.append("\nkey:" + key + ", value:" + bundle.get(key));
-// }
-// }
-// return sb.toString();
-// }
-//
-// //send msg to MainActivity1
-// private void processCustomMessage(Context context, Bundle bundle) {
-// if (MainActivity1.isForeground) {
-// String message = bundle.getString(JPushInterface.EXTRA_MESSAGE);
-// String extras = bundle.getString(JPushInterface.EXTRA_EXTRA);
-// Intent msgIntent = new Intent(MainActivity1.MESSAGE_RECEIVED_ACTION);
-// msgIntent.putExtra(MainActivity1.KEY_MESSAGE, message);
-// if (!ExampleUtil.isEmpty(extras)) {
-// try {
-// JSONObject extraJson = new JSONObject(extras);
-// if (extraJson.length() > 0) {
-// msgIntent.putExtra(MainActivity1.KEY_EXTRAS, extras);
-// }
-// } catch (JSONException e) {
-//
-// }
-//
-// }
-// LocalBroadcastManager.getInstance(context).sendBroadcast(msgIntent);
-// }
-// }
-//}
diff --git a/app/src/main/java/com/aoleyun/sn/jpush/PushService.java b/app/src/main/java/com/aoleyun/sn/jpush/PushService.java
deleted file mode 100644
index 60cdff7..0000000
--- a/app/src/main/java/com/aoleyun/sn/jpush/PushService.java
+++ /dev/null
@@ -1,8 +0,0 @@
-package com.aoleyun.sn.jpush;
-
-//import cn.jpush.android.service.JCommonService;
-
-public class PushService {
-// extends JCommonService {
-
-}
diff --git a/app/src/main/java/com/aoleyun/sn/jpush/TagAliasOperatorHelper.java b/app/src/main/java/com/aoleyun/sn/jpush/TagAliasOperatorHelper.java
deleted file mode 100644
index 265095e..0000000
--- a/app/src/main/java/com/aoleyun/sn/jpush/TagAliasOperatorHelper.java
+++ /dev/null
@@ -1,343 +0,0 @@
-package com.aoleyun.sn.jpush;
-
-import android.content.Context;
-import android.os.Handler;
-import android.os.Message;
-import android.util.Log;
-import android.util.SparseArray;
-
-import com.aoleyun.sn.utils.ToastUtil;
-
-import java.util.Locale;
-import java.util.Set;
-
-
-/**
- * 处理tagalias相关的逻辑
- * */
-public class TagAliasOperatorHelper {
-// private static final String TAG = "JIGUANG-TagAliasHelper";
-// public static int sequence = 1;
-// /**增加*/
-// public static final int ACTION_ADD = 1;
-// /**覆盖*/
-// public static final int ACTION_SET = 2;
-// /**删除部分*/
-// public static final int ACTION_DELETE = 3;
-// /**删除所有*/
-// public static final int ACTION_CLEAN = 4;
-// /**查询*/
-// public static final int ACTION_GET = 5;
-//
-// public static final int ACTION_CHECK = 6;
-//
-// public static final int DELAY_SEND_ACTION = 1;
-//
-// public static final int DELAY_SET_MOBILE_NUMBER_ACTION = 2;
-//
-// private Context context;
-//
-// private static TagAliasOperatorHelper mInstance;
-// private TagAliasOperatorHelper(){
-// }
-// public static TagAliasOperatorHelper getInstance(){
-// if(mInstance == null){
-// synchronized (TagAliasOperatorHelper.class){
-// if(mInstance == null){
-// mInstance = new TagAliasOperatorHelper();
-// }
-// }
-// }
-// return mInstance;
-// }
-// public void init(Context context){
-// if(context != null) {
-// this.context = context.getApplicationContext();
-// }
-// }
-// private SparseArray