diff --git a/app/build.gradle b/app/build.gradle
index 2192600..bce1a8d 100644
--- a/app/build.gradle
+++ b/app/build.gradle
@@ -73,8 +73,8 @@ android {
official {
flavorDimensions "default"
- versionCode 42
- versionName "3.0.2"
+ versionCode 48
+ versionName "3.0.8"
}
}
@@ -169,9 +169,38 @@ android {
v1SigningEnabled true
v2SigningEnabled true
}
+
+ iPlay50SE {
+ storeFile file("keystore/iPlay50SE.keystore")
+ storePassword "123456"
+ keyAlias "iplay50se"
+ keyPassword "123456"
+ v1SigningEnabled true
+ v2SigningEnabled true
+ }
}
buildTypes {
+ iPlay50SEDebug.initWith(debug)
+ iPlay50SEDebug {
+ manifestPlaceholders = [
+ AK: "7IubK1Ugeuxga4KKC5VQyjTeQlExsYZq"
+ ]
+ buildConfigField "String", "platform", '"ipaly50"'
+ versionNameSuffix "-debug"
+ debuggable true
+ signingConfig signingConfigs.iPlay50SE
+ }
+
+ iPlay50SERelease.initWith(release)
+ iPlay50SERelease {
+ manifestPlaceholders = [
+ AK: "7IubK1Ugeuxga4KKC5VQyjTeQlExsYZq"
+ ]
+ buildConfigField "String", "platform", '"ipaly50"'
+ signingConfig signingConfigs.iPlay50SE
+ }
+
unisocDebug.initWith(debug)
unisocDebug {
manifestPlaceholders = [
@@ -233,6 +262,26 @@ android {
signingConfig signingConfigs.teclastMTK
}
+ G6Debug.initWith(debug)
+ G6Debug {
+ manifestPlaceholders = [
+ AK: "7IubK1Ugeuxga4KKC5VQyjTeQlExsYZq"
+ ]
+ buildConfigField "String", "platform", '"G6"'
+ versionNameSuffix "-debug"
+ debuggable true
+ signingConfig signingConfigs.G10P
+ }
+
+ G6Release.initWith(release)
+ G6Release {
+ manifestPlaceholders = [
+ AK: "7IubK1Ugeuxga4KKC5VQyjTeQlExsYZq"
+ ]
+ buildConfigField "String", "platform", '"G6"'
+ signingConfig signingConfigs.G10P
+ }
+
G13Debug.initWith(debug)
G13Debug {
manifestPlaceholders = [
diff --git a/app/keystore/iPlay50SE.keystore b/app/keystore/iPlay50SE.keystore
new file mode 100644
index 0000000..57f2521
Binary files /dev/null and b/app/keystore/iPlay50SE.keystore differ
diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml
index 253e093..fc42867 100644
--- a/app/src/main/AndroidManifest.xml
+++ b/app/src/main/AndroidManifest.xml
@@ -26,29 +26,29 @@
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
@@ -56,7 +56,7 @@
-
+
-
-
-
+
+
+
-
-
+
+
-
+
-
+ android:screenOrientation="portrait" />
+
+ android:exported="true" />
+
+
+ android:process=":remote" />
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -315,18 +233,7 @@
-
-
-
-
-
+ android:value="${AK}" />
\ No newline at end of file
diff --git a/app/src/main/java/com/fuying/sn/activity/main/MainActivity.java b/app/src/main/java/com/fuying/sn/activity/main/MainActivity.java
index c847026..fd1837d 100644
--- a/app/src/main/java/com/fuying/sn/activity/main/MainActivity.java
+++ b/app/src/main/java/com/fuying/sn/activity/main/MainActivity.java
@@ -124,9 +124,11 @@ public class MainActivity extends BaseActivity implements MainAContact.MainView,
setOnClickListener();
tv_customversion.setText(JGYUtils.getCustomVersion());
- if (JGYUtils.getInstance().checkAppPlatform() == JGYUtils.G13Platform) {
+ if (JGYUtils.getInstance().checkAppPlatform() == JGYUtils.G13Platform
+ || JGYUtils.getInstance().checkAppPlatform() == JGYUtils.iPlay50SEPlatform
+ ) {
tv_sn.setText("SN:" + Utils.getSerial());
- }else {
+ } else {
tv_sn.setText("IMEI:" + Utils.getIMEI(MainActivity.this));
}
@@ -238,7 +240,7 @@ public class MainActivity extends BaseActivity implements MainAContact.MainView,
@Override
protected void onNewIntent(Intent intent) {
super.onNewIntent(intent);
- Log.e(TAG, "onNewIntent: " );
+ Log.e(TAG, "onNewIntent: ");
if (REFRESHACTION.equals(intent.getAction())) {
mPresenter.getSnInfo();
}
@@ -375,7 +377,7 @@ public class MainActivity extends BaseActivity implements MainAContact.MainView,
class RefreshReceiver extends BroadcastReceiver {
@Override
public void onReceive(Context context, Intent intent) {
- Log.e("RefreshReceiver", "onReceive: " );
+ Log.e("RefreshReceiver", "onReceive: ");
if (REFRESHACTION.equals(intent.getAction())) {
mPresenter.getSnInfo();
}
diff --git a/app/src/main/java/com/fuying/sn/desktop/RunningAppManager.java b/app/src/main/java/com/fuying/sn/desktop/RunningAppManager.java
index 5a0ed44..f90739b 100644
--- a/app/src/main/java/com/fuying/sn/desktop/RunningAppManager.java
+++ b/app/src/main/java/com/fuying/sn/desktop/RunningAppManager.java
@@ -74,7 +74,6 @@ public class RunningAppManager {
@SuppressLint("StaticFieldLeak")
private static RunningAppManager mRunningAppManager;
private Context mContext;
- private CacheHelper mCacheHelper;
private MMKV mMMKV = MMKV.mmkvWithID(CommonConfig.MMKV_ID, MMKV.MULTI_PROCESS_MODE);
public static final String RemainingTimeMap = "RemainingTimeMap_KEY";
@@ -84,7 +83,9 @@ public class RunningAppManager {
public static final String AllApplUsageTimeMap = "AllAppUsageTimeMap_KEY";
//剩余时间
- private long globalRemainingTime = 0L;
+ private long globalRemainingTime;
+ private String GLOBAL_REMAINING_TIME_KEY = "GLOBAL_REMAINING_TIME_KEY";
+
//存储每个单独有配置app剩余时间
private HashMap mRemainingTimeMap = new HashMap<>();
//存储整机配置app使用时间
@@ -92,8 +93,8 @@ public class RunningAppManager {
//存储所有app使用时间
private HashMap mAllAppUsageTime = new HashMap<>();
- public static long minuteTime = 60 * 1000;
- public static long dayTime = minuteTime * 60 * 24;
+ public static final long minuteTime = 60 * 1000;
+ public static final long dayTime = minuteTime * 60 * 24;
//日期格式化
private static DateFormat dateFormat = new SimpleDateFormat("HH:mm");
@@ -110,9 +111,9 @@ public class RunningAppManager {
throw new RuntimeException("Context is NULL");
}
this.mContext = context;
- this.mCacheHelper = new CacheHelper(context);
registerTimeReceiver(mContext);
+ globalRemainingTime = mMMKV.decodeLong(GLOBAL_REMAINING_TIME_KEY, 0);
String remainsTimeJson = mMMKV.decodeString(RemainingTimeMap, "");
Log.i(TAG, "remainsTimeJson: " + remainsTimeJson);
Gson gson = new Gson();
@@ -230,7 +231,7 @@ public class RunningAppManager {
Log.i(TAG, "checkForegroundAppName: getAppPackageName = " + appPackageName);
if (appPackageName.equals(topPackage)) {
Log.i(TAG, "checkForegroundAppName: 没有切换应用");
- if (RunningAppManager.getInstance().inControlTime(appPackageName)) {
+ if (inControlTime(appPackageName)) {
removeTask(topPackage);
killApp();
gotoLauncher();
@@ -259,13 +260,13 @@ public class RunningAppManager {
onClickTime = System.currentTimeMillis() / 1000;
// NetInterfaceManager.getInstance().sendRunningApp();
AppUsedTimeUtils.getInstance().setStart_time(onClickTime);
- if (RunningAppManager.getInstance().inControlTime(appPackageName)) {
+ if (inControlTime(appPackageName)) {
Log.i(TAG, "checkForegroundAppName: 没有剩余时间2");
removeTask(topPackage);
killApp();
gotoLauncher();
} else {
- RunningAppManager.getInstance().recordPackageOpenTime(topPackage);
+ recordPackageOpenTime(topPackage);
Log.i(TAG, "checkForegroundAppName: 没有管控2");
}
}
@@ -467,6 +468,10 @@ public class RunningAppManager {
public void setGlobalUsageTime(long time) {
this.globalRemainingTime = time;
+ if (globalRemainingTime < 0) {
+ globalRemainingTime = 0;
+ }
+ mMMKV.encode(GLOBAL_REMAINING_TIME_KEY, globalRemainingTime);
}
/**
@@ -577,6 +582,18 @@ public class RunningAppManager {
}
boolean havaConfigure = TimeControlManager.getInstance().havaConfigure(pkg);
MachineControl machineControl = TimeControlManager.getInstance().getGlobalMachineControl();
+
+ Log.e(TAG, "inControlTime: globalRemainingTime = " + globalRemainingTime);
+ if (globalRemainingTime <= 0) {
+ if (machineControl != null) {
+ if (machineControl.getIs_part() == 0 && machineControl.getIs_quota() == 0) {
+ return;
+ }
+ } else {
+ ToastUtil.show("今日可使用时间已用完");
+ return;
+ }
+ }
if (havaConfigure) {
AppTimeControl appTimeControl = TimeControlManager.getInstance().getAppTimeControl(pkg);
//全局配置的
@@ -593,6 +610,8 @@ public class RunningAppManager {
appUsageTime.setUsageTime(appUsageTime.getUsageTime() + 1);
}
mGlobalUsageTime.put(pkg, appUsageTime);
+ } else if (appTimeControl.getTc_use_type() == 0) {
+ return;
} else {
mGlobalUsageTime.remove(pkg);
}
@@ -622,6 +641,7 @@ public class RunningAppManager {
mRemainingTimeMap.put(pkg, timeBean);
appTimeControl.setToday_time(remainingTime);
TimeControlManager.getInstance().setAppTimeControl(pkg, appTimeControl);
+ setGlobalUsageTime(globalRemainingTime - time);
} else {
if (machineControl == null) {
return;
@@ -684,6 +704,9 @@ public class RunningAppManager {
this.add("com.uiui.info");
this.add("com.tt.ttutils");
this.add(JGYUtils.fuxiaoying);
+ this.add("com.sprd.engineermode");
+ this.add("com.teclast.update");
+ this.add("com.incar.update");
}};
/**
@@ -703,9 +726,9 @@ public class RunningAppManager {
if (isControl == 0) {
return false;
}
-
boolean havaConfigure = TimeControlManager.getInstance().havaConfigure(pkg);
MachineControl machineControl = TimeControlManager.getInstance().getGlobalMachineControl();
+
if (havaConfigure) {
//有单独设置 不管是分类整机还是其他都是这个设置
AppTimeControl appTimeControl = TimeControlManager.getInstance().getAppTimeControl(pkg);
@@ -715,8 +738,34 @@ public class RunningAppManager {
return true;
}
if (appTimeControl.getTc_use_type() == 0) {
+ Log.e(TAG, "inControlTime: " + "应用始终可用");
return false;
}
+ }
+ Log.e(TAG, "inControlTime: globalRemainingTime = " + globalRemainingTime);
+ if (globalRemainingTime <= 0) {
+ if (machineControl != null) {
+ if (machineControl.getIs_part() == 0 && machineControl.getIs_quota() == 0) {
+ return false;
+ }
+ } else {
+ ToastUtil.show("今日可使用时间已用完");
+ return true;
+ }
+ }
+ if (havaConfigure) {
+ //有单独设置 不管是分类整机还是其他都是这个设置
+ AppTimeControl appTimeControl = TimeControlManager.getInstance().getAppTimeControl(pkg);
+// if (appTimeControl.getIs_control() == 0) {
+// ToastUtil.show("应用已被禁用");
+// Log.e(TAG, "inControlTime: " + "应用已被禁用");
+// return true;
+// }
+// if (appTimeControl.getTc_use_type() == 0) {
+// Log.e(TAG, "inControlTime: " + "应用始终可用");
+// return false;
+// }
+
//打开时间段管控
if (appTimeControl.getIs_part() == 1) {
boolean inControlTime = inControlTime(machineControl, appTimeControl);
@@ -725,7 +774,6 @@ public class RunningAppManager {
Log.i(TAG, "inControlTime: " + "应用在管控时间段不能打开" + appTimeControl.time_part.toString());
ToastUtil.show("该应用" + partTime2String(appTimeControl));
Log.e(TAG, "inControlTime: " + "该应用" + partTime2String(appTimeControl));
-
return true;
} else {
if (appTimeControl.getIs_quota() == 0) {
@@ -829,6 +877,10 @@ public class RunningAppManager {
}
+ /**
+ * @param pkg
+ * @return json数据
+ */
public String getDisableContent(String pkg) {
// NetInterfaceManager.getInstance().getMyAppList(new NetInterfaceManager.MyAppListCallback() {
// @Override
@@ -850,6 +902,17 @@ public class RunningAppManager {
// }
boolean havaConfigure = TimeControlManager.getInstance().havaConfigure(pkg);
MachineControl machineControl = TimeControlManager.getInstance().getGlobalMachineControl();
+
+ Log.e(TAG, "inControlTime: globalRemainingTime = " + globalRemainingTime);
+ if (globalRemainingTime <= 0) {
+ if (machineControl != null) {
+ if (machineControl.getIs_part() == 0 && machineControl.getIs_quota() == 0) {
+ return "";
+ }
+ } else {
+ return "";
+ }
+ }
if (havaConfigure) {
//有单独设置 不管是分类整机还是其他都是这个设置
AppTimeControl appTimeControl = TimeControlManager.getInstance().getAppTimeControl(pkg);
@@ -877,7 +940,7 @@ public class RunningAppManager {
} else {
if (appTimeControl.getIs_quota() == 0) {
//要求设置了管控时间段没有设置使用额度也可以使用
- return "没有管控";
+ return "";
}
if (getAppRemainingTime(pkg) <= 0) {
//没有剩余时间
@@ -904,7 +967,7 @@ public class RunningAppManager {
}
} else {
if (appTimeControl.getIs_quota() == 0) {
- return "没有管控";
+ return "";
}
if (getAppRemainingTime(pkg) <= 0) {
//没有剩余时间
@@ -1183,7 +1246,7 @@ public class RunningAppManager {
}
//禁用时段需要满足所有
boolean inPartTime = inPartTimes.indexOf(true) >= 0;
- return !inPartTime;
+ return inPartTime;
} else if (partType == 1) {
//开放时段只需要满足一个就行
for (PartTime partTime : partTimeHashSet) {
diff --git a/app/src/main/java/com/fuying/sn/desktop/TimeControlManager.java b/app/src/main/java/com/fuying/sn/desktop/TimeControlManager.java
index 3061e8d..613b6a9 100644
--- a/app/src/main/java/com/fuying/sn/desktop/TimeControlManager.java
+++ b/app/src/main/java/com/fuying/sn/desktop/TimeControlManager.java
@@ -110,7 +110,7 @@ public class TimeControlManager {
public void setGlobalMachineControl(MachineControl machineControl) {
this.mGlobalMachineControl = machineControl;
if (machineControl != null) {
- RunningAppManager.getInstance().setGlobalUsageTime(machineControl.getRest_time());
+ RunningAppManager.getInstance().setGlobalUsageTime(machineControl.getToday_time());
}
}
diff --git a/app/src/main/java/com/fuying/sn/manager/AmapManager.java b/app/src/main/java/com/fuying/sn/manager/AmapManager.java
index 567a5a2..9038d4f 100644
--- a/app/src/main/java/com/fuying/sn/manager/AmapManager.java
+++ b/app/src/main/java/com/fuying/sn/manager/AmapManager.java
@@ -130,12 +130,13 @@ public class AmapManager {
default:
}
}
- Log.e(TAG, "AmapAddress: " + (String) SPUtils.get(mContext, "AmapAddress", "-"));
- Log.e(TAG, "AmapError: " + (String) SPUtils.get(mContext, "AmapError", "-"));
+ Log.e(TAG, "AmapAddress: " + SPUtils.get(mContext, "AmapAddress", "-"));
+ Log.e(TAG, "AmapError: " + SPUtils.get(mContext, "AmapError", "-"));
Settings.Secure.putString(mContext.getContentResolver(), Settings.Secure.LOCATION_PROVIDERS_ALLOWED, "-gps");
Settings.Secure.putString(mContext.getContentResolver(), Settings.Secure.LOCATION_PROVIDERS_ALLOWED, "-network");
Settings.Secure.putString(mContext.getContentResolver(), Settings.Secure.LOCATION_PROVIDERS_ALLOWED, "");
Settings.Global.putInt(mContext.getContentResolver(), Settings.Global.ASSISTED_GPS_ENABLED, 0);
+ mLocationClient.stop();
}
@Override
@@ -194,6 +195,7 @@ public class AmapManager {
Log.e(TAG, "onLocationChanged: " + "定位失败");
SPUtils.put(mContext, "AmapError", sb);
Log.e(TAG, "onLocDiagnosticMessage: " + sb);
+ mLocationClient.stop();
}
};
}
diff --git a/app/src/main/java/com/fuying/sn/network/NetInterfaceManager.java b/app/src/main/java/com/fuying/sn/network/NetInterfaceManager.java
index 2c5905e..9463bbf 100644
--- a/app/src/main/java/com/fuying/sn/network/NetInterfaceManager.java
+++ b/app/src/main/java/com/fuying/sn/network/NetInterfaceManager.java
@@ -631,9 +631,11 @@ public class NetInterfaceManager {
} else if (code == 300) {
mCacheHelper.put(UrlAddress.SNINFO, "");
SPUtils.put(mContext, CommonConfig.isLogined, 0);
+ Settings.System.putInt(mContext.getContentResolver(), CommonConfig.KEY_IS_CONTROL, 0);
} else if (code == 401) {
mCacheHelper.put(UrlAddress.SNINFO, "");
SPUtils.put(mContext, CommonConfig.isLogined, 2);
+ Settings.System.putInt(mContext.getContentResolver(), CommonConfig.KEY_IS_CONTROL, 0);
}
}
@@ -673,6 +675,10 @@ public class NetInterfaceManager {
set.add(JGYUtils.MTK8515Tag);
} else if (platform == JGYUtils.G13Platform) {
set.add(JGYUtils.G13Tag);
+ } else if (platform == JGYUtils.G6Platform) {
+ set.add(JGYUtils.G6Tag);
+ } else if (platform == JGYUtils.iPlay50SEPlatform) {
+ set.add(JGYUtils.iPlay50SETag);
}
});
clearAndAppendTags(set);
@@ -809,7 +815,7 @@ public class NetInterfaceManager {
public void checkDeviceType(int type) {
switch (type) {
case cElderlyUsers:
- getElderlyUsersApp();
+// getElderlyUsersApp();
break;
default:
}
@@ -1873,49 +1879,6 @@ public class NetInterfaceManager {
}
});
-// getQueryAllAppControl()
-// .subscribe(new Observer>>() {
-// @Override
-// public void onSubscribe(@NonNull Disposable d) {
-// Log.e("getAllappPackage", "onSubscribe: ");
-// }
-//
-// @Override
-// public void onNext(@NonNull BaseResponse> listBaseResponse) {
-// int code = listBaseResponse.code;
-// if (code == 200) {
-// Log.e("getAllappPackage", "onNext: " + listBaseResponse);
-// List appInfoList = listBaseResponse.data;
-// if (null != appInfoList && appInfoList.size() != 0) {
-// mMMKV.encode(UrlAddress.GET_ALL_PACKAGE, GsonUtils.toJSONString(appInfoList));
-// HashSet allAppPkg = new HashSet<>();
-// for (AppInfo appInfo : appInfoList) {
-// allAppPkg.add(appInfo.getApp_package());
-// }
-// String allPkgSet = String.join(",", allAppPkg);
-// Settings.System.putString(crv, CommonConfig.ONLY_SHORTCUT_LIST, allPkgSet);
-// ApkUtils.writeAppPackageList(mContext, allPkgSet);
-// getAppStart(appInfoList);
-// } else {
-// mMMKV.encode(UrlAddress.GET_ALL_PACKAGE, "");
-// ApkUtils.writeAppPackageList(mContext, "");
-// }
-// } else {
-// mMMKV.encode(UrlAddress.GET_ALL_PACKAGE, "");
-// ApkUtils.writeAppPackageList(mContext, "");
-// }
-// }
-//
-// @Override
-// public void onError(@NonNull Throwable e) {
-// Log.e("getAllappPackage", "onError: " + e.getMessage());
-// }
-//
-// @Override
-// public void onComplete() {
-// Log.e("getAllappPackage", "onComplete: ");
-// }
-// });
}
public void getForceInstall(boolean refresh, BehaviorSubject lifecycle, CompleteCallback callback) {
@@ -2093,6 +2056,7 @@ public class NetInterfaceManager {
String data = new Gson().toJson(systemSettingsBaseResponse.data.getUser());
ControlManager.getInstance().setSystemSetting(data);
} else {
+ Settings.System.putInt(mContext.getContentResolver(), CommonConfig.KEY_IS_CONTROL, 0);
ControlManager.getInstance().setDisableSetting();
}
} else {
@@ -2427,7 +2391,7 @@ public class NetInterfaceManager {
public void getSnTimeControl(boolean refresh, BehaviorSubject lifecycle, CompleteCallback callback) {
- ConnectMode connectMode = ConnectMode.ONE_MINUTE;
+ ConnectMode connectMode = ConnectMode.DEFAULT;
if (refresh) {
connectMode = ConnectMode.DEFAULT;
}
@@ -2477,7 +2441,7 @@ public class NetInterfaceManager {
@Override
public void onNext(@NonNull BaseResponse machineControlBaseResponse) {
- Log.e("getSnTimeControlObserver", "onNext: ");
+ Log.e("getSnTimeControlObserver", "onNext: " + machineControlBaseResponse);
if (machineControlBaseResponse.code == 200) {
MachineControl machineControl = machineControlBaseResponse.data;
TimeControlManager.getInstance().setGlobalMachineControl(machineControl);
@@ -2637,6 +2601,9 @@ public class NetInterfaceManager {
Log.e(TAG, "installOverallApp: " + packageList);
for (OverallAppBean overallAppBean : overallAppBeanList) {
String packages = overallAppBean.getApp_package();
+ if (JGYUtils.fuyingApp.contains(packages)) {
+ continue;
+ }
String url = overallAppBean.getApp_url();
if (TextUtils.isEmpty(url)) {
continue;
diff --git a/app/src/main/java/com/fuying/sn/receiver/APKinstallReceiver.java b/app/src/main/java/com/fuying/sn/receiver/APKinstallReceiver.java
index c69a7e6..e9f05ad 100644
--- a/app/src/main/java/com/fuying/sn/receiver/APKinstallReceiver.java
+++ b/app/src/main/java/com/fuying/sn/receiver/APKinstallReceiver.java
@@ -68,10 +68,10 @@ public class APKinstallReceiver extends BroadcastReceiver {
newAppListener.setNewAppListener(packageName);
if (JGYUtils.PACKAGE_APPSTORE.equals(packageName)) {
//启动应用市场
- JGYUtils.getInstance().wakeUpDeviceInfo();
+// JGYUtils.getInstance().wakeUpDeviceInfo();
} else if (JGYUtils.PACKAGE_UPDATETOOLS.equals(packageName)) {
//启动升级组件
- JGYUtils.getInstance().wakeUpUpdateTools();
+// JGYUtils.getInstance().wakeUpUpdateTools();
}
}
diff --git a/app/src/main/java/com/fuying/sn/service/RemoteService.java b/app/src/main/java/com/fuying/sn/service/RemoteService.java
index f2f4387..02d229d 100644
--- a/app/src/main/java/com/fuying/sn/service/RemoteService.java
+++ b/app/src/main/java/com/fuying/sn/service/RemoteService.java
@@ -51,6 +51,7 @@ public class RemoteService extends Service {
@Override
public boolean inControl(String pkg) throws RemoteException {
+ Log.e(TAG, "inControl: " + RunningAppManager.getInstance().inControlTime(pkg));
return RunningAppManager.getInstance().inControlTime(pkg);
}
diff --git a/app/src/main/java/com/fuying/sn/service/main/MainSPresenter.java b/app/src/main/java/com/fuying/sn/service/main/MainSPresenter.java
index f8a3e71..591b71d 100644
--- a/app/src/main/java/com/fuying/sn/service/main/MainSPresenter.java
+++ b/app/src/main/java/com/fuying/sn/service/main/MainSPresenter.java
@@ -125,23 +125,23 @@ public class MainSPresenter implements MainSContact.Presenter {
NetInterfaceManager.getInstance().getSnInfo(true, getLifecycle(), new NetInterfaceManager.ObserverCallback() {
@Override
public void onSubscribe(Disposable d) {
- Log.e("getSnInfo", "onSubscribe: ");
+ Log.e("getSnInfom", "onSubscribe: ");
}
@Override
public void onNext(BaseResponse response) {
- Log.e("getSnInfo", "onNext: ");
+ Log.e("getSnInfom", "onNext: " + response);
mView.setSnInfo(response);
}
@Override
public void onError(Throwable e) {
- Log.e("getSnInfo", "onError: " + e.getMessage());
+ Log.e("getSnInfom", "onError: " + e.getMessage());
}
@Override
public void onComplete() {
- Log.e("getSnInfo", "onComplete: ");
+ Log.e("getSnInfom", "onComplete: ");
}
});
}
diff --git a/app/src/main/java/com/fuying/sn/service/main/MainService.java b/app/src/main/java/com/fuying/sn/service/main/MainService.java
index 104dbc7..9afbd08 100644
--- a/app/src/main/java/com/fuying/sn/service/main/MainService.java
+++ b/app/src/main/java/com/fuying/sn/service/main/MainService.java
@@ -125,6 +125,7 @@ public class MainService extends Service implements MainSContact.MainView, Netwo
mPresenter.getSnInfo();
mPresenter.getAppAndWhite();
SPUtils.put(MainService.this, CommonConfig.JGY_FIRST_BOOT, 1);
+ tPushInit();
}
}
}, 15000);
@@ -242,6 +243,7 @@ public class MainService extends Service implements MainSContact.MainView, Netwo
@Override
public void onReceiveLocation(BDLocation bdLocation) {
Log.e("initConfig", "onReceiveLocation: ");
+ locationClient.stop();
}
});
}
diff --git a/app/src/main/java/com/fuying/sn/tpush/MessageReceiver.java b/app/src/main/java/com/fuying/sn/tpush/MessageReceiver.java
index dbe0b17..cd9d9f4 100644
--- a/app/src/main/java/com/fuying/sn/tpush/MessageReceiver.java
+++ b/app/src/main/java/com/fuying/sn/tpush/MessageReceiver.java
@@ -784,6 +784,7 @@ public class MessageReceiver extends XGPushBaseReceiver {
NetInterfaceManager.getInstance().getSystemSettings();
break;
case ACTION_WHOLE_MACHINE_QUOTA:
+ NetInterfaceManager.getInstance().getSystemSettings();
NetInterfaceManager.getInstance().getAppTimeControl();
NetInterfaceManager.getInstance().getSnTimeControl();
break;
@@ -1022,7 +1023,6 @@ public class MessageReceiver extends XGPushBaseReceiver {
}
synchronized private void unintallApk(Context context, String jsonString) {
- int sn_id = (int) SPUtils.get(context, "sn_id", -1);
JsonObject object = GsonUtils.getJsonObject(jsonString);
String packageName = object.get("app_package").getAsString();
// 台电设备不删除无法静默卸载
@@ -1030,7 +1030,7 @@ public class MessageReceiver extends XGPushBaseReceiver {
ToastUtil.debugShow("收到应用卸载消息:包名" + packageName);
if (!"".equals(packageName) && !packageName.equals(context.getApplicationContext().getPackageName())) {
if (!ApkUtils.isAvailable(context.getApplicationContext(), packageName)) {
-// NetInterfaceManager.getInstance().setAppuninstallInfo(sn_id, packageName);
+
} else {
ApkUtils.uninstallApp(context, packageName);
}
diff --git a/app/src/main/java/com/fuying/sn/utils/JGYUtils.java b/app/src/main/java/com/fuying/sn/utils/JGYUtils.java
index c52caf9..527f321 100644
--- a/app/src/main/java/com/fuying/sn/utils/JGYUtils.java
+++ b/app/src/main/java/com/fuying/sn/utils/JGYUtils.java
@@ -97,6 +97,9 @@ public class JGYUtils {
public static final int MTK8515Platform = 6;
public static final int G13Platform = 7;
public static final int UnknowPlatform = 0;
+ public static final int iPlay50SEPlatform = 8;
+ public static final int G6Platform = 10;
+
public static final String MTKTag = "MTK";
public static final String ZhanruiTag = "展锐";
@@ -104,6 +107,8 @@ public class JGYUtils {
public static final String T30PROTag = "T30PRO";
public static final String MTK8515Tag = "8515";
public static final String G13Tag = "G13";
+ public static final String iPlay50SETag = "ipaly50SE";
+ public static final String G6Tag = "G6";
private HashSet ownApp = new HashSet() {{
@@ -159,6 +164,21 @@ public class JGYUtils {
public static final String growthspace = "com.pengren.growthspace";
public static final String pandaabc = "com.pandaabc.stu";
public static final String qibenyi = "com.goer.fuying";
+ public static final String word = "com.fuying.word";
+
+ public static Set fuyingApp = new HashSet() {{
+ this.add(fxyywgj);
+ this.add(gkwxhd);
+ this.add(fuxiaoying);
+ this.add(moshujia);
+ this.add(english);
+ this.add(zhiduoke);
+ this.add(aobama);
+ this.add(growthspace);
+ this.add(pandaabc);
+ this.add(qibenyi);
+ this.add(word);
+ }};
public static final String FUXIAOYING_KEY = "fuxiaoying_update_key";
@@ -499,6 +519,12 @@ public class JGYUtils {
} else if (G13Tag.equalsIgnoreCase(platform)) {
Log.i(TAG, "checkAppPlatform: " + "G13");
return G13Platform;
+ } else if (G6Tag.equalsIgnoreCase(platform)) {
+ Log.i(TAG, "checkAppPlatform: " + "G6");
+ return G6Platform;
+ } else if (iPlay50SETag.equalsIgnoreCase(platform)) {
+ Log.i(TAG, "checkAppPlatform: " + "ipaly50SE");
+ return iPlay50SEPlatform;
} else {
Log.i(TAG, "checkAppPlatform: " + "没有数据");
return UnknowPlatform;
@@ -532,6 +558,10 @@ public class JGYUtils {
getAppPlatformCallback.AppPlatform(MTK8515Platform);
} else if (G13Tag.equalsIgnoreCase(platform)) {
getAppPlatformCallback.AppPlatform(G13Platform);
+ } else if (G6Tag.equalsIgnoreCase(platform)) {
+ getAppPlatformCallback.AppPlatform(G6Platform);
+ } else if (iPlay50SETag.equalsIgnoreCase(platform)) {
+ getAppPlatformCallback.AppPlatform(iPlay50SEPlatform);
} else {
getAppPlatformCallback.AppPlatform(UnknowPlatform);
}
@@ -543,6 +573,8 @@ public class JGYUtils {
|| JGYUtils.getInstance().checkAppPlatform() == JGYUtils.T30ProPlatform
|| JGYUtils.getInstance().checkAppPlatform() == JGYUtils.MTK8515Platform
|| JGYUtils.getInstance().checkAppPlatform() == JGYUtils.G13Platform
+ || JGYUtils.getInstance().checkAppPlatform() == JGYUtils.G6Platform
+ || JGYUtils.getInstance().checkAppPlatform() == JGYUtils.iPlay50SEPlatform
) {
return getProperty("ro.build.display.id", "获取失败");
} else {
diff --git a/app/src/main/java/com/fuying/sn/utils/Utils.java b/app/src/main/java/com/fuying/sn/utils/Utils.java
index 45eac7a..6b7993c 100644
--- a/app/src/main/java/com/fuying/sn/utils/Utils.java
+++ b/app/src/main/java/com/fuying/sn/utils/Utils.java
@@ -615,7 +615,9 @@ public class Utils {
* @return
*/
public static String getSerial() {
- if (JGYUtils.getInstance().checkAppPlatform() == JGYUtils.G13Platform) {
+ if (JGYUtils.getInstance().checkAppPlatform() == JGYUtils.G13Platform
+ || JGYUtils.getInstance().checkAppPlatform() == JGYUtils.iPlay50SEPlatform
+ ) {
return getSn();
} else {
return JGYUtils.getInstance().getIMEI();