Compare commits
5
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d935d30c6c | ||
|
|
c7851a8a64 | ||
|
|
f42d63e93c | ||
|
|
1aa6016f1e | ||
|
|
055e63d1a0 |
No files matched your search
+2
-2
@@ -29,8 +29,8 @@ android {
|
||||
|
||||
defaultConfig {
|
||||
applicationId "com.aoleyun.sn"
|
||||
versionCode 212
|
||||
versionName "1.6.0421"
|
||||
versionCode 221
|
||||
versionName "1.6.0522"
|
||||
|
||||
//There are no CERT files because If the mini sdk version is 23+, the AGP will ignore the V1 scheme signature.
|
||||
minSdkVersion 24
|
||||
|
||||
@@ -3,21 +3,19 @@ package com.aoleyun.sn.activity;
|
||||
import android.app.ActivityManager;
|
||||
import android.content.Context;
|
||||
import android.os.Handler;
|
||||
import android.os.Looper;
|
||||
import android.util.Log;
|
||||
import android.view.View;
|
||||
import android.widget.TextView;
|
||||
|
||||
import androidx.databinding.DataBindingUtil;
|
||||
|
||||
import com.aoleyun.sn.BuildConfig;
|
||||
import com.aoleyun.sn.R;
|
||||
import com.aoleyun.sn.base.BaseDataBindingActivity;
|
||||
import com.aoleyun.sn.base.mvp.BaseMvpActivity;
|
||||
import com.aoleyun.sn.databinding.ActivityCleanupBinding;
|
||||
import com.aoleyun.sn.utils.ApkUtils;
|
||||
import com.aoleyun.sn.utils.AppUtil;
|
||||
import com.hjq.toast.Toaster;
|
||||
import com.king.view.circleprogressview.CircleProgressView;
|
||||
|
||||
import java.lang.reflect.Method;
|
||||
import java.util.List;
|
||||
@@ -68,7 +66,7 @@ public class CleanupActivity extends BaseDataBindingActivity {
|
||||
}
|
||||
Toaster.show(String.format(getString(R.string.clear_app_size), pkgList.size()));
|
||||
refreshMemory();
|
||||
Handler.getMain().postDelayed(new Runnable() {
|
||||
new Handler(Looper.getMainLooper()).postDelayed(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
finish();
|
||||
|
||||
@@ -10,6 +10,7 @@ import android.os.Build;
|
||||
import android.os.Bundle;
|
||||
import android.os.Environment;
|
||||
import android.os.Handler;
|
||||
import android.os.Looper;
|
||||
import android.provider.Settings;
|
||||
import android.util.Log;
|
||||
import android.view.View;
|
||||
@@ -25,7 +26,6 @@ import com.aoleyun.sn.BuildConfig;
|
||||
import com.aoleyun.sn.R;
|
||||
import com.aoleyun.sn.activity.main.MainActivity;
|
||||
import com.aoleyun.sn.comm.CommonConfig;
|
||||
import com.aoleyun.sn.comm.JGYActions;
|
||||
import com.aoleyun.sn.comm.PackageNames;
|
||||
import com.aoleyun.sn.network.NetInterfaceManager;
|
||||
import com.aoleyun.sn.service.LogcatService;
|
||||
@@ -66,7 +66,7 @@ public class SplashActivity extends AppCompatActivity {
|
||||
setContentView(R.layout.activity_home);
|
||||
initView();
|
||||
debugTest();
|
||||
new Handler().postDelayed(() -> {
|
||||
new Handler(Looper.getMainLooper()).postDelayed(() -> {
|
||||
startActivity(new Intent(SplashActivity.this, MainActivity.class));
|
||||
finish();
|
||||
// sendBroadcastStatus("0");
|
||||
@@ -101,7 +101,7 @@ public class SplashActivity extends AppCompatActivity {
|
||||
Utils.getAndroiodScreenProperty(SplashActivity.this);
|
||||
Log.e(TAG, "getOperators: " + NetworkUtils.getOperators(this));
|
||||
Log.e(TAG, "PublicIP: " + mMMKV.decodeString(NetInterfaceManager.PublicIP, ""));
|
||||
NetInterfaceManager.GetWhois();
|
||||
NetInterfaceManager.getWhois();
|
||||
Log.e(TAG, "initView: " + NetworkUtils.getPhoneNumber(this));
|
||||
FlowInfo flowInfo1 = GetFlowUtil.getAppFlowInfo(BuildConfig.APPLICATION_ID, this);
|
||||
Log.e(TAG, "initView: " + GetFlowUtil.byteToMB(flowInfo1.getUpKb()));
|
||||
@@ -171,7 +171,7 @@ public class SplashActivity extends AppCompatActivity {
|
||||
Log.e(TAG, "getCustomVersion: " + Utils.getCustomVersion());
|
||||
Log.e(TAG, "getRomVersion: " + Utils.getRomVersion());
|
||||
Log.i(TAG, "debugTest: " + BuildConfig.VERSION_NAME);
|
||||
Log.i(TAG, "debugTest: " + Utils.getAPPVersionName(PackageNames.APPSTORE, this));
|
||||
Log.i(TAG, "debugTest: " + Utils.getAppVersionName(PackageNames.APPSTORE, this));
|
||||
Log.i(TAG, "debugTest: " + Utils.getAndroid7MAC());
|
||||
Log.i(TAG, "debugTest: launcher3 " + JgyUtils.getInstance().getStartClassName("com.android.launcher3"));
|
||||
// try {
|
||||
|
||||
@@ -376,7 +376,7 @@ public class MainActivity extends BaseMvvmActivity<MainViewModel, ActivityMainBi
|
||||
public void onServiceConnected(ComponentName name, IBinder service) {
|
||||
Log.e(TAG, "onServiceConnected: ");
|
||||
mMainBinder = (MainService.MainBinder) service;
|
||||
mMainBinder.getService().mPresenter.getLockedState();
|
||||
mMainBinder.getService().mServiceModel.getLockedState();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -58,6 +58,7 @@ public class MainViewModel extends BaseViewModel<ActivityMainBinding, ActivityEv
|
||||
checkTestUpdate();
|
||||
getDefaultDesktop();
|
||||
getDefaultApp();
|
||||
getAllInfoAndSetting();
|
||||
}
|
||||
|
||||
public MutableLiveData<Boolean> mLockedData = new MutableLiveData<>();
|
||||
@@ -81,7 +82,7 @@ public class MainViewModel extends BaseViewModel<ActivityMainBinding, ActivityEv
|
||||
* 通过sn获取用户信息
|
||||
*/
|
||||
public void getStudesInfo() {
|
||||
NetInterfaceManager.getInstance().getStudesInfo(true, getLifecycle(), new NetInterfaceManager.StudesInfoListener() {
|
||||
NetInterfaceManager.getInstance().getStudesInfo(getLifecycle(), new NetInterfaceManager.StudesInfoListener() {
|
||||
@Override
|
||||
public void setStudentsInfo(StudentsInfo studentsInfo) {
|
||||
mStudentsInfoData.setValue(studentsInfo);
|
||||
@@ -97,7 +98,7 @@ public class MainViewModel extends BaseViewModel<ActivityMainBinding, ActivityEv
|
||||
public MutableLiveData<Boolean> mEBagCodeData = new MutableLiveData<>();
|
||||
|
||||
public void getEBagCode() {
|
||||
NetInterfaceManager.getInstance().getEBagCode(true, getLifecycle(), new NetInterfaceManager.onCompleteCallback() {
|
||||
NetInterfaceManager.getInstance().getEBagCode(getLifecycle(), new NetInterfaceManager.onCompleteCallback() {
|
||||
@Override
|
||||
public void onComplete() {
|
||||
mEBagCodeData.setValue(Settings.Global.getInt(getCtx().getContentResolver(), CommonConfig.UIUI_ACTIVATION_KEY, 0) == 1);
|
||||
@@ -141,10 +142,8 @@ public class MainViewModel extends BaseViewModel<ActivityMainBinding, ActivityEv
|
||||
public MutableLiveData<JsonObject> mUpdateInfoData = new MutableLiveData<>();
|
||||
|
||||
public void checkUpdateInfo() {
|
||||
NetInterfaceManager.getInstance()
|
||||
.getUpdateApi()
|
||||
.getUpdate(BuildConfig.APPLICATION_ID,
|
||||
JgyUtils.getInstance().checkAppPlatform())
|
||||
NetInterfaceManager.getInstance().getAppDownloadApi()
|
||||
.getUpdate(BuildConfig.APPLICATION_ID, JgyUtils.getInstance().checkAppPlatform())
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.compose(RxLifecycle.bindUntilEvent(getLifecycle(), ActivityEvent.DESTROY))
|
||||
@@ -188,7 +187,7 @@ public class MainViewModel extends BaseViewModel<ActivityMainBinding, ActivityEv
|
||||
|
||||
public void checkAoleyunUpdate() {
|
||||
NetInterfaceManager.getInstance()
|
||||
.checkAoleyunUpdate(true, getLifecycle(), new NetInterfaceManager.onCompleteCallback() {
|
||||
.checkAoleyunUpdate(getLifecycle(), new NetInterfaceManager.onCompleteCallback() {
|
||||
@Override
|
||||
public void onComplete() {
|
||||
|
||||
@@ -199,7 +198,7 @@ public class MainViewModel extends BaseViewModel<ActivityMainBinding, ActivityEv
|
||||
public void checkTestUpdate() {
|
||||
if (!JgyUtils.getInstance().tagEmpty()) {
|
||||
NetInterfaceManager.getInstance()
|
||||
.checkTestUpdate(true, getLifecycle(), new NetInterfaceManager.onCompleteCallback() {
|
||||
.checkTestUpdate(getLifecycle(), new NetInterfaceManager.onCompleteCallback() {
|
||||
@Override
|
||||
public void onComplete() {
|
||||
|
||||
@@ -222,7 +221,7 @@ public class MainViewModel extends BaseViewModel<ActivityMainBinding, ActivityEv
|
||||
|
||||
} else {
|
||||
NetInterfaceManager.getInstance()
|
||||
.getDefaultDesktop( getLifecycle(), new NetInterfaceManager.onCompleteCallback() {
|
||||
.getDefaultDesktop(getLifecycle(), new NetInterfaceManager.onCompleteCallback() {
|
||||
@Override
|
||||
public void onComplete() {
|
||||
|
||||
@@ -234,7 +233,7 @@ public class MainViewModel extends BaseViewModel<ActivityMainBinding, ActivityEv
|
||||
|
||||
public void getDefaultApp() {
|
||||
NetInterfaceManager.getInstance()
|
||||
.getDefaultApp(true, getLifecycle(), new NetInterfaceManager.onCompleteCallback() {
|
||||
.getDefaultApp(getLifecycle(), new NetInterfaceManager.onCompleteCallback() {
|
||||
@Override
|
||||
public void onComplete() {
|
||||
|
||||
@@ -242,6 +241,9 @@ public class MainViewModel extends BaseViewModel<ActivityMainBinding, ActivityEv
|
||||
});
|
||||
}
|
||||
|
||||
public void getAllInfoAndSetting() {
|
||||
NetInterfaceManager.getInstance().getAllInfoAndSetting(getLifecycle());
|
||||
}
|
||||
|
||||
public MutableLiveData<Bitmap> mQrCodeData = new MutableLiveData<>();
|
||||
|
||||
@@ -292,7 +294,7 @@ public class MainViewModel extends BaseViewModel<ActivityMainBinding, ActivityEv
|
||||
|| "HT01".equals(Build.MODEL)) {
|
||||
mShowPanel.setValue(true);
|
||||
} else if ("G10-M".equals(Build.MODEL)
|
||||
||"Ebox201W".equals(Build.MODEL)) {
|
||||
|| "Ebox201W".equals(Build.MODEL)) {
|
||||
mShowPanel.setValue(false);
|
||||
}
|
||||
|
||||
@@ -345,8 +347,8 @@ public class MainViewModel extends BaseViewModel<ActivityMainBinding, ActivityEv
|
||||
});
|
||||
}
|
||||
|
||||
public void getPushTags(){
|
||||
NetInterfaceManager.getInstance().setPushTags(getLifecycle(), new NetInterfaceManager.PushTagCallback() {
|
||||
public void getPushTags() {
|
||||
NetInterfaceManager.getInstance().getPushAndPubAppTag(getLifecycle(), new NetInterfaceManager.PushTagCallback() {
|
||||
@Override
|
||||
public void setPushTag(String tag) {
|
||||
|
||||
|
||||
@@ -320,7 +320,7 @@ public class BaseApplication extends MultiDexApplication {
|
||||
aliyunPushInit();
|
||||
break;
|
||||
default:
|
||||
NetInterfaceManager.getInstance().setPushTags();
|
||||
NetInterfaceManager.getInstance().getPushAndPubAppTag();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,71 @@
|
||||
package com.aoleyun.sn.base;
|
||||
|
||||
import android.app.Service;
|
||||
import android.content.Intent;
|
||||
|
||||
import androidx.lifecycle.Lifecycle;
|
||||
import androidx.lifecycle.LifecycleOwner;
|
||||
import androidx.lifecycle.LifecycleRegistry;
|
||||
|
||||
import com.trello.rxlifecycle4.LifecycleProvider;
|
||||
import com.trello.rxlifecycle4.LifecycleTransformer;
|
||||
import com.trello.rxlifecycle4.RxLifecycle;
|
||||
import com.trello.rxlifecycle4.android.ActivityEvent;
|
||||
import com.trello.rxlifecycle4.android.RxLifecycleAndroid;
|
||||
|
||||
import io.reactivex.rxjava3.core.Observable;
|
||||
import io.reactivex.rxjava3.subjects.BehaviorSubject;
|
||||
|
||||
public abstract class BaseService extends Service implements LifecycleProvider<ActivityEvent>, LifecycleOwner {
|
||||
|
||||
private final BehaviorSubject<ActivityEvent> lifecycleSubject = BehaviorSubject.create();
|
||||
|
||||
public BehaviorSubject<ActivityEvent> getLifecycleSubject() {
|
||||
return lifecycleSubject;
|
||||
}
|
||||
|
||||
@Override
|
||||
public final Observable<ActivityEvent> lifecycle() {
|
||||
return lifecycleSubject.hide();
|
||||
}
|
||||
|
||||
@Override
|
||||
public final <T> LifecycleTransformer<T> bindUntilEvent(ActivityEvent event) {
|
||||
return RxLifecycle.bindUntilEvent(lifecycleSubject, event);
|
||||
}
|
||||
|
||||
@Override
|
||||
public final <T> LifecycleTransformer<T> bindToLifecycle() {
|
||||
return RxLifecycleAndroid.bindActivity(lifecycleSubject);
|
||||
}
|
||||
|
||||
private final LifecycleRegistry lifecycleRegistry = new LifecycleRegistry(this);
|
||||
|
||||
@Override
|
||||
public Lifecycle getLifecycle() {
|
||||
return lifecycleRegistry;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onCreate() {
|
||||
super.onCreate();
|
||||
lifecycleSubject.onNext(ActivityEvent.CREATE);
|
||||
lifecycleRegistry.handleLifecycleEvent(Lifecycle.Event.ON_CREATE);
|
||||
//修补在Service中LiveData不能触发
|
||||
lifecycleRegistry.handleLifecycleEvent(Lifecycle.Event.ON_START);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int onStartCommand(Intent intent, int flags, int startId) {
|
||||
lifecycleRegistry.handleLifecycleEvent(Lifecycle.Event.ON_RESUME);
|
||||
return super.onStartCommand(intent, flags, startId);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onDestroy() {
|
||||
super.onDestroy();
|
||||
lifecycleSubject.onNext(ActivityEvent.DESTROY);
|
||||
lifecycleRegistry.handleLifecycleEvent(Lifecycle.Event.ON_DESTROY);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -2,13 +2,11 @@ package com.aoleyun.sn.bean;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
|
||||
|
||||
import com.google.gson.Gson;
|
||||
import com.google.gson.JsonParser;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
|
||||
public class BaseResponse<T> implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 5468533687801294972L;
|
||||
@@ -17,6 +15,10 @@ public class BaseResponse<T> implements Serializable {
|
||||
public String msg;
|
||||
public T data;
|
||||
|
||||
public boolean isSuccess() {
|
||||
return code == 200;
|
||||
}
|
||||
|
||||
@NonNull
|
||||
@Override
|
||||
public String toString() {
|
||||
|
||||
@@ -14,6 +14,8 @@ public class ForceDownloadData implements Serializable {
|
||||
String app_id;
|
||||
String app_md5;
|
||||
long app_version_code;
|
||||
int allow_install_app;
|
||||
|
||||
|
||||
public String getApp_package() {
|
||||
return app_package;
|
||||
@@ -63,6 +65,14 @@ public class ForceDownloadData implements Serializable {
|
||||
this.app_md5 = app_md5;
|
||||
}
|
||||
|
||||
public int getAllow_install_app() {
|
||||
return allow_install_app;
|
||||
}
|
||||
|
||||
public void setAllow_install_app(int allow_install_app) {
|
||||
this.allow_install_app = allow_install_app;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return JsonParser.parseString(new Gson().toJson(this)).getAsJsonObject().toString();
|
||||
|
||||
@@ -1,48 +0,0 @@
|
||||
package com.aoleyun.sn.bean;
|
||||
|
||||
import com.google.gson.Gson;
|
||||
import com.google.gson.JsonParser;
|
||||
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
public class NetAndLaunchBean implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = -5029848848935111774L;
|
||||
|
||||
private int code;
|
||||
private String msg;
|
||||
private List<NetAndLaunchData> data;
|
||||
|
||||
public int getCode() {
|
||||
return code;
|
||||
}
|
||||
|
||||
public void setCode(int code) {
|
||||
this.code = code;
|
||||
}
|
||||
|
||||
public String getMsg() {
|
||||
return msg;
|
||||
}
|
||||
|
||||
public void setMsg(String msg) {
|
||||
this.msg = msg;
|
||||
}
|
||||
|
||||
public List<NetAndLaunchData> getData() {
|
||||
return data;
|
||||
}
|
||||
|
||||
public void setData(List<NetAndLaunchData> data) {
|
||||
this.data = data;
|
||||
}
|
||||
|
||||
@NotNull
|
||||
@Override
|
||||
public String toString() {
|
||||
return JsonParser.parseString(new Gson().toJson(this)).getAsJsonObject().toString();
|
||||
}
|
||||
}
|
||||
@@ -17,6 +17,7 @@ public class NetAndLaunchData implements Serializable {
|
||||
int is_appstore;
|
||||
int is_notification;
|
||||
int is_dynamic_perm;
|
||||
int allow_install_app;
|
||||
|
||||
|
||||
public int getIs_slide() {
|
||||
@@ -93,6 +94,14 @@ public class NetAndLaunchData implements Serializable {
|
||||
this.is_dynamic_perm = is_dynamic_perm;
|
||||
}
|
||||
|
||||
public int getAllow_install_app() {
|
||||
return allow_install_app;
|
||||
}
|
||||
|
||||
public void setAllow_install_app(int allow_install_app) {
|
||||
this.allow_install_app = allow_install_app;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return JsonParser.parseString(new Gson().toJson(this)).getAsJsonObject().toString();
|
||||
|
||||
@@ -0,0 +1,26 @@
|
||||
package com.aoleyun.sn.bean;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
public class PushTag implements Serializable {
|
||||
private static final long serialVersionUID = 4259225499869024039L;
|
||||
|
||||
String tag;
|
||||
String tag_type;
|
||||
|
||||
public String getTag() {
|
||||
return tag;
|
||||
}
|
||||
|
||||
public void setTag(String tag) {
|
||||
this.tag = tag;
|
||||
}
|
||||
|
||||
public String getTag_type() {
|
||||
return tag_type;
|
||||
}
|
||||
|
||||
public void setTag_type(String tag_type) {
|
||||
this.tag_type = tag_type;
|
||||
}
|
||||
}
|
||||
@@ -67,6 +67,8 @@ public class CommonConfig {
|
||||
public final static String DEVICES_TAG = "Aoleyun_devices_tpush_tag";
|
||||
/*分组标签*/
|
||||
public final static String DEVICES_GROUP_TAG = "Aoleyun_devices_tpush_group_tag";
|
||||
/*公共应用标签*/
|
||||
public final static String SN_PUBLIC_APP_TAG = "Aoleyun_sn_public_app_tag";
|
||||
/*上次获取标签的时间*/
|
||||
public final static String GET_DEVICES_TAG_LASTTIME = "Aoleyun_devices_tag_last_time";
|
||||
/*专注模式刷新*/
|
||||
@@ -115,9 +117,13 @@ public class CommonConfig {
|
||||
public final static String AOLE_APP_ALLOW_INSTALL = "aole_app_allow_install";
|
||||
/*应用安装白名单*/
|
||||
public final static String AOLE_ACTION_APP_FORBID = "aole_app_forbid";
|
||||
/*公共应用白名单*/
|
||||
public final static String AOLE_PUBLIC_APP_INSTALL_WHITELIST = "aole_public_app_install_whitelist_set";
|
||||
/*强制安装应用,禁止卸载*/
|
||||
public final static String AOLE_ACTION_FORCE_APP = "aole_force_app";
|
||||
/*指定应用安装源 非指定包名不能安装apk*/
|
||||
public static final String SEEWO_APP_SOURCE_INSTALL_WHITELIST = "seewo_app_source_install_whitelist";
|
||||
/*指定应用安装源 非指定包名不能安装apk*/
|
||||
public static final String APP_SOURCE_WHITE_LIST = "app_source_white_list";
|
||||
|
||||
/*应用ID管控*/
|
||||
|
||||
File diff suppressed because it is too large.
Load diff
@@ -13,6 +13,16 @@ public class UrlAddress {
|
||||
public static final String GET_DEVICES_LOCKED = "lock/index";
|
||||
/*获取设备标签*/
|
||||
public static final String GET_DEVICES_TAGS = "Sn/getSnTag";
|
||||
/*获取公共应用推送标签*/
|
||||
public static final String GET_PUSH_TAG = "sn/get-push-tag";
|
||||
/*通过sn获取信息*/
|
||||
public static final String GET_STUDENTS_INFO = "Sn/getStudent";
|
||||
/*获取霸屏状态*/
|
||||
public static final String GET_LOCK_SCREEN_STATE = "Sn/getSnScreen";
|
||||
/*开发人员选项开关*/
|
||||
public static final String GET_DEVELOPER = "Sn/getDeveloper";
|
||||
/*获取电子书包激活码*/
|
||||
public static final String GET_EBAG_CODE = "And/getEbagCode";
|
||||
/*绑定设备*/
|
||||
public static final String SN_CONFIRM_BIND = "And/sn/snConfirmBind";
|
||||
|
||||
@@ -32,6 +42,11 @@ public class UrlAddress {
|
||||
public static final String CHECK_UPDATE = "Silent/silent";
|
||||
/*获取测试app*/
|
||||
public static final String GET_SN_APP_TEST = "Sn/getSnAppTest";
|
||||
/*强制安装应用 不允许卸载*/
|
||||
public static final String GET_FORCE_INSTALL_LIST = "forceinstall/index";
|
||||
/*分组应用强制安装*/
|
||||
public static final String GROUP_APP_INSTALL_LIST = "forceinstall/group-app";
|
||||
|
||||
/*电子围栏*/
|
||||
public static final String GET_SN_EFENCE = "android/sn/efence";
|
||||
|
||||
@@ -39,15 +54,14 @@ public class UrlAddress {
|
||||
public static final String SET_WHITE_PACKAGE_LIST = "firmware/index";
|
||||
/*获取全部应用*/
|
||||
public static final String GET_ALL_APP = "recommend/index";
|
||||
/*应用管控的应用*/
|
||||
public static final String GET_ADMIN_APP = "And/app/getAdminApp";
|
||||
/*公共应用*/
|
||||
public static final String HTTP_TAG_COMMOAPP = "Rank/commonApp";
|
||||
/*强制安装应用*/
|
||||
public static final String GET_FORCE_INSTALL_LIST = "forceinstall/index";
|
||||
/*分组应用强制安装*/
|
||||
public static final String GROUP_APP_INSTALL_LIST = "forceinstall/group-app";
|
||||
|
||||
/*通过固件名获取内置应用*/
|
||||
@Deprecated
|
||||
public static final String GET_ROM_APP = "And/getFirmwareApp";
|
||||
|
||||
/*获取应用升级自启*/
|
||||
public static final String NET_AND_LAUNCH_API = "automatic/get";
|
||||
/*获取禁用的app包名*/
|
||||
@@ -58,8 +72,7 @@ public class UrlAddress {
|
||||
public static final String GET_APPID = "application/index";
|
||||
/*app内部网页管控*/
|
||||
public static final String SET_APPINSIDEWEB = "Appground";
|
||||
/*应用管控的应用*/
|
||||
public static final String GET_ADMIN_APP = "And/app/getAdminApp";
|
||||
|
||||
|
||||
/*app下载完成发送下载次数*/
|
||||
@Deprecated
|
||||
@@ -70,36 +83,30 @@ public class UrlAddress {
|
||||
|
||||
/*上传安装的应用信息*/
|
||||
public static final String UPLOAD_APPINFO = "log/index";
|
||||
/*通过sn获取信息*/
|
||||
public static final String GET_STUDENTS_INFO = "Sn/getStudent";
|
||||
/*发送设备信息*/
|
||||
public static final String SEND_DEVICES = "Mac/getMac";
|
||||
/*上传我的设备*/
|
||||
public static final String UPDATE_DEVICEINFO = "Mac/getInfo";
|
||||
/*发送app使用情况*/
|
||||
public static final String GET_APP_LOG = "Applog/getAppLog";
|
||||
/*获取电子书包激活码*/
|
||||
public static final String GET_EBAG_CODE = "And/getEbagCode";
|
||||
/*恢复出厂设置次数*/
|
||||
public static final String SEND_RESTORE_TIMES = "And/restore";
|
||||
/*上传截图*/
|
||||
public static final String SEND_SCREENSHOT = "Screenshot/addImg";
|
||||
/*上传锁屏状态*/
|
||||
public static final String GET_LOCK_STATE = "Application/getLockState";
|
||||
/*获取霸屏状态*/
|
||||
public static final String GET_LOCK_SCREEN_STATE = "Sn/getSnScreen";
|
||||
/*上传电池信息*/
|
||||
public static final String SEND_BATTERY_INFO = "And/sn/updateBatteryInfo";
|
||||
/*上传联网时间*/
|
||||
public static final String NETWORK_CONNECT = "And/network";
|
||||
/*小程序的管控设置*/
|
||||
public static final String GET_SN_SETTING = "And/control/getSnSetting";
|
||||
|
||||
|
||||
/**
|
||||
* 系统策略相关
|
||||
*/
|
||||
|
||||
/*小程序的管控设置*/
|
||||
public static final String GET_SN_SETTING = "And/control/getSnSetting";
|
||||
/*获取隐藏桌面图标*/
|
||||
public static final String GET_HIDE_DESKTOPICON = "Icon";
|
||||
/*获取系统设置*/
|
||||
@@ -134,21 +141,15 @@ public class UrlAddress {
|
||||
|
||||
/*开机动画*/
|
||||
public static final String GET_LOGO_IMG = "Sn/getLogoImg";
|
||||
/*获取壁纸设置*/
|
||||
public static final String GET_WALLPAPER = "android/sn/wallpaper";
|
||||
/*获取默认桌面升级*/
|
||||
public static final String GET_DESKTOP = "Sn/getSnDesktop";
|
||||
/*获取自定义桌面升级*/
|
||||
public static final String GET_DESKTOPS_DIY_UPDATE = "Sn/getDesktopsDiyUpdate";
|
||||
/*获取系统默认程序*/
|
||||
public static final String GET_DEFAULT_APP = "app/getDefaultApp";
|
||||
/*获取壁纸设置*/
|
||||
public static final String GET_WALLPAPER = "android/sn/wallpaper";
|
||||
|
||||
/**
|
||||
* 开发人员调试
|
||||
*/
|
||||
|
||||
/*开发人员选项开关*/
|
||||
public static final String GET_DEVELOPER = "Sn/getDeveloper";
|
||||
|
||||
/**
|
||||
* log相关
|
||||
|
||||
@@ -0,0 +1,58 @@
|
||||
package com.aoleyun.sn.network.api.aoleyun;
|
||||
|
||||
import com.aoleyun.sn.bean.AppAttr;
|
||||
import com.aoleyun.sn.bean.AppID;
|
||||
import com.aoleyun.sn.bean.Appground;
|
||||
import com.aoleyun.sn.bean.BaseResponse;
|
||||
import com.aoleyun.sn.bean.NetAndLaunchData;
|
||||
import com.aoleyun.sn.bean.TopApp;
|
||||
import com.aoleyun.sn.network.UrlAddress;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import io.reactivex.rxjava3.core.Observable;
|
||||
import retrofit2.http.Field;
|
||||
import retrofit2.http.FormUrlEncoded;
|
||||
import retrofit2.http.GET;
|
||||
import retrofit2.http.POST;
|
||||
import retrofit2.http.Query;
|
||||
|
||||
public interface AppControlApi {
|
||||
@FormUrlEncoded
|
||||
@POST(UrlAddress.NET_AND_LAUNCH_API)
|
||||
Observable<BaseResponse<List<NetAndLaunchData>>> getNetAndLaunchApi(
|
||||
@Field("key") String key,
|
||||
@Field("sn") String sn
|
||||
);
|
||||
|
||||
@GET(UrlAddress.GET_SN_APP_ATTR)
|
||||
Observable<BaseResponse<List<AppAttr>>> getSnAppAttr(
|
||||
@Query("sn") String sn
|
||||
);
|
||||
|
||||
@GET(UrlAddress.GET_TOP_APP_CONTROL)
|
||||
Observable<BaseResponse<TopApp>> getSnAppControl(
|
||||
@Query("sn") String sn
|
||||
);
|
||||
|
||||
@FormUrlEncoded
|
||||
@POST(UrlAddress.GET_APPID)
|
||||
Observable<BaseResponse<List<AppID>>> getDeselectIDApi(
|
||||
@Field("key") String key,
|
||||
@Field("sn") String sn
|
||||
);
|
||||
|
||||
@FormUrlEncoded
|
||||
@POST(UrlAddress.SET_APPINSIDEWEB)
|
||||
Observable<BaseResponse> getNewAppinsideWeb(
|
||||
@Field("key") String key,
|
||||
@Field("sn") String sn
|
||||
);
|
||||
|
||||
@FormUrlEncoded
|
||||
@POST(UrlAddress.SET_APPINSIDEWEB)
|
||||
Observable<BaseResponse<List<Appground>>> getAppinsideWeb(
|
||||
@Field("key") String key,
|
||||
@Field("sn") String sn
|
||||
);
|
||||
}
|
||||
+24
-3
@@ -1,19 +1,41 @@
|
||||
package com.aoleyun.sn.network.api.post;
|
||||
package com.aoleyun.sn.network.api.aoleyun;
|
||||
|
||||
import com.aoleyun.sn.bean.AppUpdateInfo;
|
||||
import com.aoleyun.sn.bean.BaseResponse;
|
||||
import com.aoleyun.sn.bean.ForceDownloadData;
|
||||
import com.aoleyun.sn.network.UrlAddress;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import io.reactivex.rxjava3.core.Observable;
|
||||
import retrofit2.http.Field;
|
||||
import retrofit2.http.FieldMap;
|
||||
import retrofit2.http.FormUrlEncoded;
|
||||
import retrofit2.http.GET;
|
||||
import retrofit2.http.POST;
|
||||
import retrofit2.http.Query;
|
||||
|
||||
public interface ForceDownloadApi {
|
||||
public interface AppDownloadApi {
|
||||
@FormUrlEncoded
|
||||
@POST(UrlAddress.CHECK_UPDATE)
|
||||
//1MTK平台 2展锐平台
|
||||
Observable<BaseResponse<AppUpdateInfo>> getUpdate(
|
||||
@Field("package") String packageName,
|
||||
@Field("type") int type
|
||||
);
|
||||
|
||||
@FormUrlEncoded
|
||||
@POST(UrlAddress.CHECK_UPDATE)
|
||||
Observable<BaseResponse<AppUpdateInfo>> getUpdate(
|
||||
@FieldMap Map<String, String> params
|
||||
);
|
||||
|
||||
@GET(UrlAddress.GET_SN_APP_TEST)
|
||||
Observable<BaseResponse<List<ForceDownloadData>>> getTestUpdate(
|
||||
@Query("sn") String sn
|
||||
);
|
||||
|
||||
@FormUrlEncoded
|
||||
@POST(UrlAddress.GET_FORCE_INSTALL_LIST)
|
||||
Observable<BaseResponse<List<ForceDownloadData>>> getForceDownloadApi(
|
||||
@@ -26,5 +48,4 @@ public interface ForceDownloadApi {
|
||||
@Query("key") String key,
|
||||
@Query("sn") String sn
|
||||
);
|
||||
|
||||
}
|
||||
@@ -0,0 +1,53 @@
|
||||
package com.aoleyun.sn.network.api.aoleyun;
|
||||
|
||||
import com.aoleyun.sn.bean.AppDateInfo;
|
||||
import com.aoleyun.sn.bean.AppLimit;
|
||||
import com.aoleyun.sn.bean.AppListInfo;
|
||||
import com.aoleyun.sn.bean.BaseResponse;
|
||||
import com.aoleyun.sn.bean.CustomROMApp;
|
||||
import com.aoleyun.sn.network.UrlAddress;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import io.reactivex.rxjava3.core.Observable;
|
||||
import retrofit2.http.Field;
|
||||
import retrofit2.http.FormUrlEncoded;
|
||||
import retrofit2.http.GET;
|
||||
import retrofit2.http.POST;
|
||||
import retrofit2.http.Query;
|
||||
|
||||
public interface AppInstallStrategyApi {
|
||||
@FormUrlEncoded
|
||||
@POST(UrlAddress.SET_WHITE_PACKAGE_LIST)
|
||||
Observable<BaseResponse<AppLimit>> getAppLimitApi(
|
||||
@Field("key") String key,
|
||||
@Field("sn") String sn
|
||||
);
|
||||
|
||||
@FormUrlEncoded
|
||||
@POST(UrlAddress.GET_ALL_APP)
|
||||
Observable<BaseResponse<List<AppListInfo>>> getAllAppList(
|
||||
@Field("key") String key,
|
||||
@Field("sn") String sn
|
||||
);
|
||||
|
||||
@GET(UrlAddress.GET_ADMIN_APP)
|
||||
Observable<BaseResponse<List<AppDateInfo>>> getAdminApp(
|
||||
@Query("sn") String sn
|
||||
);
|
||||
|
||||
@FormUrlEncoded
|
||||
@POST(UrlAddress.HTTP_TAG_COMMOAPP)
|
||||
Observable<BaseResponse<List<AppDateInfo>>> getRankApp(
|
||||
@Field("key") String key,
|
||||
@Field("sn") String sn,
|
||||
@Field("page") String page
|
||||
);
|
||||
|
||||
@FormUrlEncoded
|
||||
@POST(UrlAddress.GET_ROM_APP)
|
||||
Observable<BaseResponse<CustomROMApp>> getRomApp(
|
||||
@Field("key") String key,
|
||||
@Field("version_number") String version_number
|
||||
);
|
||||
}
|
||||
+7
-1
@@ -1,6 +1,7 @@
|
||||
package com.aoleyun.sn.network.api.get;
|
||||
package com.aoleyun.sn.network.api.aoleyun;
|
||||
|
||||
import com.aoleyun.sn.bean.BaseResponse;
|
||||
import com.aoleyun.sn.bean.LessonApp;
|
||||
import com.aoleyun.sn.bean.LessonSetting;
|
||||
import com.aoleyun.sn.network.UrlAddress;
|
||||
|
||||
@@ -13,4 +14,9 @@ public interface CloudLessonApi {
|
||||
Observable<BaseResponse<LessonSetting>> getCloudLessonSetting(
|
||||
@Query("sn") String sn
|
||||
);
|
||||
|
||||
@GET(UrlAddress.GET_CLOUD_LESSON_APP)
|
||||
Observable<BaseResponse<LessonApp>> getCloudLessonApp(
|
||||
@Query("sn") String sn
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1,68 @@
|
||||
package com.aoleyun.sn.network.api.aoleyun;
|
||||
|
||||
import com.aoleyun.sn.bean.BaseResponse;
|
||||
import com.aoleyun.sn.bean.Batch;
|
||||
import com.aoleyun.sn.bean.DeveloperBean;
|
||||
import com.aoleyun.sn.bean.EBagCode;
|
||||
import com.aoleyun.sn.bean.PushTag;
|
||||
import com.aoleyun.sn.bean.ScreenLockState;
|
||||
import com.aoleyun.sn.bean.StudentsInfo;
|
||||
import com.aoleyun.sn.network.UrlAddress;
|
||||
|
||||
import io.reactivex.rxjava3.core.Observable;
|
||||
import retrofit2.http.Field;
|
||||
import retrofit2.http.FormUrlEncoded;
|
||||
import retrofit2.http.GET;
|
||||
import retrofit2.http.POST;
|
||||
import retrofit2.http.Query;
|
||||
|
||||
public interface DevicesStatusApi {
|
||||
@FormUrlEncoded
|
||||
@POST(UrlAddress.GET_DEVICES_LOCKED)
|
||||
Observable<BaseResponse> getLockedState(
|
||||
@Field("sn") String sn
|
||||
);
|
||||
|
||||
@GET(UrlAddress.GET_DEVICES_TAGS)
|
||||
Observable<BaseResponse<Batch>> getSnTag(
|
||||
@Query("sn") String sn
|
||||
);
|
||||
|
||||
@GET(UrlAddress.GET_PUSH_TAG)
|
||||
Observable<BaseResponse<PushTag>> getPushTag(
|
||||
@Query("sn") String sn,
|
||||
@Query("tag_type") int tag_type
|
||||
);
|
||||
|
||||
@FormUrlEncoded
|
||||
@POST(UrlAddress.GET_STUDENTS_INFO)
|
||||
Observable<BaseResponse<StudentsInfo>> getStudentsInfo(
|
||||
@Field("sn") String sn
|
||||
);
|
||||
|
||||
@GET(UrlAddress.GET_LOCK_SCREEN_STATE)
|
||||
Observable<BaseResponse<ScreenLockState>> getScreenLockState(
|
||||
@Query("sn") String sn
|
||||
);
|
||||
|
||||
@GET(UrlAddress.GET_DEVELOPER)
|
||||
Observable<BaseResponse<DeveloperBean>> getDeveloperState(
|
||||
@Query("sn") String sn
|
||||
);
|
||||
|
||||
@FormUrlEncoded
|
||||
@POST(UrlAddress.GET_EBAG_CODE)
|
||||
Observable<BaseResponse<EBagCode>> getEBagCode(
|
||||
@Field("key") String key,
|
||||
@Field("sn") String sn
|
||||
);
|
||||
|
||||
@FormUrlEncoded
|
||||
@POST(UrlAddress.SN_CONFIRM_BIND)
|
||||
Observable<BaseResponse> snConfirmBind(
|
||||
@Field("sn") String sn,
|
||||
@Field("userId") String userId,
|
||||
@Field("type") int type
|
||||
);
|
||||
|
||||
}
|
||||
@@ -0,0 +1,38 @@
|
||||
package com.aoleyun.sn.network.api.aoleyun;
|
||||
|
||||
import com.aoleyun.sn.bean.BaseResponse;
|
||||
import com.aoleyun.sn.bean.SnRunLog;
|
||||
import com.aoleyun.sn.network.UrlAddress;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
import io.reactivex.rxjava3.core.Observable;
|
||||
import okhttp3.MultipartBody;
|
||||
import retrofit2.http.GET;
|
||||
import retrofit2.http.Multipart;
|
||||
import retrofit2.http.POST;
|
||||
import retrofit2.http.Part;
|
||||
import retrofit2.http.Query;
|
||||
import retrofit2.http.QueryMap;
|
||||
|
||||
public interface LogApi {
|
||||
|
||||
@GET(UrlAddress.GET_LOG_ORDER)
|
||||
Observable<BaseResponse<SnRunLog>> getSnRunLog(
|
||||
@Query("sn") String sn
|
||||
);
|
||||
|
||||
@Multipart
|
||||
@POST(UrlAddress.UPLOAD_LOG_FILE)
|
||||
Observable<BaseResponse> uploadLog(
|
||||
@QueryMap Map<String, String> params,
|
||||
@Part MultipartBody.Part body
|
||||
);
|
||||
|
||||
@Multipart
|
||||
@POST(UrlAddress.UPLOAD_IS_LOG_FILE)
|
||||
Observable<BaseResponse> sendSnLog(
|
||||
@QueryMap Map<String, String> params,
|
||||
@Part MultipartBody.Part body
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1,39 @@
|
||||
package com.aoleyun.sn.network.api.aoleyun;
|
||||
|
||||
import com.aoleyun.sn.bean.BaseResponse;
|
||||
import com.aoleyun.sn.bean.DefaultApp;
|
||||
import com.aoleyun.sn.bean.ForceDownloadData;
|
||||
import com.aoleyun.sn.bean.LogoImg;
|
||||
import com.aoleyun.sn.bean.Wallpaper;
|
||||
import com.aoleyun.sn.network.UrlAddress;
|
||||
|
||||
import io.reactivex.rxjava3.core.Observable;
|
||||
import retrofit2.http.GET;
|
||||
import retrofit2.http.Query;
|
||||
|
||||
public interface SystemCustomApi {
|
||||
@GET(UrlAddress.GET_LOGO_IMG)
|
||||
Observable<BaseResponse<LogoImg>> getLogoImg(
|
||||
@Query("sn") String sn
|
||||
);
|
||||
|
||||
@GET(UrlAddress.GET_WALLPAPER)
|
||||
Observable<BaseResponse<Wallpaper>> getWallpaper(
|
||||
@Query("sn") String sn
|
||||
);
|
||||
|
||||
@GET(UrlAddress.GET_DESKTOP)
|
||||
Observable<BaseResponse<ForceDownloadData>> getDesktop(
|
||||
@Query("sn") String sn
|
||||
);
|
||||
|
||||
@GET(UrlAddress.GET_DESKTOPS_DIY_UPDATE)
|
||||
Observable<BaseResponse<ForceDownloadData>> getDesktopsDiyUpdate(
|
||||
@Query("sn") String sn
|
||||
);
|
||||
|
||||
@GET(UrlAddress.GET_DEFAULT_APP)
|
||||
Observable<BaseResponse<DefaultApp>> getDefaultApp(
|
||||
@Query("sn") String sn
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1,99 @@
|
||||
package com.aoleyun.sn.network.api.aoleyun;
|
||||
|
||||
import com.aoleyun.sn.bean.AppSettings;
|
||||
import com.aoleyun.sn.bean.BaseResponse;
|
||||
import com.aoleyun.sn.bean.BlacklistBean;
|
||||
import com.aoleyun.sn.bean.BrowserBookmarks;
|
||||
import com.aoleyun.sn.bean.BrowserData;
|
||||
import com.aoleyun.sn.bean.PoweroffBean;
|
||||
import com.aoleyun.sn.bean.SnSetting;
|
||||
import com.aoleyun.sn.bean.SnTimeControl;
|
||||
import com.aoleyun.sn.bean.TimeControlData;
|
||||
import com.aoleyun.sn.bean.WhitelistBean;
|
||||
import com.aoleyun.sn.bean.WiFiAlias;
|
||||
import com.aoleyun.sn.network.UrlAddress;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import io.reactivex.rxjava3.core.Observable;
|
||||
import retrofit2.http.Field;
|
||||
import retrofit2.http.FormUrlEncoded;
|
||||
import retrofit2.http.GET;
|
||||
import retrofit2.http.POST;
|
||||
import retrofit2.http.Query;
|
||||
|
||||
public interface SystemSettingApi {
|
||||
@FormUrlEncoded
|
||||
@POST(UrlAddress.GET_FIRMWARE)
|
||||
Observable<BaseResponse> getSystemSettings(
|
||||
@Field("key") String key,
|
||||
@Field("sn") String sn
|
||||
);
|
||||
|
||||
@GET(UrlAddress.GET_SN_SETTING)
|
||||
Observable<BaseResponse<SnSetting>> getSnSetting(
|
||||
@Query("sn") String sn
|
||||
);
|
||||
|
||||
@GET(UrlAddress.GET_SN_EFENCE)
|
||||
Observable<BaseResponse> geElectronicFence(
|
||||
@Query("sn") String sn
|
||||
);
|
||||
|
||||
@FormUrlEncoded
|
||||
@POST(UrlAddress.GET_HIDE_DESKTOPICON)
|
||||
Observable<BaseResponse> getDesktopIcon(
|
||||
@Field("key") String key,
|
||||
@Field("sn") String sn
|
||||
);
|
||||
|
||||
@GET(UrlAddress.GET_SN_TIME_CONTROL)
|
||||
Observable<BaseResponse<SnTimeControl>> getSnTimeControl(
|
||||
@Query("sn") String sn
|
||||
);
|
||||
|
||||
@GET(UrlAddress.GET_TIME_CONTROL)
|
||||
Observable<BaseResponse<TimeControlData>> getTimeControl(
|
||||
@Query("sn") String sn
|
||||
);
|
||||
|
||||
@GET(UrlAddress.GET_WIFI_ALIAS_PW)
|
||||
Observable<BaseResponse<List<WiFiAlias>>> getWiFiAlias(
|
||||
@Query("sn") String sn
|
||||
);
|
||||
|
||||
@FormUrlEncoded
|
||||
@POST(UrlAddress.GET_POWEROFF_TIME)
|
||||
Observable<BaseResponse<List<PoweroffBean>>> getPoweroffTime(
|
||||
@Field("sn") String sn
|
||||
);
|
||||
|
||||
@GET(UrlAddress.APP_SETTING)
|
||||
Observable<BaseResponse<AppSettings>> getAppSetting(
|
||||
@Query("sn") String sn
|
||||
);
|
||||
|
||||
@GET(UrlAddress.BLACK_LIST)
|
||||
Observable<BaseResponse<BlacklistBean>> getBlackList(
|
||||
@Query("sn") String sn
|
||||
);
|
||||
|
||||
@GET(UrlAddress.WHITE_LIST)
|
||||
Observable<BaseResponse<WhitelistBean>> getWhiteList(
|
||||
@Query("sn") String sn
|
||||
);
|
||||
|
||||
@FormUrlEncoded
|
||||
@POST(UrlAddress.SET_HOMEPAG_TAG)
|
||||
Observable<BaseResponse<BrowserBookmarks>> getBrowserBookmarks(
|
||||
@Field("key") String key,
|
||||
@Field("sn") String sn
|
||||
);
|
||||
|
||||
@FormUrlEncoded
|
||||
@POST(UrlAddress.SET_BROWSER_LIST)
|
||||
Observable<BaseResponse<BrowserData>> getBrowserList(
|
||||
@Field("key") String key,
|
||||
@Field("sn") String sn
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1,171 @@
|
||||
package com.aoleyun.sn.network.api.aoleyun;
|
||||
|
||||
import com.aoleyun.sn.BuildConfig;
|
||||
import com.aoleyun.sn.bean.BaseResponse;
|
||||
import com.aoleyun.sn.network.UrlAddress;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
import io.reactivex.rxjava3.core.Observable;
|
||||
import okhttp3.MultipartBody;
|
||||
import okhttp3.RequestBody;
|
||||
import okhttp3.ResponseBody;
|
||||
import retrofit2.Call;
|
||||
import retrofit2.http.Field;
|
||||
import retrofit2.http.FieldMap;
|
||||
import retrofit2.http.FormUrlEncoded;
|
||||
import retrofit2.http.GET;
|
||||
import retrofit2.http.Multipart;
|
||||
import retrofit2.http.POST;
|
||||
import retrofit2.http.Part;
|
||||
import retrofit2.http.PartMap;
|
||||
import retrofit2.http.Query;
|
||||
import retrofit2.http.QueryMap;
|
||||
|
||||
public interface UploadInfoApi {
|
||||
@FormUrlEncoded
|
||||
@POST(BuildConfig.SCREEN_URL)
|
||||
@Deprecated
|
||||
Observable<BaseResponse> sendScreenStatus(
|
||||
@Field("key") String key,
|
||||
@Field("sn") String sn,
|
||||
@Field("is_online") int is_online
|
||||
);
|
||||
|
||||
@FormUrlEncoded
|
||||
@POST(UrlAddress.UPLOAD_APPINFO)
|
||||
@Deprecated
|
||||
Observable<BaseResponse> getUploadAppInfoApi(
|
||||
@Field("key") String key,
|
||||
@Field("sn") String sn,
|
||||
@Field("app_infoes") String json
|
||||
);
|
||||
|
||||
@FormUrlEncoded
|
||||
@POST(UrlAddress.UPLOAD_APPINFO)
|
||||
Observable<BaseResponse> getUploadAppInfoApi(
|
||||
@FieldMap Map<String, String> params
|
||||
);
|
||||
|
||||
@FormUrlEncoded
|
||||
@POST(UrlAddress.SEND_DEVICES)
|
||||
Observable<BaseResponse> sendMACaddress(
|
||||
@Field("sn") String sn,
|
||||
@Field("mac") String mac,
|
||||
@Field("jpush_id") String jpushId,
|
||||
@Field("devices_version") String devicesVersion,
|
||||
@Field("appstore_version") String appstoreVersion,
|
||||
@Field("store_version") String storeVersion,
|
||||
@Field("desktop_version") String desktop_version,
|
||||
@Field("local_mac") String local_mac,
|
||||
@Field("wifi_status") int wifi_status,
|
||||
@Field("PN_ip") String PN_ip,
|
||||
@Field("LAN_ip") String LAN_ip,
|
||||
@Field("bluetooth") String bluetooth,
|
||||
@Field("wifi_name") String wifi_name,
|
||||
@Field("browser_version") String browser_version,
|
||||
@Field("notice_version") String notice_version,
|
||||
@Field("platform") String platform,
|
||||
@Field("wifi_operator") String wifi_operator,
|
||||
@Field("network_type") String network_type,
|
||||
@Field("network_operator") String network_operator,
|
||||
@Field("sn_phone") String sn_phone,
|
||||
@Field("dpi") int dpi
|
||||
);
|
||||
|
||||
@FormUrlEncoded
|
||||
@POST(UrlAddress.UPDATE_DEVICEINFO)
|
||||
Observable<BaseResponse> updateDeviceInfo(
|
||||
@Field("sn") String sn,
|
||||
@Field("key") String key,
|
||||
@Field("machine") String machine,
|
||||
@Field("hardware") String hardware,
|
||||
@Field("address") String address,
|
||||
@Field("other") String other
|
||||
);
|
||||
|
||||
@FormUrlEncoded
|
||||
@POST(UrlAddress.UPDATE_DEVICEINFO)
|
||||
Observable<BaseResponse> updateDeviceInfo(
|
||||
@FieldMap Map<String, String> params
|
||||
);
|
||||
|
||||
@FormUrlEncoded
|
||||
@POST(UrlAddress.GET_APP_LOG)
|
||||
Observable<BaseResponse> getAppLog(
|
||||
@Field("sn") String sn,
|
||||
@Field("random") String random,
|
||||
@Field("data") String data
|
||||
);
|
||||
|
||||
@FormUrlEncoded
|
||||
@POST(UrlAddress.SEND_RESTORE_TIMES)
|
||||
Observable<BaseResponse> sendRestoreTimes(
|
||||
@Field("sn") String sn
|
||||
);
|
||||
|
||||
@Multipart
|
||||
@POST(UrlAddress.SEND_SCREENSHOT)
|
||||
Call<BaseResponse> sendScreenshot(
|
||||
@QueryMap Map<String, String> params,
|
||||
@Part MultipartBody.Part body
|
||||
);
|
||||
|
||||
@Deprecated
|
||||
@FormUrlEncoded
|
||||
@POST(UrlAddress.GET_LOCK_STATE)
|
||||
Observable<ResponseBody> getLockState(
|
||||
@Field("sn") String sn,
|
||||
@Field("status") String status,
|
||||
@Field("time") String time
|
||||
);
|
||||
|
||||
@FormUrlEncoded
|
||||
@POST(UrlAddress.SEND_BATTERY_INFO)
|
||||
Observable<BaseResponse> sendBatteryInfo(
|
||||
@Field("sn") String sn,
|
||||
@Field("key") String key,
|
||||
@Field("battery_quantity") String battery_quantity,
|
||||
@Field("battery_temperature") String battery_temperature,
|
||||
@Field("battery_voltage") String battery_voltage,
|
||||
@Field("charge_current") String charge_current,
|
||||
@Field("charge_voltage") String charge_voltage,
|
||||
@Field("battery_status") String battery_status,
|
||||
@Field("charge_type") String charge_type,
|
||||
@Field("charge_current_max") String charge_current_max,
|
||||
@Field("charge_voltage_max") String charge_voltage_max,
|
||||
@Field("battery_health") String battery_health,
|
||||
@Field("quantity_max") String quantity_max,
|
||||
@Field("battery_desc") String battery_desc,
|
||||
@Field("charge_speed") String charge_speed
|
||||
);
|
||||
|
||||
@FormUrlEncoded
|
||||
@POST(UrlAddress.NETWORK_CONNECT)
|
||||
Observable<BaseResponse> sendNetwork(
|
||||
@Field("sn") String sn,
|
||||
@Field("time") String time
|
||||
);
|
||||
|
||||
@FormUrlEncoded
|
||||
@POST(UrlAddress.SEND_DOWNLOAD_TIMES)
|
||||
@Deprecated
|
||||
Observable<BaseResponse> sendDownloadTimes(
|
||||
@Field("key") String key,
|
||||
@Field("sn") String sn,
|
||||
@Field("package") String packages,
|
||||
@Field("app_id") String app_id
|
||||
);
|
||||
|
||||
@GET(UrlAddress.GET_IS_APP_IMG)
|
||||
Observable<BaseResponse> getIsAppImg(
|
||||
@Query("package") String pkg
|
||||
);
|
||||
|
||||
@Multipart
|
||||
@POST(UrlAddress.UPLOAD_APP_IMG)
|
||||
Call<BaseResponse> uploadAppImg(
|
||||
@PartMap Map<String, RequestBody> params,
|
||||
@Part MultipartBody.Part body
|
||||
);
|
||||
}
|
||||
@@ -1,15 +0,0 @@
|
||||
package com.aoleyun.sn.network.api.get;
|
||||
|
||||
import com.aoleyun.sn.bean.BaseResponse;
|
||||
import com.aoleyun.sn.network.UrlAddress;
|
||||
|
||||
import io.reactivex.rxjava3.core.Observable;
|
||||
import retrofit2.http.GET;
|
||||
import retrofit2.http.Query;
|
||||
|
||||
public interface AppImgApi {
|
||||
@GET(UrlAddress.GET_IS_APP_IMG)
|
||||
Observable<BaseResponse> getIsAppImg(
|
||||
@Query("package") String pkg
|
||||
);
|
||||
}
|
||||
@@ -1,16 +0,0 @@
|
||||
package com.aoleyun.sn.network.api.get;
|
||||
|
||||
import com.aoleyun.sn.bean.AppSettings;
|
||||
import com.aoleyun.sn.bean.BaseResponse;
|
||||
import com.aoleyun.sn.network.UrlAddress;
|
||||
|
||||
import io.reactivex.rxjava3.core.Observable;
|
||||
import retrofit2.http.GET;
|
||||
import retrofit2.http.Query;
|
||||
|
||||
public interface AppSettingApi {
|
||||
@GET(UrlAddress.APP_SETTING)
|
||||
Observable<BaseResponse<AppSettings>> getAppSetting(
|
||||
@Query("sn") String sn
|
||||
);
|
||||
}
|
||||
@@ -1,16 +0,0 @@
|
||||
package com.aoleyun.sn.network.api.get;
|
||||
|
||||
import com.aoleyun.sn.bean.BaseResponse;
|
||||
import com.aoleyun.sn.bean.BlacklistBean;
|
||||
import com.aoleyun.sn.network.UrlAddress;
|
||||
|
||||
import io.reactivex.rxjava3.core.Observable;
|
||||
import retrofit2.http.GET;
|
||||
import retrofit2.http.Query;
|
||||
|
||||
public interface BlackListApi {
|
||||
@GET(UrlAddress.BLACK_LIST)
|
||||
Observable<BaseResponse<BlacklistBean>> getBlackList(
|
||||
@Query("sn") String sn
|
||||
);
|
||||
}
|
||||
@@ -1,16 +0,0 @@
|
||||
package com.aoleyun.sn.network.api.get;
|
||||
|
||||
import com.aoleyun.sn.bean.BaseResponse;
|
||||
import com.aoleyun.sn.bean.LessonApp;
|
||||
import com.aoleyun.sn.network.UrlAddress;
|
||||
|
||||
import io.reactivex.rxjava3.core.Observable;
|
||||
import retrofit2.http.GET;
|
||||
import retrofit2.http.Query;
|
||||
|
||||
public interface CloudLessonAppApi {
|
||||
@GET(UrlAddress.GET_CLOUD_LESSON_APP)
|
||||
Observable<BaseResponse<LessonApp>> getCloudLessonApp(
|
||||
@Query("sn") String sn
|
||||
);
|
||||
}
|
||||
@@ -1,16 +0,0 @@
|
||||
package com.aoleyun.sn.network.api.get;
|
||||
|
||||
import com.aoleyun.sn.bean.BaseResponse;
|
||||
import com.aoleyun.sn.bean.DefaultApp;
|
||||
import com.aoleyun.sn.network.UrlAddress;
|
||||
|
||||
import io.reactivex.rxjava3.core.Observable;
|
||||
import retrofit2.http.GET;
|
||||
import retrofit2.http.Query;
|
||||
|
||||
public interface DefaultAppApi {
|
||||
@GET(UrlAddress.GET_DEFAULT_APP)
|
||||
Observable<BaseResponse<DefaultApp>> getDefaultApp(
|
||||
@Query("sn") String sn
|
||||
);
|
||||
}
|
||||
@@ -1,16 +0,0 @@
|
||||
package com.aoleyun.sn.network.api.get;
|
||||
|
||||
import com.aoleyun.sn.bean.BaseResponse;
|
||||
import com.aoleyun.sn.bean.ForceDownloadData;
|
||||
import com.aoleyun.sn.network.UrlAddress;
|
||||
|
||||
import io.reactivex.rxjava3.core.Observable;
|
||||
import retrofit2.http.GET;
|
||||
import retrofit2.http.Query;
|
||||
|
||||
public interface DesktopsDiyUpdateApi {
|
||||
@GET(UrlAddress.GET_DESKTOPS_DIY_UPDATE)
|
||||
Observable<BaseResponse<ForceDownloadData>> getDesktopsDiyUpdate(
|
||||
@Query("sn") String sn
|
||||
);
|
||||
}
|
||||
@@ -1,18 +0,0 @@
|
||||
package com.aoleyun.sn.network.api.get;
|
||||
|
||||
import com.aoleyun.sn.bean.AppDateInfo;
|
||||
import com.aoleyun.sn.bean.BaseResponse;
|
||||
import com.aoleyun.sn.network.UrlAddress;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import io.reactivex.rxjava3.core.Observable;
|
||||
import retrofit2.http.GET;
|
||||
import retrofit2.http.Query;
|
||||
|
||||
public interface GetAdminAppApi {
|
||||
@GET(UrlAddress.GET_ADMIN_APP)
|
||||
Observable<BaseResponse<List<AppDateInfo>>> getAdminApp(
|
||||
@Query("sn") String sn
|
||||
);
|
||||
}
|
||||
@@ -1,16 +0,0 @@
|
||||
package com.aoleyun.sn.network.api.get;
|
||||
|
||||
import com.aoleyun.sn.bean.BaseResponse;
|
||||
import com.aoleyun.sn.bean.ForceDownloadData;
|
||||
import com.aoleyun.sn.network.UrlAddress;
|
||||
|
||||
import io.reactivex.rxjava3.core.Observable;
|
||||
import retrofit2.http.GET;
|
||||
import retrofit2.http.Query;
|
||||
|
||||
public interface GetDesktopApi {
|
||||
@GET(UrlAddress.GET_DESKTOP)
|
||||
Observable<BaseResponse<ForceDownloadData>> getDesktop(
|
||||
@Query("sn") String sn
|
||||
);
|
||||
}
|
||||
@@ -1,16 +0,0 @@
|
||||
package com.aoleyun.sn.network.api.get;
|
||||
|
||||
import com.aoleyun.sn.bean.BaseResponse;
|
||||
import com.aoleyun.sn.bean.DeveloperBean;
|
||||
import com.aoleyun.sn.network.UrlAddress;
|
||||
|
||||
import io.reactivex.rxjava3.core.Observable;
|
||||
import retrofit2.http.GET;
|
||||
import retrofit2.http.Query;
|
||||
|
||||
public interface GetDeveloperApi {
|
||||
@GET(UrlAddress.GET_DEVELOPER)
|
||||
Observable<BaseResponse<DeveloperBean>> getDeveloperState(
|
||||
@Query("sn") String sn
|
||||
);
|
||||
}
|
||||
@@ -1,16 +0,0 @@
|
||||
package com.aoleyun.sn.network.api.get;
|
||||
|
||||
import com.aoleyun.sn.bean.BaseResponse;
|
||||
import com.aoleyun.sn.bean.Batch;
|
||||
import com.aoleyun.sn.network.UrlAddress;
|
||||
|
||||
import io.reactivex.rxjava3.core.Observable;
|
||||
import retrofit2.http.GET;
|
||||
import retrofit2.http.Query;
|
||||
|
||||
public interface GetPushTagsApi {
|
||||
@GET(UrlAddress.GET_DEVICES_TAGS)
|
||||
Observable<BaseResponse<Batch>> getPushTags(
|
||||
@Query("sn") String sn
|
||||
);
|
||||
}
|
||||
@@ -1,16 +0,0 @@
|
||||
package com.aoleyun.sn.network.api.get;
|
||||
|
||||
import com.aoleyun.sn.bean.BaseResponse;
|
||||
import com.aoleyun.sn.bean.SnRunLog;
|
||||
import com.aoleyun.sn.network.UrlAddress;
|
||||
|
||||
import io.reactivex.rxjava3.core.Observable;
|
||||
import retrofit2.http.GET;
|
||||
import retrofit2.http.Query;
|
||||
|
||||
public interface GetSnRunLogApi {
|
||||
@GET(UrlAddress.GET_LOG_ORDER)
|
||||
Observable<BaseResponse<SnRunLog>> GetSnRunLog(
|
||||
@Query("sn") String sn
|
||||
);
|
||||
}
|
||||
@@ -1,26 +0,0 @@
|
||||
package com.aoleyun.sn.network.api.get;
|
||||
|
||||
|
||||
import com.aoleyun.sn.bean.BaseResponse;
|
||||
import com.aoleyun.sn.bean.WiFiAlias;
|
||||
import com.aoleyun.sn.network.UrlAddress;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import io.reactivex.rxjava3.core.Observable;
|
||||
import retrofit2.http.GET;
|
||||
import retrofit2.http.Query;
|
||||
|
||||
/**
|
||||
* @author : fanhuitong
|
||||
* e-mail :
|
||||
* @date : 2021/10/26 10:07
|
||||
* desc :
|
||||
* version: 1.0
|
||||
*/
|
||||
public interface GetWiFiAliasApi {
|
||||
@GET(UrlAddress.GET_WIFI_ALIAS_PW)
|
||||
Observable<BaseResponse<List<WiFiAlias>>> getWiFiAlias(
|
||||
@Query("sn") String sn
|
||||
);
|
||||
}
|
||||
@@ -1,16 +0,0 @@
|
||||
package com.aoleyun.sn.network.api.get;
|
||||
|
||||
import com.aoleyun.sn.bean.BaseResponse;
|
||||
import com.aoleyun.sn.bean.LogoImg;
|
||||
import com.aoleyun.sn.network.UrlAddress;
|
||||
|
||||
import io.reactivex.rxjava3.core.Observable;
|
||||
import retrofit2.http.GET;
|
||||
import retrofit2.http.Query;
|
||||
|
||||
public interface LogoImgApi {
|
||||
@GET(UrlAddress.GET_LOGO_IMG)
|
||||
Observable<BaseResponse<LogoImg>> getLogoImg(
|
||||
@Query("sn") String sn
|
||||
);
|
||||
}
|
||||
@@ -1,16 +0,0 @@
|
||||
package com.aoleyun.sn.network.api.get;
|
||||
|
||||
import com.aoleyun.sn.bean.BaseResponse;
|
||||
import com.aoleyun.sn.bean.ScreenLockState;
|
||||
import com.aoleyun.sn.network.UrlAddress;
|
||||
|
||||
import io.reactivex.rxjava3.core.Observable;
|
||||
import retrofit2.http.GET;
|
||||
import retrofit2.http.Query;
|
||||
|
||||
public interface ScreenLockStateApi {
|
||||
@GET(UrlAddress.GET_LOCK_SCREEN_STATE)
|
||||
Observable<BaseResponse<ScreenLockState>> getScreenLockState(
|
||||
@Query("sn") String sn
|
||||
);
|
||||
}
|
||||
@@ -1,23 +0,0 @@
|
||||
package com.aoleyun.sn.network.api.get;
|
||||
|
||||
import com.aoleyun.sn.bean.BaseResponse;
|
||||
import com.aoleyun.sn.bean.ForceDownloadData;
|
||||
import com.aoleyun.sn.network.UrlAddress;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import io.reactivex.rxjava3.core.Observable;
|
||||
import retrofit2.http.GET;
|
||||
import retrofit2.http.Query;
|
||||
|
||||
public interface SnApi {
|
||||
@GET(UrlAddress.GET_SN_APP_TEST)
|
||||
Observable<BaseResponse<List<ForceDownloadData>>> getTestUpdate(
|
||||
@Query("sn") String sn
|
||||
);
|
||||
|
||||
@GET(UrlAddress.GET_SN_EFENCE)
|
||||
Observable<BaseResponse> geElectronicFence(
|
||||
@Query("sn") String sn
|
||||
);
|
||||
}
|
||||
@@ -1,18 +0,0 @@
|
||||
package com.aoleyun.sn.network.api.get;
|
||||
|
||||
import com.aoleyun.sn.bean.AppAttr;
|
||||
import com.aoleyun.sn.bean.BaseResponse;
|
||||
import com.aoleyun.sn.network.UrlAddress;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import io.reactivex.rxjava3.core.Observable;
|
||||
import retrofit2.http.GET;
|
||||
import retrofit2.http.Query;
|
||||
|
||||
public interface SnAppAttrApi {
|
||||
@GET(UrlAddress.GET_SN_APP_ATTR)
|
||||
Observable<BaseResponse<List<AppAttr>>> getSnAppAttr(
|
||||
@Query("sn") String sn
|
||||
);
|
||||
}
|
||||
@@ -1,16 +0,0 @@
|
||||
package com.aoleyun.sn.network.api.get;
|
||||
|
||||
import com.aoleyun.sn.bean.BaseResponse;
|
||||
import com.aoleyun.sn.bean.SnSetting;
|
||||
import com.aoleyun.sn.network.UrlAddress;
|
||||
|
||||
import io.reactivex.rxjava3.core.Observable;
|
||||
import retrofit2.http.GET;
|
||||
import retrofit2.http.Query;
|
||||
|
||||
public interface SnSettingApi {
|
||||
@GET(UrlAddress.GET_SN_SETTING)
|
||||
Observable<BaseResponse<SnSetting>> getSnSetting(
|
||||
@Query("sn") String sn
|
||||
);
|
||||
}
|
||||
@@ -1,22 +0,0 @@
|
||||
package com.aoleyun.sn.network.api.get;
|
||||
|
||||
import com.aoleyun.sn.bean.BaseResponse;
|
||||
import com.aoleyun.sn.bean.SnTimeControl;
|
||||
import com.aoleyun.sn.bean.TimeControlData;
|
||||
import com.aoleyun.sn.network.UrlAddress;
|
||||
|
||||
import io.reactivex.rxjava3.core.Observable;
|
||||
import retrofit2.http.GET;
|
||||
import retrofit2.http.Query;
|
||||
|
||||
public interface SnTimeControlApi {
|
||||
@GET(UrlAddress.GET_SN_TIME_CONTROL)
|
||||
Observable<BaseResponse<SnTimeControl>> getSnTimeControl(
|
||||
@Query("sn") String sn
|
||||
);
|
||||
|
||||
@GET(UrlAddress.GET_TIME_CONTROL)
|
||||
Observable<BaseResponse<TimeControlData>> getTimeControl(
|
||||
@Query("sn") String sn
|
||||
);
|
||||
}
|
||||
@@ -1,16 +0,0 @@
|
||||
package com.aoleyun.sn.network.api.get;
|
||||
|
||||
import com.aoleyun.sn.bean.BaseResponse;
|
||||
import com.aoleyun.sn.bean.TopApp;
|
||||
import com.aoleyun.sn.network.UrlAddress;
|
||||
|
||||
import io.reactivex.rxjava3.core.Observable;
|
||||
import retrofit2.http.GET;
|
||||
import retrofit2.http.Query;
|
||||
|
||||
public interface TopAppControlApi {
|
||||
@GET(UrlAddress.GET_TOP_APP_CONTROL)
|
||||
Observable<BaseResponse<TopApp>> getSnAppControl(
|
||||
@Query("sn") String sn
|
||||
);
|
||||
}
|
||||
@@ -1,16 +0,0 @@
|
||||
package com.aoleyun.sn.network.api.get;
|
||||
|
||||
import com.aoleyun.sn.bean.BaseResponse;
|
||||
import com.aoleyun.sn.bean.Wallpaper;
|
||||
import com.aoleyun.sn.network.UrlAddress;
|
||||
|
||||
import io.reactivex.rxjava3.core.Observable;
|
||||
import retrofit2.http.GET;
|
||||
import retrofit2.http.Query;
|
||||
|
||||
public interface WallpaperApi {
|
||||
@GET(UrlAddress.GET_WALLPAPER)
|
||||
Observable<BaseResponse<Wallpaper>> getWallpaper(
|
||||
@Query("sn") String sn
|
||||
);
|
||||
}
|
||||
@@ -1,16 +0,0 @@
|
||||
package com.aoleyun.sn.network.api.get;
|
||||
|
||||
import com.aoleyun.sn.bean.BaseResponse;
|
||||
import com.aoleyun.sn.bean.WhitelistBean;
|
||||
import com.aoleyun.sn.network.UrlAddress;
|
||||
|
||||
import io.reactivex.rxjava3.core.Observable;
|
||||
import retrofit2.http.GET;
|
||||
import retrofit2.http.Query;
|
||||
|
||||
public interface WhiteListApi {
|
||||
@GET(UrlAddress.WHITE_LIST)
|
||||
Observable<BaseResponse<WhitelistBean>> getWhiteList(
|
||||
@Query("sn") String sn
|
||||
);
|
||||
}
|
||||
@@ -1,19 +0,0 @@
|
||||
package com.aoleyun.sn.network.api.post;
|
||||
|
||||
import com.aoleyun.sn.bean.AppLimit;
|
||||
import com.aoleyun.sn.bean.BaseResponse;
|
||||
import com.aoleyun.sn.network.UrlAddress;
|
||||
|
||||
import io.reactivex.rxjava3.core.Observable;
|
||||
import retrofit2.http.Field;
|
||||
import retrofit2.http.FormUrlEncoded;
|
||||
import retrofit2.http.POST;
|
||||
|
||||
public interface AppLimitApi {
|
||||
@FormUrlEncoded
|
||||
@POST(UrlAddress.SET_WHITE_PACKAGE_LIST)
|
||||
Observable<BaseResponse<AppLimit>> getAppLimitApi(
|
||||
@Field("key") String key,
|
||||
@Field("sn") String sn
|
||||
);
|
||||
}
|
||||
@@ -1,22 +0,0 @@
|
||||
package com.aoleyun.sn.network.api.post;
|
||||
|
||||
|
||||
import com.aoleyun.sn.bean.Appground;
|
||||
import com.aoleyun.sn.bean.BaseResponse;
|
||||
import com.aoleyun.sn.network.UrlAddress;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import io.reactivex.rxjava3.core.Observable;
|
||||
import retrofit2.http.Field;
|
||||
import retrofit2.http.FormUrlEncoded;
|
||||
import retrofit2.http.POST;
|
||||
|
||||
public interface AppinsideWebApi {
|
||||
@FormUrlEncoded
|
||||
@POST(UrlAddress.SET_APPINSIDEWEB)
|
||||
Observable<BaseResponse<List<Appground>>> getAppinsideWeb(
|
||||
@Field("key") String key,
|
||||
@Field("sn") String sn
|
||||
);
|
||||
}
|
||||
@@ -1,31 +0,0 @@
|
||||
package com.aoleyun.sn.network.api.post;
|
||||
|
||||
import com.aoleyun.sn.bean.BaseResponse;
|
||||
import com.aoleyun.sn.network.UrlAddress;
|
||||
|
||||
import io.reactivex.rxjava3.core.Observable;
|
||||
import retrofit2.http.Field;
|
||||
import retrofit2.http.FormUrlEncoded;
|
||||
import retrofit2.http.POST;
|
||||
|
||||
public interface BatteryInfoApi {
|
||||
@FormUrlEncoded
|
||||
@POST(UrlAddress.SEND_BATTERY_INFO)
|
||||
Observable<BaseResponse> sendBatteryInfo(
|
||||
@Field("sn") String sn,
|
||||
@Field("key") String key,
|
||||
@Field("battery_quantity") String battery_quantity,
|
||||
@Field("battery_temperature") String battery_temperature,
|
||||
@Field("battery_voltage") String battery_voltage,
|
||||
@Field("charge_current") String charge_current,
|
||||
@Field("charge_voltage") String charge_voltage,
|
||||
@Field("battery_status") String battery_status,
|
||||
@Field("charge_type") String charge_type,
|
||||
@Field("charge_current_max") String charge_current_max,
|
||||
@Field("charge_voltage_max") String charge_voltage_max,
|
||||
@Field("battery_health") String battery_health,
|
||||
@Field("quantity_max") String quantity_max,
|
||||
@Field("battery_desc") String battery_desc,
|
||||
@Field("charge_speed") String charge_speed
|
||||
);
|
||||
}
|
||||
@@ -1,19 +0,0 @@
|
||||
package com.aoleyun.sn.network.api.post;
|
||||
|
||||
import com.aoleyun.sn.bean.BaseResponse;
|
||||
import com.aoleyun.sn.bean.BrowserBookmarks;
|
||||
import com.aoleyun.sn.network.UrlAddress;
|
||||
|
||||
import io.reactivex.rxjava3.core.Observable;
|
||||
import retrofit2.http.Field;
|
||||
import retrofit2.http.FormUrlEncoded;
|
||||
import retrofit2.http.POST;
|
||||
|
||||
public interface BrowserBookmarksApi {
|
||||
@FormUrlEncoded
|
||||
@POST(UrlAddress.SET_HOMEPAG_TAG)
|
||||
Observable<BaseResponse<BrowserBookmarks>> getBrowserBookmarks(
|
||||
@Field("key") String key,
|
||||
@Field("sn") String sn
|
||||
);
|
||||
}
|
||||
@@ -1,19 +0,0 @@
|
||||
package com.aoleyun.sn.network.api.post;
|
||||
|
||||
import com.aoleyun.sn.bean.BaseResponse;
|
||||
import com.aoleyun.sn.bean.BrowserData;
|
||||
import com.aoleyun.sn.network.UrlAddress;
|
||||
|
||||
import io.reactivex.rxjava3.core.Observable;
|
||||
import retrofit2.http.Field;
|
||||
import retrofit2.http.FormUrlEncoded;
|
||||
import retrofit2.http.POST;
|
||||
|
||||
public interface BrowserListApi {
|
||||
@FormUrlEncoded
|
||||
@POST(UrlAddress.SET_BROWSER_LIST)
|
||||
Observable<BaseResponse<BrowserData>> getBrowserList(
|
||||
@Field("key") String key,
|
||||
@Field("sn") String sn
|
||||
);
|
||||
}
|
||||
@@ -1,20 +0,0 @@
|
||||
package com.aoleyun.sn.network.api.post;
|
||||
|
||||
import com.aoleyun.sn.bean.AppUpdateInfo;
|
||||
import com.aoleyun.sn.bean.BaseResponse;
|
||||
import com.aoleyun.sn.network.UrlAddress;
|
||||
|
||||
import io.reactivex.rxjava3.core.Observable;
|
||||
import retrofit2.http.Field;
|
||||
import retrofit2.http.FormUrlEncoded;
|
||||
import retrofit2.http.POST;
|
||||
|
||||
public interface CheckUpdateApi {
|
||||
@FormUrlEncoded
|
||||
@POST(UrlAddress.CHECK_UPDATE)
|
||||
//1MTK平台 2展锐平台
|
||||
Observable<BaseResponse<AppUpdateInfo>> getUpdate(
|
||||
@Field("package") String packages,
|
||||
@Field("type") int type
|
||||
);
|
||||
}
|
||||
@@ -1,19 +0,0 @@
|
||||
package com.aoleyun.sn.network.api.post;
|
||||
|
||||
import com.aoleyun.sn.bean.BaseResponse;
|
||||
import com.aoleyun.sn.bean.CustomROMApp;
|
||||
import com.aoleyun.sn.network.UrlAddress;
|
||||
|
||||
import io.reactivex.rxjava3.core.Observable;
|
||||
import retrofit2.http.Field;
|
||||
import retrofit2.http.FormUrlEncoded;
|
||||
import retrofit2.http.POST;
|
||||
|
||||
public interface CustomROMAppApi {
|
||||
@FormUrlEncoded
|
||||
@POST(UrlAddress.GET_ROM_APP)
|
||||
Observable<BaseResponse<CustomROMApp>> getROMApp(
|
||||
@Field("key") String key,
|
||||
@Field("version_number") String version_number
|
||||
);
|
||||
}
|
||||
@@ -1,21 +0,0 @@
|
||||
package com.aoleyun.sn.network.api.post;
|
||||
|
||||
import com.aoleyun.sn.bean.AppID;
|
||||
import com.aoleyun.sn.bean.BaseResponse;
|
||||
import com.aoleyun.sn.network.UrlAddress;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import io.reactivex.rxjava3.core.Observable;
|
||||
import retrofit2.http.Field;
|
||||
import retrofit2.http.FormUrlEncoded;
|
||||
import retrofit2.http.POST;
|
||||
|
||||
public interface DeselectIDApi {
|
||||
@FormUrlEncoded
|
||||
@POST(UrlAddress.GET_APPID)
|
||||
Observable<BaseResponse<List<AppID>>> getDeselectIDApi(
|
||||
@Field("key") String key,
|
||||
@Field("sn") String sn
|
||||
);
|
||||
}
|
||||
@@ -1,18 +0,0 @@
|
||||
package com.aoleyun.sn.network.api.post;
|
||||
|
||||
import com.aoleyun.sn.bean.BaseResponse;
|
||||
import com.aoleyun.sn.network.UrlAddress;
|
||||
|
||||
import io.reactivex.rxjava3.core.Observable;
|
||||
import retrofit2.http.Field;
|
||||
import retrofit2.http.FormUrlEncoded;
|
||||
import retrofit2.http.POST;
|
||||
|
||||
public interface DesktopIconApi {
|
||||
@FormUrlEncoded
|
||||
@POST(UrlAddress.GET_HIDE_DESKTOPICON)
|
||||
Observable<BaseResponse> getDesktopIcon(
|
||||
@Field("key") String key,
|
||||
@Field("sn") String sn
|
||||
);
|
||||
}
|
||||
@@ -1,17 +0,0 @@
|
||||
package com.aoleyun.sn.network.api.post;
|
||||
|
||||
import com.aoleyun.sn.bean.BaseResponse;
|
||||
import com.aoleyun.sn.network.UrlAddress;
|
||||
|
||||
import io.reactivex.rxjava3.core.Observable;
|
||||
import retrofit2.http.Field;
|
||||
import retrofit2.http.FormUrlEncoded;
|
||||
import retrofit2.http.POST;
|
||||
|
||||
public interface DevicesLockedStateApi {
|
||||
@FormUrlEncoded
|
||||
@POST(UrlAddress.GET_DEVICES_LOCKED)
|
||||
Observable<BaseResponse> getLockedState(
|
||||
@Field("sn") String sn
|
||||
);
|
||||
}
|
||||
@@ -1,21 +0,0 @@
|
||||
package com.aoleyun.sn.network.api.post;
|
||||
|
||||
import com.aoleyun.sn.bean.AppListInfo;
|
||||
import com.aoleyun.sn.bean.BaseResponse;
|
||||
import com.aoleyun.sn.network.UrlAddress;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import io.reactivex.rxjava3.core.Observable;
|
||||
import retrofit2.http.Field;
|
||||
import retrofit2.http.FormUrlEncoded;
|
||||
import retrofit2.http.POST;
|
||||
|
||||
public interface GetAllAppApi {
|
||||
@FormUrlEncoded
|
||||
@POST(UrlAddress.GET_ALL_APP)
|
||||
Observable<BaseResponse<List<AppListInfo>>> getAllAppList(
|
||||
@Field("key") String key,
|
||||
@Field("sn") String sn
|
||||
);
|
||||
}
|
||||
@@ -1,19 +0,0 @@
|
||||
package com.aoleyun.sn.network.api.post;
|
||||
|
||||
import com.aoleyun.sn.bean.BaseResponse;
|
||||
import com.aoleyun.sn.network.UrlAddress;
|
||||
|
||||
import io.reactivex.rxjava3.core.Observable;
|
||||
import retrofit2.http.Field;
|
||||
import retrofit2.http.FormUrlEncoded;
|
||||
import retrofit2.http.POST;
|
||||
|
||||
public interface GetAppLogApi {
|
||||
@FormUrlEncoded
|
||||
@POST(UrlAddress.GET_APP_LOG)
|
||||
Observable<BaseResponse> getAppLog(
|
||||
@Field("sn") String sn,
|
||||
@Field("random") String random,
|
||||
@Field("data") String data
|
||||
);
|
||||
}
|
||||
@@ -1,17 +0,0 @@
|
||||
package com.aoleyun.sn.network.api.post;
|
||||
|
||||
import com.aoleyun.sn.network.UrlAddress;
|
||||
|
||||
import io.reactivex.rxjava3.core.Observable;
|
||||
import okhttp3.ResponseBody;
|
||||
import retrofit2.http.Field;
|
||||
import retrofit2.http.FormUrlEncoded;
|
||||
import retrofit2.http.POST;
|
||||
|
||||
public interface GetBatchApi {
|
||||
@FormUrlEncoded
|
||||
@POST(UrlAddress.GET_BATCH)
|
||||
Observable<ResponseBody> getBatch(
|
||||
@Field("sn") String sn
|
||||
);
|
||||
}
|
||||
@@ -1,19 +0,0 @@
|
||||
package com.aoleyun.sn.network.api.post;
|
||||
|
||||
import com.aoleyun.sn.bean.BaseResponse;
|
||||
import com.aoleyun.sn.bean.EBagCode;
|
||||
import com.aoleyun.sn.network.UrlAddress;
|
||||
|
||||
import io.reactivex.rxjava3.core.Observable;
|
||||
import retrofit2.http.Field;
|
||||
import retrofit2.http.FormUrlEncoded;
|
||||
import retrofit2.http.POST;
|
||||
|
||||
public interface GetEBagCodeApi {
|
||||
@FormUrlEncoded
|
||||
@POST(UrlAddress.GET_EBAG_CODE)
|
||||
Observable<BaseResponse<EBagCode>> getEBagCode(
|
||||
@Field("key") String key,
|
||||
@Field("sn") String sn
|
||||
);
|
||||
}
|
||||
@@ -1,19 +0,0 @@
|
||||
package com.aoleyun.sn.network.api.post;
|
||||
|
||||
import com.aoleyun.sn.network.UrlAddress;
|
||||
|
||||
import io.reactivex.rxjava3.core.Observable;
|
||||
import okhttp3.ResponseBody;
|
||||
import retrofit2.http.Field;
|
||||
import retrofit2.http.FormUrlEncoded;
|
||||
import retrofit2.http.POST;
|
||||
|
||||
public interface GetLockStateApi {
|
||||
@FormUrlEncoded
|
||||
@POST(UrlAddress.GET_LOCK_STATE)
|
||||
Observable<ResponseBody> getLockState(
|
||||
@Field("sn") String sn,
|
||||
@Field("status") String status,
|
||||
@Field("time") String time
|
||||
);
|
||||
}
|
||||
@@ -1,20 +0,0 @@
|
||||
package com.aoleyun.sn.network.api.post;
|
||||
|
||||
import com.aoleyun.sn.bean.BaseResponse;
|
||||
import com.aoleyun.sn.bean.PoweroffBean;
|
||||
import com.aoleyun.sn.network.UrlAddress;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import io.reactivex.rxjava3.core.Observable;
|
||||
import retrofit2.http.Field;
|
||||
import retrofit2.http.FormUrlEncoded;
|
||||
import retrofit2.http.POST;
|
||||
|
||||
public interface GetPoweroffApi {
|
||||
@FormUrlEncoded
|
||||
@POST(UrlAddress.GET_POWEROFF_TIME)
|
||||
Observable<BaseResponse<List<PoweroffBean>>> getPoweroffTime(
|
||||
@Field("sn") String sn
|
||||
);
|
||||
}
|
||||
@@ -1,22 +0,0 @@
|
||||
package com.aoleyun.sn.network.api.post;
|
||||
|
||||
import com.aoleyun.sn.bean.BaseResponse;
|
||||
import com.aoleyun.sn.network.UrlAddress;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
import io.reactivex.rxjava3.core.Observable;
|
||||
import okhttp3.MultipartBody;
|
||||
import retrofit2.http.Multipart;
|
||||
import retrofit2.http.POST;
|
||||
import retrofit2.http.Part;
|
||||
import retrofit2.http.QueryMap;
|
||||
|
||||
public interface GetUploadIsLogApi {
|
||||
@Multipart
|
||||
@POST(UrlAddress.UPLOAD_IS_LOG_FILE)
|
||||
Observable<BaseResponse> sendSnisLog(
|
||||
@QueryMap Map<String, String> params,
|
||||
@Part MultipartBody.Part body
|
||||
);
|
||||
}
|
||||
@@ -1,22 +0,0 @@
|
||||
package com.aoleyun.sn.network.api.post;
|
||||
|
||||
import com.aoleyun.sn.bean.BaseResponse;
|
||||
import com.aoleyun.sn.network.UrlAddress;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
import io.reactivex.rxjava3.core.Observable;
|
||||
import okhttp3.MultipartBody;
|
||||
import retrofit2.http.Multipart;
|
||||
import retrofit2.http.POST;
|
||||
import retrofit2.http.Part;
|
||||
import retrofit2.http.QueryMap;
|
||||
|
||||
public interface GetUploadLogApi {
|
||||
@Multipart
|
||||
@POST(UrlAddress.UPLOAD_LOG_FILE)
|
||||
Observable<BaseResponse> UploadLog(
|
||||
@QueryMap Map<String, String> params,
|
||||
@Part MultipartBody.Part body
|
||||
);
|
||||
}
|
||||
@@ -1,37 +0,0 @@
|
||||
package com.aoleyun.sn.network.api.post;
|
||||
|
||||
import com.aoleyun.sn.bean.BaseResponse;
|
||||
import com.aoleyun.sn.network.UrlAddress;
|
||||
|
||||
import io.reactivex.rxjava3.core.Observable;
|
||||
import retrofit2.http.Field;
|
||||
import retrofit2.http.FormUrlEncoded;
|
||||
import retrofit2.http.POST;
|
||||
|
||||
public interface MACAddressApi {
|
||||
@FormUrlEncoded
|
||||
@POST(UrlAddress.SEND_DEVICES)
|
||||
Observable<BaseResponse> sendMACaddress(
|
||||
@Field("sn") String sn,
|
||||
@Field("mac") String mac,
|
||||
@Field("jpush_id") String jpushId,
|
||||
@Field("devices_version") String devicesVersion,
|
||||
@Field("appstore_version") String appstoreVersion,
|
||||
@Field("store_version") String storeVersion,
|
||||
@Field("desktop_version") String desktop_version,
|
||||
@Field("local_mac") String local_mac,
|
||||
@Field("wifi_status") int wifi_status,
|
||||
@Field("PN_ip") String PN_ip,
|
||||
@Field("LAN_ip") String LAN_ip,
|
||||
@Field("bluetooth") String bluetooth,
|
||||
@Field("wifi_name") String wifi_name,
|
||||
@Field("browser_version") String browser_version,
|
||||
@Field("notice_version") String notice_version,
|
||||
@Field("platform") String platform,
|
||||
@Field("wifi_operator") String wifi_operator,
|
||||
@Field("network_type") String network_type,
|
||||
@Field("network_operator") String network_operator,
|
||||
@Field("sn_phone") String sn_phone,
|
||||
@Field("dpi") int dpi
|
||||
);
|
||||
}
|
||||
@@ -1,18 +0,0 @@
|
||||
package com.aoleyun.sn.network.api.post;
|
||||
|
||||
import com.aoleyun.sn.bean.NetAndLaunchBean;
|
||||
import com.aoleyun.sn.network.UrlAddress;
|
||||
|
||||
import io.reactivex.rxjava3.core.Observable;
|
||||
import retrofit2.http.Field;
|
||||
import retrofit2.http.FormUrlEncoded;
|
||||
import retrofit2.http.POST;
|
||||
|
||||
public interface NetAndLaunchApi {
|
||||
@FormUrlEncoded
|
||||
@POST(UrlAddress.NET_AND_LAUNCH_API)
|
||||
Observable<NetAndLaunchBean> getNetAndLaunchApi(
|
||||
@Field("key") String key,
|
||||
@Field("sn") String sn
|
||||
);
|
||||
}
|
||||
@@ -1,18 +0,0 @@
|
||||
package com.aoleyun.sn.network.api.post;
|
||||
|
||||
import com.aoleyun.sn.bean.BaseResponse;
|
||||
import com.aoleyun.sn.network.UrlAddress;
|
||||
|
||||
import io.reactivex.rxjava3.core.Observable;
|
||||
import retrofit2.http.Field;
|
||||
import retrofit2.http.FormUrlEncoded;
|
||||
import retrofit2.http.POST;
|
||||
|
||||
public interface NetworkConnectApi {
|
||||
@FormUrlEncoded
|
||||
@POST(UrlAddress.NETWORK_CONNECT)
|
||||
Observable<BaseResponse> sendNetwork(
|
||||
@Field("sn") String sn,
|
||||
@Field("time") String time
|
||||
);
|
||||
}
|
||||
@@ -1,19 +0,0 @@
|
||||
package com.aoleyun.sn.network.api.post;
|
||||
|
||||
|
||||
import com.aoleyun.sn.bean.BaseResponse;
|
||||
import com.aoleyun.sn.network.UrlAddress;
|
||||
|
||||
import io.reactivex.rxjava3.core.Observable;
|
||||
import retrofit2.http.Field;
|
||||
import retrofit2.http.FormUrlEncoded;
|
||||
import retrofit2.http.POST;
|
||||
|
||||
public interface NewAppinsideWebApi {
|
||||
@FormUrlEncoded
|
||||
@POST(UrlAddress.SET_APPINSIDEWEB)
|
||||
Observable<BaseResponse> getAppinsideWeb(
|
||||
@Field("key") String key,
|
||||
@Field("sn") String sn
|
||||
);
|
||||
}
|
||||
@@ -1,22 +0,0 @@
|
||||
package com.aoleyun.sn.network.api.post;
|
||||
|
||||
import com.aoleyun.sn.bean.AppDateInfo;
|
||||
import com.aoleyun.sn.bean.BaseResponse;
|
||||
import com.aoleyun.sn.network.UrlAddress;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import io.reactivex.rxjava3.core.Observable;
|
||||
import retrofit2.http.Field;
|
||||
import retrofit2.http.FormUrlEncoded;
|
||||
import retrofit2.http.POST;
|
||||
|
||||
public interface RankCommonAppApi {
|
||||
@FormUrlEncoded
|
||||
@POST(UrlAddress.HTTP_TAG_COMMOAPP)
|
||||
Observable<BaseResponse<List<AppDateInfo>>> getRankApp(
|
||||
@Field("key") String key,
|
||||
@Field("sn") String sn,
|
||||
@Field("page") String page
|
||||
);
|
||||
}
|
||||
@@ -1,22 +0,0 @@
|
||||
package com.aoleyun.sn.network.api.post;
|
||||
|
||||
import com.aoleyun.sn.bean.BaseResponse;
|
||||
import com.aoleyun.sn.network.UrlAddress;
|
||||
|
||||
import io.reactivex.rxjava3.core.Observable;
|
||||
import retrofit2.http.Field;
|
||||
import retrofit2.http.FormUrlEncoded;
|
||||
import retrofit2.http.POST;
|
||||
|
||||
@Deprecated
|
||||
public interface SendDownloadInfoApi {
|
||||
@FormUrlEncoded
|
||||
@POST(UrlAddress.SEND_DOWNLOAD_FILE_INFO)
|
||||
Observable<BaseResponse> sendDownloadTimes(
|
||||
@Field("key") String key,
|
||||
@Field("sn") String sn,
|
||||
@Field("userId") int userId,
|
||||
@Field("package_name") String package_name,
|
||||
@Field("app_size") long app_size
|
||||
);
|
||||
}
|
||||
@@ -1,20 +0,0 @@
|
||||
package com.aoleyun.sn.network.api.post;
|
||||
|
||||
import com.aoleyun.sn.bean.BaseResponse;
|
||||
import com.aoleyun.sn.network.UrlAddress;
|
||||
|
||||
import io.reactivex.rxjava3.core.Observable;
|
||||
import retrofit2.http.Field;
|
||||
import retrofit2.http.FormUrlEncoded;
|
||||
import retrofit2.http.POST;
|
||||
|
||||
public interface SendDownloadTimesApi {
|
||||
@FormUrlEncoded
|
||||
@POST(UrlAddress.SEND_DOWNLOAD_TIMES)
|
||||
Observable<BaseResponse> sendDownloadTimes(
|
||||
@Field("key") String key,
|
||||
@Field("sn") String sn,
|
||||
@Field("package") String packages,
|
||||
@Field("app_id") String app_id
|
||||
);
|
||||
}
|
||||
@@ -1,24 +0,0 @@
|
||||
package com.aoleyun.sn.network.api.post;
|
||||
|
||||
import com.aoleyun.sn.bean.BaseResponse;
|
||||
import com.aoleyun.sn.network.UrlAddress;
|
||||
|
||||
import io.reactivex.rxjava3.core.Observable;
|
||||
import retrofit2.http.Field;
|
||||
import retrofit2.http.FormUrlEncoded;
|
||||
import retrofit2.http.POST;
|
||||
|
||||
/**
|
||||
* @author : fanhuitong
|
||||
* e-mail :
|
||||
* @date : 2021/10/2115:02
|
||||
* desc :
|
||||
* version: 1.0
|
||||
*/
|
||||
public interface SendRestoreTimesApi {
|
||||
@FormUrlEncoded
|
||||
@POST(UrlAddress.SEND_RESTORE_TIMES)
|
||||
Observable<BaseResponse> sendRestoreTimes(
|
||||
@Field("sn") String sn
|
||||
);
|
||||
}
|
||||
@@ -1,19 +0,0 @@
|
||||
package com.aoleyun.sn.network.api.post;
|
||||
|
||||
import com.aoleyun.sn.BuildConfig;
|
||||
import com.aoleyun.sn.bean.BaseResponse;
|
||||
|
||||
import io.reactivex.rxjava3.core.Observable;
|
||||
import retrofit2.http.Field;
|
||||
import retrofit2.http.FormUrlEncoded;
|
||||
import retrofit2.http.POST;
|
||||
|
||||
public interface SendScreenStatusApi {
|
||||
@FormUrlEncoded
|
||||
@POST(BuildConfig.SCREEN_URL)
|
||||
Observable<BaseResponse> sendScreenStatus(
|
||||
@Field("key") String key,
|
||||
@Field("sn") String sn,
|
||||
@Field("is_online") int is_online
|
||||
);
|
||||
}
|
||||
@@ -1,23 +0,0 @@
|
||||
package com.aoleyun.sn.network.api.post;
|
||||
|
||||
import com.aoleyun.sn.bean.BaseResponse;
|
||||
import com.aoleyun.sn.network.UrlAddress;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
import io.reactivex.rxjava3.core.Observable;
|
||||
import okhttp3.MultipartBody;
|
||||
import retrofit2.http.Multipart;
|
||||
import retrofit2.http.POST;
|
||||
import retrofit2.http.Part;
|
||||
import retrofit2.http.QueryMap;
|
||||
|
||||
@Deprecated
|
||||
public interface SendScreenshotApi {
|
||||
@Multipart
|
||||
@POST(UrlAddress.SEND_SCREENSHOT)
|
||||
Observable<BaseResponse> sendScreenshot(
|
||||
@QueryMap Map<String, String> params,
|
||||
@Part MultipartBody.Part body
|
||||
);
|
||||
}
|
||||
@@ -1,22 +0,0 @@
|
||||
package com.aoleyun.sn.network.api.post;
|
||||
|
||||
import com.aoleyun.sn.bean.BaseResponse;
|
||||
import com.aoleyun.sn.network.UrlAddress;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
import okhttp3.MultipartBody;
|
||||
import retrofit2.Call;
|
||||
import retrofit2.http.Multipart;
|
||||
import retrofit2.http.POST;
|
||||
import retrofit2.http.Part;
|
||||
import retrofit2.http.QueryMap;
|
||||
|
||||
public interface SendScreenshotCall {
|
||||
@Multipart
|
||||
@POST(UrlAddress.SEND_SCREENSHOT)
|
||||
Call<BaseResponse> sendScreenshot(
|
||||
@QueryMap Map<String, String> params,
|
||||
@Part MultipartBody.Part body
|
||||
);
|
||||
}
|
||||
@@ -1,19 +0,0 @@
|
||||
package com.aoleyun.sn.network.api.post;
|
||||
|
||||
import com.aoleyun.sn.bean.BaseResponse;
|
||||
import com.aoleyun.sn.network.UrlAddress;
|
||||
|
||||
import io.reactivex.rxjava3.core.Observable;
|
||||
import retrofit2.http.Field;
|
||||
import retrofit2.http.FormUrlEncoded;
|
||||
import retrofit2.http.POST;
|
||||
|
||||
public interface SnConfirmBindApi {
|
||||
@FormUrlEncoded
|
||||
@POST(UrlAddress.SN_CONFIRM_BIND)
|
||||
Observable<BaseResponse> snConfirmBind(
|
||||
@Field("sn") String sn,
|
||||
@Field("userId") String userId,
|
||||
@Field("type") int type
|
||||
);
|
||||
}
|
||||
@@ -1,18 +0,0 @@
|
||||
package com.aoleyun.sn.network.api.post;
|
||||
|
||||
import com.aoleyun.sn.bean.BaseResponse;
|
||||
import com.aoleyun.sn.bean.StudentsInfo;
|
||||
import com.aoleyun.sn.network.UrlAddress;
|
||||
|
||||
import io.reactivex.rxjava3.core.Observable;
|
||||
import retrofit2.http.Field;
|
||||
import retrofit2.http.FormUrlEncoded;
|
||||
import retrofit2.http.POST;
|
||||
|
||||
public interface StudentsInfoApi {
|
||||
@FormUrlEncoded
|
||||
@POST(UrlAddress.GET_STUDENTS_INFO)
|
||||
Observable<BaseResponse<StudentsInfo>> getStudentsInfo(
|
||||
@Field("sn") String sn
|
||||
);
|
||||
}
|
||||
@@ -1,18 +0,0 @@
|
||||
package com.aoleyun.sn.network.api.post;
|
||||
|
||||
import com.aoleyun.sn.bean.BaseResponse;
|
||||
import com.aoleyun.sn.network.UrlAddress;
|
||||
|
||||
import io.reactivex.rxjava3.core.Observable;
|
||||
import retrofit2.http.Field;
|
||||
import retrofit2.http.FormUrlEncoded;
|
||||
import retrofit2.http.POST;
|
||||
|
||||
public interface SystemSettingApi {
|
||||
@FormUrlEncoded
|
||||
@POST(UrlAddress.GET_FIRMWARE)
|
||||
Observable<BaseResponse> getSystemSettingApi(
|
||||
@Field("key") String key,
|
||||
@Field("sn") String sn
|
||||
);
|
||||
}
|
||||
@@ -1,22 +0,0 @@
|
||||
package com.aoleyun.sn.network.api.post;
|
||||
|
||||
import com.aoleyun.sn.bean.BaseResponse;
|
||||
import com.aoleyun.sn.network.UrlAddress;
|
||||
|
||||
import io.reactivex.rxjava3.core.Observable;
|
||||
import retrofit2.http.Field;
|
||||
import retrofit2.http.FormUrlEncoded;
|
||||
import retrofit2.http.POST;
|
||||
|
||||
public interface UpdateDeviceInfoApi {
|
||||
@FormUrlEncoded
|
||||
@POST(UrlAddress.UPDATE_DEVICEINFO)
|
||||
Observable<BaseResponse> updateDeviceInfo(
|
||||
@Field("sn") String sn,
|
||||
@Field("key") String key,
|
||||
@Field("machine") String machine,
|
||||
@Field("hardware") String hardware,
|
||||
@Field("address") String address,
|
||||
@Field("other") String other
|
||||
);
|
||||
}
|
||||
@@ -1,23 +0,0 @@
|
||||
package com.aoleyun.sn.network.api.post;
|
||||
|
||||
import com.aoleyun.sn.bean.BaseResponse;
|
||||
import com.aoleyun.sn.network.UrlAddress;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
import okhttp3.MultipartBody;
|
||||
import okhttp3.RequestBody;
|
||||
import retrofit2.Call;
|
||||
import retrofit2.http.Multipart;
|
||||
import retrofit2.http.POST;
|
||||
import retrofit2.http.Part;
|
||||
import retrofit2.http.PartMap;
|
||||
|
||||
public interface UploadAppImgApi {
|
||||
@Multipart
|
||||
@POST(UrlAddress.UPLOAD_APP_IMG)
|
||||
Call<BaseResponse> uploadAppImg(
|
||||
@PartMap Map<String, RequestBody> params,
|
||||
@Part MultipartBody.Part body
|
||||
);
|
||||
}
|
||||
@@ -1,19 +0,0 @@
|
||||
package com.aoleyun.sn.network.api.post;
|
||||
|
||||
import com.aoleyun.sn.bean.BaseResponse;
|
||||
import com.aoleyun.sn.network.UrlAddress;
|
||||
|
||||
import io.reactivex.rxjava3.core.Observable;
|
||||
import retrofit2.http.Field;
|
||||
import retrofit2.http.FormUrlEncoded;
|
||||
import retrofit2.http.POST;
|
||||
|
||||
public interface UploadAppInfoApi {
|
||||
@FormUrlEncoded
|
||||
@POST(UrlAddress.UPLOAD_APPINFO)
|
||||
Observable<BaseResponse> getUploadAppInfoApi(
|
||||
@Field("key") String key,
|
||||
@Field("sn") String sn,
|
||||
@Field("app_infoes") String json
|
||||
);
|
||||
}
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
package com.aoleyun.sn.network.api;
|
||||
package com.aoleyun.sn.network.api.thirdparty;
|
||||
|
||||
import com.aoleyun.sn.bean.WhoisBean;
|
||||
import com.aoleyun.sn.network.UrlAddress;
|
||||
@@ -0,0 +1,30 @@
|
||||
package com.aoleyun.sn.network.cache;
|
||||
|
||||
/**
|
||||
* 缓存实体:存储请求结果、创建时间、有效期
|
||||
*
|
||||
* @param <T> 接口返回数据类型
|
||||
*/
|
||||
public class CacheEntry<T> {
|
||||
// 缓存的成功数据
|
||||
private final T data;
|
||||
// 缓存创建时间(毫秒)
|
||||
private final long createTime;
|
||||
// 缓存有效期(毫秒)
|
||||
private final long expireTimeMillis;
|
||||
|
||||
public CacheEntry(T data, long createTime, long expireTimeMillis) {
|
||||
this.data = data;
|
||||
this.createTime = createTime;
|
||||
this.expireTimeMillis = expireTimeMillis;
|
||||
}
|
||||
|
||||
// 判断缓存是否过期
|
||||
public boolean isExpired() {
|
||||
return System.currentTimeMillis() - createTime > expireTimeMillis;
|
||||
}
|
||||
|
||||
public T getData() {
|
||||
return data;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,63 @@
|
||||
package com.aoleyun.sn.network.cache;
|
||||
|
||||
import java.util.concurrent.ConcurrentHashMap;
|
||||
|
||||
/**
|
||||
* 全局缓存管理器:线程安全,存储所有接口缓存
|
||||
*/
|
||||
public class RxCacheManager {
|
||||
// 单例
|
||||
private static volatile RxCacheManager INSTANCE;
|
||||
// 缓存容器:key=请求唯一标识,value=缓存实体
|
||||
private final ConcurrentHashMap<String, CacheEntry<?>> cacheMap;
|
||||
|
||||
private RxCacheManager() {
|
||||
cacheMap = new ConcurrentHashMap<>();
|
||||
}
|
||||
|
||||
public static RxCacheManager getInstance() {
|
||||
if (INSTANCE == null) {
|
||||
synchronized (RxCacheManager.class) {
|
||||
if (INSTANCE == null) {
|
||||
INSTANCE = new RxCacheManager();
|
||||
}
|
||||
}
|
||||
}
|
||||
return INSTANCE;
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存缓存
|
||||
*/
|
||||
public <T> void saveCache(String key, T data, long expireTimeMillis) {
|
||||
if (key == null || data == null) return;
|
||||
cacheMap.put(key, new CacheEntry<>(data, System.currentTimeMillis(), expireTimeMillis));
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取缓存(自动判断过期)
|
||||
*/
|
||||
public <T> T getCache(String key) {
|
||||
CacheEntry<?> entry = cacheMap.get(key);
|
||||
if (entry == null || entry.isExpired()) {
|
||||
// 缓存不存在/已过期,移除并返回null
|
||||
cacheMap.remove(key);
|
||||
return null;
|
||||
}
|
||||
return (T) entry.getData();
|
||||
}
|
||||
|
||||
/**
|
||||
* 清空所有缓存
|
||||
*/
|
||||
public void clearAllCache() {
|
||||
cacheMap.clear();
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除指定缓存
|
||||
*/
|
||||
public void removeCache(String key) {
|
||||
cacheMap.remove(key);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,38 @@
|
||||
package com.aoleyun.sn.network.cache;
|
||||
|
||||
import io.reactivex.rxjava3.android.schedulers.AndroidSchedulers;
|
||||
import io.reactivex.rxjava3.core.Observable;
|
||||
import io.reactivex.rxjava3.schedulers.Schedulers;
|
||||
|
||||
/**
|
||||
* 优化后:无需手动传CacheKey,自动从请求获取
|
||||
*/
|
||||
public class RxCacheRequest {
|
||||
private static final RxCacheManager CACHE_MANAGER = RxCacheManager.getInstance();
|
||||
|
||||
/**
|
||||
* 极简调用:仅需 网络请求Observable + 缓存过期时间
|
||||
*
|
||||
* @param networkObservable 原始网络请求
|
||||
* @param expireTimeMillis 缓存有效期(毫秒)
|
||||
* @return 带自动缓存的Observable
|
||||
*/
|
||||
public static <T> Observable<T> withCache(Observable<T> networkObservable, String cacheKey, long expireTimeMillis) {
|
||||
return Observable.defer(() -> {
|
||||
|
||||
// 2. 读取缓存
|
||||
T cacheData = CACHE_MANAGER.getCache(cacheKey);
|
||||
if (cacheData != null) {
|
||||
return Observable.just(cacheData);
|
||||
}
|
||||
|
||||
// 3. 无缓存则发起网络请求,成功后缓存
|
||||
return networkObservable
|
||||
.subscribeOn(Schedulers.io())
|
||||
.doOnNext(data -> CACHE_MANAGER.saveCache(cacheKey, data, expireTimeMillis));
|
||||
})
|
||||
.subscribeOn(Schedulers.io()) // 缓存IO切到子线程
|
||||
.observeOn(AndroidSchedulers.mainThread());
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,66 @@
|
||||
package com.aoleyun.sn.network.cache;
|
||||
|
||||
import java.util.concurrent.ConcurrentHashMap;
|
||||
|
||||
import io.reactivex.rxjava3.core.Observable;
|
||||
import io.reactivex.rxjava3.core.ObservableSource;
|
||||
import io.reactivex.rxjava3.core.ObservableTransformer;
|
||||
|
||||
public class RxTimeCacheManager {
|
||||
|
||||
// Thread-safe memory cache to hold our data and its timestamp
|
||||
private static final ConcurrentHashMap<String, CacheEntry<?>> cacheMap = new ConcurrentHashMap<>();
|
||||
|
||||
/**
|
||||
* Industry Standard RxJava Cache Transformer.
|
||||
* * @param cacheKey Unique key for this specific request (e.g., URL or Method Name)
|
||||
*
|
||||
* @param validTimeMillis How long the data is valid before a new network request is allowed
|
||||
*/
|
||||
public static <T> ObservableTransformer<T, T> applyCache(final String cacheKey, final long validTimeMillis) {
|
||||
return new ObservableTransformer<T, T>() {
|
||||
@Override
|
||||
public ObservableSource<T> apply(Observable<T> upstream) {
|
||||
// defer() ensures this logic runs EVERY time someone subscribes, not at initialization
|
||||
return Observable.defer(() -> {
|
||||
CacheEntry<?> entry = cacheMap.get(cacheKey);
|
||||
long currentTime = System.currentTimeMillis();
|
||||
|
||||
// 1. Check if cache exists and is within the time limit
|
||||
if (entry != null && (currentTime - entry.timestamp) < validTimeMillis) {
|
||||
// Cache HIT -> Return cached data immediately, do not trigger network
|
||||
@SuppressWarnings("unchecked")
|
||||
T cachedData = (T) entry.data;
|
||||
return Observable.just(cachedData);
|
||||
}
|
||||
|
||||
// 2. Cache MISS or EXPIRED -> Trigger upstream (network) and save result
|
||||
return upstream.doOnNext(data -> {
|
||||
// Save the fresh data and current timestamp back to the cache
|
||||
cacheMap.put(cacheKey, new CacheEntry<>(data, System.currentTimeMillis()));
|
||||
});
|
||||
});
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Clears a specific cache key if you need to force a refresh manually.
|
||||
*/
|
||||
public static void clearCache(String cacheKey) {
|
||||
cacheMap.remove(cacheKey);
|
||||
}
|
||||
|
||||
/**
|
||||
* Internal wrapper to hold the payload and the time it was fetched.
|
||||
*/
|
||||
private static class CacheEntry<T> {
|
||||
final T data;
|
||||
final long timestamp;
|
||||
|
||||
CacheEntry(T data, long timestamp) {
|
||||
this.data = data;
|
||||
this.timestamp = timestamp;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -16,6 +16,7 @@ import android.media.MediaPlayer;
|
||||
import android.os.BatteryManager;
|
||||
import android.os.Build;
|
||||
import android.os.Handler;
|
||||
import android.os.Looper;
|
||||
import android.os.PowerManager;
|
||||
import android.provider.Settings;
|
||||
import android.text.TextUtils;
|
||||
@@ -35,7 +36,6 @@ import com.aoleyun.sn.bean.ScreenLockState;
|
||||
import com.aoleyun.sn.comm.CommonConfig;
|
||||
import com.aoleyun.sn.comm.JGYActions;
|
||||
import com.aoleyun.sn.dialog.CustomDialog;
|
||||
import com.aoleyun.sn.disklrucache.CacheHelper;
|
||||
import com.aoleyun.sn.gson.GsonUtils;
|
||||
import com.aoleyun.sn.gson.NullStringToEmptyAdapterFactory;
|
||||
import com.aoleyun.sn.manager.MapManager;
|
||||
@@ -96,8 +96,8 @@ import retrofit2.Response;
|
||||
public class PushManager {
|
||||
private static final String TAG = "PushManager";
|
||||
|
||||
public static final String ACTION_REFRESH_BINDING_STATUS = "RefreshBindingStatus";
|
||||
public static final String AOLEYUN_REFRESH_DESKTOP = "aoleyun_refresh_desktop_action";
|
||||
private static final String ACTION_REFRESH_BINDING_STATUS = "RefreshBindingStatus";
|
||||
private static final String AOLEYUN_REFRESH_DESKTOP = "aoleyun_refresh_desktop_action";
|
||||
|
||||
|
||||
@SuppressLint("StaticFieldLeak")
|
||||
@@ -105,7 +105,6 @@ public class PushManager {
|
||||
private Context mContext;
|
||||
private PackageManager mPackageManager;
|
||||
private ContentResolver mResolver;
|
||||
private CacheHelper mCacheHelper;
|
||||
private MMKV mMMKV = MMKV.mmkvWithID(CommonConfig.MMKV_ID, MMKV.MULTI_PROCESS_MODE);
|
||||
|
||||
private PushManager(Context context) {
|
||||
@@ -114,7 +113,6 @@ public class PushManager {
|
||||
}
|
||||
this.mContext = context;
|
||||
this.mResolver = context.getContentResolver();
|
||||
this.mCacheHelper = new CacheHelper(context);
|
||||
this.mPackageManager = mContext.getPackageManager();
|
||||
}
|
||||
|
||||
@@ -270,6 +268,12 @@ public class PushManager {
|
||||
private static final String GROUP_APP_UNINSTALL = "81";
|
||||
/*电子围栏*/
|
||||
private static final String ELECTRONIC_FENCE = "82";
|
||||
/*发出声音*/
|
||||
private static final String PLAY_SOUND2 = "89";
|
||||
/*更新公共应用设置,不安装*/
|
||||
private static final String PUBLIC_APP_SETTING = "91";
|
||||
/*公共应用卸载*/
|
||||
private static final String PUBLIC_APP_UNINSTALL = "92";
|
||||
|
||||
|
||||
public void setPushContent(String title, String extras) {
|
||||
@@ -313,21 +317,23 @@ public class PushManager {
|
||||
mMMKV.clearAll();
|
||||
JgyUtils.getInstance().cleanAoleAppCache();
|
||||
JgyUtils.getInstance().wakeUpAoleyunAPP();
|
||||
NetInterfaceManager.getInstance().setPushTags();
|
||||
|
||||
NetInterfaceManager.getInstance().getPushAndPubAppTag();
|
||||
NetInterfaceManager.clearAllCache();
|
||||
sendRefreshBroadcast(mContext);
|
||||
break;
|
||||
case MSG_INSTALL:
|
||||
Toaster.debugShow("收到管控:应用安装");
|
||||
NetInterfaceManager.removeCache(UrlAddress.GET_FORCE_INSTALL_LIST);
|
||||
NetInterfaceManager.removeCache(UrlAddress.GROUP_APP_INSTALL_LIST);
|
||||
doDownloadAndInstall(extras);
|
||||
Handler.getMain().postDelayed(new Runnable() {
|
||||
new Handler(Looper.getMainLooper()).postDelayed(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
NetInterfaceManager.getInstance().getDesktopIcon();
|
||||
NetInterfaceManager.getInstance().getDefaultDesktop();
|
||||
NetInterfaceManager.getInstance().getNetAndLaunchSetting();
|
||||
NetInterfaceManager.getInstance().getAppAutoStartUpdateAndNet();
|
||||
}
|
||||
}, 1234);
|
||||
}, 5234);
|
||||
mContext.sendBroadcast(new Intent(AOLEYUN_REFRESH_DESKTOP));
|
||||
break;
|
||||
case MSG_LOCK:
|
||||
@@ -355,7 +361,7 @@ public class PushManager {
|
||||
downloadForceInstallApk(extras);
|
||||
break;
|
||||
case SET_HOMEPAG_TAG:
|
||||
Handler.getMain().postDelayed(new Runnable() {
|
||||
new Handler(Looper.getMainLooper()).postDelayed(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
try {
|
||||
@@ -380,7 +386,7 @@ public class PushManager {
|
||||
break;
|
||||
case HIDE_DESKTOP_ICON:
|
||||
Toaster.debugShow("收到管控:隐藏应用设置");
|
||||
Handler.getMain().postDelayed(() -> {
|
||||
new Handler(Looper.getMainLooper()).postDelayed(() -> {
|
||||
//后台发送时数据库未改变,有时候可能获取到的数据时上一次的
|
||||
Log.e(TAG, "run: HIDE_DESKTOP_ICON ");
|
||||
NetInterfaceManager.getInstance().getDesktopIcon();
|
||||
@@ -525,6 +531,7 @@ public class PushManager {
|
||||
setDefalutApp(extras);
|
||||
break;
|
||||
case PLAY_SOUND:
|
||||
case PLAY_SOUND2:
|
||||
Toaster.debugShow("收到管控:查找设备");
|
||||
playSound(extras);
|
||||
break;
|
||||
@@ -554,7 +561,7 @@ public class PushManager {
|
||||
break;
|
||||
case UPDATE_CHILD_BATCH:
|
||||
Toaster.debugShow("收到管控:更换批次不恢复出厂设置");
|
||||
NetInterfaceManager.getInstance().setPushTags();
|
||||
NetInterfaceManager.getInstance().getPushAndPubAppTag();
|
||||
Aria.download(this).removeAllTask(true);
|
||||
JgyUtils.getInstance().cleanAoleAppCache();
|
||||
try {
|
||||
@@ -616,7 +623,7 @@ public class PushManager {
|
||||
Map<String, String> params = new HashMap<>();
|
||||
params.put("sn", Utils.getSerial(mContext));
|
||||
params.put("createtime", String.valueOf(createTime));
|
||||
Call<BaseResponse> call = NetInterfaceManager.getInstance().getScreenshotCall().sendScreenshot(params, body);
|
||||
Call<BaseResponse> call = NetInterfaceManager.getInstance().getUploadInfoApi().sendScreenshot(params, body);
|
||||
call.enqueue(new RetryCallback<BaseResponse>(call, 10, 30 * 1000) {
|
||||
@Override
|
||||
public void onRequestResponse(Call call, Response response) {
|
||||
@@ -685,6 +692,12 @@ public class PushManager {
|
||||
}
|
||||
case ELECTRONIC_FENCE:
|
||||
|
||||
break;
|
||||
case PUBLIC_APP_SETTING:
|
||||
updatePublicAppSettings(extras);
|
||||
break;
|
||||
case PUBLIC_APP_UNINSTALL:
|
||||
uninstallPublicApp(extras);
|
||||
break;
|
||||
default:
|
||||
}
|
||||
@@ -732,12 +745,12 @@ public class PushManager {
|
||||
}
|
||||
}
|
||||
ApkUtils.UninstallAPP(mContext, pkg);
|
||||
Handler.getMain().postDelayed(new Runnable() {
|
||||
new Handler(Looper.getMainLooper()).postDelayed(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
NetInterfaceManager.getInstance().getDesktopIcon();
|
||||
NetInterfaceManager.getInstance().getDefaultDesktop();
|
||||
NetInterfaceManager.getInstance().getNetAndLaunchSetting();
|
||||
NetInterfaceManager.getInstance().getAppAutoStartUpdateAndNet();
|
||||
}
|
||||
}, 1234);
|
||||
}
|
||||
@@ -757,7 +770,7 @@ public class PushManager {
|
||||
} catch (Exception e) {
|
||||
Log.e(TAG, "disableApp: " + e.getMessage());
|
||||
}
|
||||
Handler.getMain().postDelayed(() -> NetInterfaceManager.getInstance().getSnAppAttr(), 1234);
|
||||
new Handler(Looper.getMainLooper()).postDelayed(() -> NetInterfaceManager.getInstance().getSnAppAttr(), 1234);
|
||||
}
|
||||
|
||||
private void setLock_screen(int state, String name) {
|
||||
@@ -767,7 +780,6 @@ public class PushManager {
|
||||
ScreenLockState screenLockState = new ScreenLockState();
|
||||
screenLockState.setIs_screen_lock(state);
|
||||
screenLockState.setName(name);
|
||||
mCacheHelper.put(UrlAddress.GET_LOCK_SCREEN_STATE, GsonUtils.toJSONString(screenLockState));
|
||||
Intent intent = new Intent();
|
||||
intent.putExtra("name", name);
|
||||
if (state == 1) {
|
||||
@@ -1000,7 +1012,7 @@ public class PushManager {
|
||||
JgyUtils.release(mWakeLock);
|
||||
if (createTime != 0) {
|
||||
Log.e("createTime", String.valueOf(createTime));
|
||||
Handler.getMain().postDelayed(new Runnable() {
|
||||
new Handler(Looper.getMainLooper()).postDelayed(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
doscreenshot(createTime);
|
||||
@@ -1066,7 +1078,7 @@ public class PushManager {
|
||||
Map<String, String> params = new HashMap<>();
|
||||
params.put("sn", Utils.getSerial(mContext));
|
||||
params.put("createtime", String.valueOf(time));
|
||||
Call<BaseResponse> call = NetInterfaceManager.getInstance().getScreenshotCall().sendScreenshot(params, body);
|
||||
Call<BaseResponse> call = NetInterfaceManager.getInstance().getUploadInfoApi().sendScreenshot(params, body);
|
||||
call.enqueue(new RetryCallback<BaseResponse>(call, 10, 30 * 1000) {
|
||||
@Override
|
||||
public void onRequestResponse(Call call, Response response) {
|
||||
@@ -1118,7 +1130,6 @@ public class PushManager {
|
||||
|
||||
private void getTopApp(String extras) {
|
||||
JsonObject jsonObject = GsonUtils.getJsonObject(extras);
|
||||
mCacheHelper.put(UrlAddress.GET_TOP_APP_CONTROL, extras);
|
||||
|
||||
String packageName = jsonObject.get("app_package").getAsString();
|
||||
if (TextUtils.isEmpty(packageName)) {
|
||||
@@ -1504,7 +1515,7 @@ public class PushManager {
|
||||
|
||||
private void bind(final String id, int type) {
|
||||
NetInterfaceManager.getInstance()
|
||||
.getSnConfirmBindApi()
|
||||
.getDevicesStatusApi()
|
||||
.snConfirmBind(Utils.getSerial(mContext), id, type)
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
@@ -1558,4 +1569,30 @@ public class PushManager {
|
||||
ApkUtils.openPackage(mContext, app_package);
|
||||
}
|
||||
|
||||
public void updatePublicAppSettings(String extras) {
|
||||
Toaster.debugShow("收到管控:应用公共设置");
|
||||
if (TextUtils.isEmpty(extras)) {
|
||||
Log.e(TAG, "updatePublicAppSettings: extras is null");
|
||||
return;
|
||||
}
|
||||
new Handler(Looper.getMainLooper()).postDelayed(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
NetInterfaceManager.getInstance().getAppLimit();
|
||||
NetInterfaceManager.getInstance().getAppAutoStartUpdateAndNet();
|
||||
}
|
||||
}, 2345);
|
||||
|
||||
ApkInfoPush apkInfoPush = GsonUtils.toJavaObject(extras, ApkInfoPush.class);
|
||||
}
|
||||
|
||||
public void uninstallPublicApp(String extras) {
|
||||
Toaster.debugShow("收到管控:应用公共删除");
|
||||
if (!TextUtils.isEmpty(extras)) {
|
||||
JsonObject jsonObject = GsonUtils.getJsonObject(extras);
|
||||
String pkg = jsonObject.get("package_name").getAsString();
|
||||
deleteApp(pkg);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -103,7 +103,7 @@ public class NewAppReceiver extends BroadcastReceiver {
|
||||
private static void sendAppInfo() {
|
||||
Observable.create((ObservableEmitter<String> emitter) -> {
|
||||
newAppListener = emitter::onNext;
|
||||
}).throttleLast(5, TimeUnit.MINUTES)
|
||||
}).throttleLast(1, TimeUnit.MINUTES)
|
||||
//这句很关键,这是RxJava中的操作符,在规定时间内观察者不在接收被观察者发送的事件
|
||||
.subscribe(new Observer<String>() {
|
||||
@Override
|
||||
@@ -118,7 +118,7 @@ public class NewAppReceiver extends BroadcastReceiver {
|
||||
NetInterfaceManager.getInstance().getForceDownload();
|
||||
NetInterfaceManager.getInstance().getAppLimit();
|
||||
// NetInterfaceManager.getInstance().getDefaultDesktop();
|
||||
NetInterfaceManager.getInstance().getNetAndLaunchSetting();
|
||||
NetInterfaceManager.getInstance().getAppAutoStartUpdateAndNet();
|
||||
NetInterfaceManager.getInstance().getDesktopIcon();
|
||||
NetInterfaceManager.getInstance().sendInstalledAppInfo(new NetInterfaceManager.onCompleteCallback() {
|
||||
@Override
|
||||
|
||||
@@ -27,7 +27,7 @@ import com.aoleyun.sn.comm.CommonConfig;
|
||||
import com.aoleyun.sn.gson.GsonUtils;
|
||||
import com.aoleyun.sn.manager.MapManager;
|
||||
import com.aoleyun.sn.network.NetInterfaceManager;
|
||||
import com.aoleyun.sn.network.api.post.SendScreenStatusApi;
|
||||
import com.aoleyun.sn.network.api.aoleyun.UploadInfoApi;
|
||||
import com.aoleyun.sn.receiver.NewAppReceiver;
|
||||
import com.aoleyun.sn.rlog.LogDBManager;
|
||||
import com.aoleyun.sn.service.main.MainService;
|
||||
@@ -387,8 +387,8 @@ public class GuardService extends Service {
|
||||
.addConverterFactory(GsonConverterFactory.create())
|
||||
.addCallAdapterFactory(RxJava3CallAdapterFactory.create())
|
||||
.build();
|
||||
SendScreenStatusApi sendScreenStatusApi = retrofit.create(SendScreenStatusApi.class);
|
||||
sendScreenStatusApi.sendScreenStatus(NetInterfaceManager.HTTP_KEY, Utils.getSerial(this), status)
|
||||
UploadInfoApi uploadInfoApi = retrofit.create(UploadInfoApi.class);
|
||||
uploadInfoApi.sendScreenStatus(NetInterfaceManager.HTTP_KEY, Utils.getSerial(this), status)
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(new Observer<BaseResponse>() {
|
||||
@@ -424,7 +424,7 @@ public class GuardService extends Service {
|
||||
return;
|
||||
}
|
||||
NetInterfaceManager.getInstance()
|
||||
.getLockState()
|
||||
.getUploadInfoApi()
|
||||
.getLockState(Utils.getSerial(this), status, time)
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
|
||||
@@ -268,8 +268,8 @@ public class LogcatService extends Service {
|
||||
//设置一个file文件
|
||||
MultipartBody.Part body = MultipartBody.Part.createFormData("file", file.getName(), fileBody);
|
||||
|
||||
NetInterfaceManager.getInstance().getUploadLogApi()
|
||||
.UploadLog(params, body)
|
||||
NetInterfaceManager.getInstance().getLogApi()
|
||||
.uploadLog(params, body)
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(new Observer<BaseResponse>() {
|
||||
|
||||
@@ -1,188 +0,0 @@
|
||||
package com.aoleyun.sn.service.main;
|
||||
|
||||
import com.aoleyun.sn.base.mvp.BasePresenter;
|
||||
import com.aoleyun.sn.base.mvp.BaseView;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class MainSContact {
|
||||
public interface Presenter extends BasePresenter<MainView> {
|
||||
/*分支1*/
|
||||
/*获取设备锁定状态*/
|
||||
void getLockedState();
|
||||
/*设置极光推送标签*/
|
||||
void setPushTags();
|
||||
|
||||
|
||||
/*分支2 基本信息*/
|
||||
/*是否第一次联网*/
|
||||
void getFirstConnect();
|
||||
/*获取学生信息*/
|
||||
void getStudesInfo();
|
||||
|
||||
/*分支3 上传信息*/
|
||||
/*上传联网时间*/
|
||||
void sendNetwork(List<Long> time);
|
||||
/*发送mac地址*/
|
||||
void sendMacAddress();
|
||||
/*更新设备信息*/
|
||||
void updateDeviceInfo();
|
||||
/*上传安装的应用列表*/
|
||||
void sendInstalled();
|
||||
/*获取设备信息更新*/
|
||||
void checkAoleyunUpdate();
|
||||
/*获取测试应用更新*/
|
||||
void checkTestUpdate();
|
||||
|
||||
/*分支4 根据SN获取*/
|
||||
/*获取开发者选项*/
|
||||
void getDeveloper();
|
||||
/*获取自定义内置app*/
|
||||
void getRomApp();
|
||||
/*获取屏幕锁状态*/
|
||||
void getScreenLockState();
|
||||
/*电子围栏*/
|
||||
void geteFence();
|
||||
|
||||
/*分支5 根据批次获取*/
|
||||
/*获取设备后台设置*/
|
||||
void getSystemSettingBegin();
|
||||
/*获取可被写入的安装包名*/
|
||||
void getAppLimit();
|
||||
/*获取强制下载apk*/
|
||||
void getForceDownload();
|
||||
/*获取桌面*/
|
||||
void getDefaultDesktop();
|
||||
/*设置开机动画*/
|
||||
void setLogoImg();
|
||||
/*获取壁纸*/
|
||||
void getWallpaper();
|
||||
/*获取所有app详细信息*/
|
||||
void getAllAppList();
|
||||
/*获取浏览器书签设置管控*/
|
||||
void getBrowserBookmarks();
|
||||
/*设置白名单的url 单独*/
|
||||
void getBrowserWhiteList();
|
||||
/*获取应用图标桌面可见性管控*/
|
||||
void getDesktopIcon();
|
||||
/*获取应用自启升级和网络权限管理*/
|
||||
void getAppAutoStartUpdateAndNet();
|
||||
/*获取禁用app*/
|
||||
void getSnAppAttr();
|
||||
/*获取第三方应用子页面ID连网限制*/
|
||||
void getAppIdControl();
|
||||
/*获取第三方应用内部网页跳转屏蔽*/
|
||||
void setAppinsideWeb();
|
||||
/*获取系统其他管控设置*/
|
||||
void getSystemSetting();
|
||||
/*获取系统默认程序设置*/
|
||||
void getDefaultApp();
|
||||
/*应用霸屏*/
|
||||
void setTopApp();
|
||||
/*获取关机时间*/
|
||||
void getPoweroffTime();
|
||||
/*获取时间管控*/
|
||||
void getSnTimeControl();
|
||||
void getSnSetting();
|
||||
/*获取网课模式*/
|
||||
void getCloudLessonSettings();
|
||||
/*获取电子书包激活码*/
|
||||
void getEbagCode();
|
||||
/*获取学习应用*/
|
||||
void getExclusiveAdminApp();
|
||||
/*获取全局黑名单*/
|
||||
void getBlackList();
|
||||
/*获取全局白名单*/
|
||||
void getWhiteList();
|
||||
/*获取wifi密码*/
|
||||
void getWiFiPasswd();
|
||||
|
||||
}
|
||||
|
||||
public interface MainView extends BaseView {
|
||||
/*获取设备锁定状态*/
|
||||
void setLockedState(boolean loocked);
|
||||
/*设置极光推送标签*/
|
||||
void setTagsFinish(boolean noTag);
|
||||
|
||||
|
||||
/*是否第一次联网*/
|
||||
void setFirstConnect(boolean state);
|
||||
/*获取学生信息*/
|
||||
void setStudesInfo();
|
||||
|
||||
/*上传联网时间*/
|
||||
void sendNetworkFinish();
|
||||
/*发送mac地址*/
|
||||
void sendMacFinish();
|
||||
/*更新设备信息*/
|
||||
void updateDeviceInfoFinish();
|
||||
/*上传安装的应用列表*/
|
||||
void sendInstalledFinish();
|
||||
|
||||
/*获取设备信息更新*/
|
||||
void checkAoleyunUpdateFinish();
|
||||
/*获取测试应用更新*/
|
||||
void checkTestUpdateFinish();
|
||||
/*获取开发者选项结束*/
|
||||
void getDeveloperFinish();
|
||||
/*获取自定义内置app*/
|
||||
void getRomAppFinish();
|
||||
/*设置屏幕锁状态结束*/
|
||||
void setScreenLockStateFinish(boolean locked, String tips);
|
||||
/*获取电子围栏结束*/
|
||||
void geteFenceFinish();
|
||||
|
||||
/*设置设备后台设置*/
|
||||
void setSystemSetting();
|
||||
/*获取可被写入的安装包名结束*/
|
||||
void getAppLimitFinish();
|
||||
/*获取强制下载apk结束*/
|
||||
void getForceDownloadFinish();
|
||||
/*获取桌面结束*/
|
||||
void getDefaultDesktopFinish();
|
||||
/*设置开机动画*/
|
||||
void setLogoImgFinish();
|
||||
/*获取开机动画结束*/
|
||||
void getWallpaperFinish();
|
||||
/*获取所有app详细信息*/
|
||||
void getAllAppListFinish();
|
||||
/*获取浏览器书签设置管控结束*/
|
||||
void getBrowserBookmarksFinish();
|
||||
/*设置白名单的url 单独*/
|
||||
void setBrowserWhiteList();
|
||||
/*获取应用图标桌面可见性管控结束*/
|
||||
void getDesktopIconFinish();
|
||||
/*获取应用自启升级和网络权限管理结束*/
|
||||
void getAppAutoStartUpdateAndNetFinish();
|
||||
/*获取禁用app*/
|
||||
void getSnAppAttrFinish();
|
||||
/*获取第三方应用子页面ID连网限制结束*/
|
||||
void getAppIdControlFinish();
|
||||
/*获取第三方应用内部网页跳转屏蔽结束*/
|
||||
void setAppinsideWebFinish();
|
||||
/*获取系统其他管控设置结束*/
|
||||
void getSystemSettingFinish();
|
||||
/*获取系统默认程序设置*/
|
||||
void setDefaultAppFinish();
|
||||
/*获取应用霸屏结束*/
|
||||
void setTopAppFinish();
|
||||
/*获取关机时间*/
|
||||
void setPoweroffTime();
|
||||
/*获取时间管控*/
|
||||
void getSnTimeControlFinish();
|
||||
void getSnSettingFinish();
|
||||
void setCloudLessonSettings();
|
||||
/*获取电子书包激活码*/
|
||||
void getEbagCodeFinish(boolean activation);
|
||||
/*获取学习应用*/
|
||||
void getExclusiveAdminAppFinish();
|
||||
/*获取全局黑名单结束*/
|
||||
void getBlackListFinish();
|
||||
/*获取全局白名单结束*/
|
||||
void getWhiteListFinish();
|
||||
/*获取wifi密码结束*/
|
||||
void setWiFiPasswd();
|
||||
|
||||
}
|
||||
}
|
||||
File diff suppressed because it is too large.
Load diff
+127
-210
@@ -3,22 +3,25 @@ package com.aoleyun.sn.service.main;
|
||||
import android.content.ContentResolver;
|
||||
import android.content.Context;
|
||||
import android.provider.Settings;
|
||||
import android.text.TextUtils;
|
||||
import android.util.Log;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.lifecycle.MutableLiveData;
|
||||
import androidx.lifecycle.ViewModel;
|
||||
|
||||
import com.alibaba.sdk.android.push.CloudPushService;
|
||||
import com.alibaba.sdk.android.push.CommonCallback;
|
||||
import com.alibaba.sdk.android.push.noonesdk.PushServiceFactory;
|
||||
import com.aoleyun.sn.bean.AdminAppInfo;
|
||||
import com.aoleyun.sn.bean.BaseResponse;
|
||||
import com.aoleyun.sn.bean.ScreenLockState;
|
||||
import com.aoleyun.sn.bean.StudentsInfo;
|
||||
import com.aoleyun.sn.comm.CommonConfig;
|
||||
import com.aoleyun.sn.comm.JGYActions;
|
||||
import com.aoleyun.sn.disklrucache.CacheHelper;
|
||||
import com.aoleyun.sn.network.NetInterfaceManager;
|
||||
import com.aoleyun.sn.network.UrlAddress;
|
||||
import com.aoleyun.sn.utils.JgyUtils;
|
||||
import com.aoleyun.sn.utils.SPUtils;
|
||||
import com.aoleyun.sn.utils.SysSettingUtils;
|
||||
import com.aoleyun.sn.utils.URLUtils;
|
||||
import com.aoleyun.sn.utils.Utils;
|
||||
import com.hjq.toast.Toaster;
|
||||
@@ -28,30 +31,22 @@ import com.trello.rxlifecycle4.android.ActivityEvent;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.HashSet;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
|
||||
import io.reactivex.rxjava3.android.schedulers.AndroidSchedulers;
|
||||
import io.reactivex.rxjava3.annotations.NonNull;
|
||||
import io.reactivex.rxjava3.core.Observer;
|
||||
import io.reactivex.rxjava3.disposables.Disposable;
|
||||
import io.reactivex.rxjava3.schedulers.Schedulers;
|
||||
import io.reactivex.rxjava3.subjects.BehaviorSubject;
|
||||
|
||||
/**
|
||||
* MainService 的 Presenter
|
||||
*
|
||||
* @author jgy02
|
||||
*/
|
||||
public class MainSPresenter implements MainSContact.Presenter {
|
||||
private static final String TAG = "MainSPresenter";
|
||||
public class MainServiceModel extends ViewModel {
|
||||
private static final String TAG = "MainServiceModel";
|
||||
|
||||
private MMKV mMMKV = MMKV.mmkvWithID(CommonConfig.MMKV_ID, MMKV.MULTI_PROCESS_MODE);
|
||||
|
||||
private MainSContact.MainView mView;
|
||||
private Context mContext;
|
||||
private ContentResolver crv;
|
||||
private MMKV mMMKV = MMKV.mmkvWithID(CommonConfig.MMKV_ID, MMKV.MULTI_PROCESS_MODE);
|
||||
private CacheHelper cacheHelper;
|
||||
|
||||
private BehaviorSubject<ActivityEvent> lifecycle;
|
||||
|
||||
@@ -63,27 +58,14 @@ public class MainSPresenter implements MainSContact.Presenter {
|
||||
return lifecycle;
|
||||
}
|
||||
|
||||
public MainSPresenter(Context context) {
|
||||
public MainServiceModel(Context context) {
|
||||
this.mContext = context;
|
||||
this.crv = mContext.getContentResolver();
|
||||
this.cacheHelper = new CacheHelper(mContext);
|
||||
Log.e(TAG, "MainSPresenter: " + context.getClass());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void attachView(@androidx.annotation.NonNull MainSContact.MainView view) {
|
||||
this.mView = view;
|
||||
}
|
||||
public MutableLiveData<Boolean> mLockedStateData = new MutableLiveData<>();
|
||||
|
||||
@Override
|
||||
public void detachView() {
|
||||
this.mView = null;
|
||||
}
|
||||
|
||||
/**
|
||||
* 1
|
||||
*/
|
||||
@Override
|
||||
public void getLockedState() {
|
||||
Log.e(TAG, "getLockedState: ");
|
||||
if (JgyUtils.getInstance().isAihuaFramework()) {
|
||||
@@ -99,34 +81,33 @@ public class MainSPresenter implements MainSContact.Presenter {
|
||||
Log.e("getLockedState", "onComplete: ");
|
||||
int locked = Settings.System.getInt(crv, JGYActions.ACTION_QCH_UNLOCK_IPAD, JGYActions.FRAME_CODE_LOCKED);
|
||||
Log.e("getLockedState", "locked: " + locked);
|
||||
if (locked == 0) {
|
||||
JgyUtils.getInstance().deleteOtherApp();
|
||||
}
|
||||
mView.setLockedState(locked == JGYActions.FRAME_CODE_LOCKED);
|
||||
// if (locked == 0) {
|
||||
// JgyUtils.getInstance().deleteOtherApp();
|
||||
// }
|
||||
mLockedStateData.postValue(locked == JGYActions.FRAME_CODE_LOCKED);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
public MutableLiveData<String> mTagData = new MutableLiveData<>();
|
||||
|
||||
public void setPushTags() {
|
||||
NetInterfaceManager.getInstance().setPushTags( getLifecycle(), new NetInterfaceManager.PushTagCallback() {
|
||||
NetInterfaceManager.getInstance().getPushAndPubAppTag(getLifecycle(), new NetInterfaceManager.PushTagCallback() {
|
||||
@Override
|
||||
public void setPushTag(String tag) {
|
||||
mView.setTagsFinish(TextUtils.isEmpty(tag));
|
||||
mTagData.postValue(tag);
|
||||
}
|
||||
});
|
||||
String tagSets = mMMKV.decodeString(CommonConfig.DEVICES_TAG);
|
||||
Log.e(TAG, "setPushTags: tagSets =" + tagSets);
|
||||
Set<String> groupTagSets = mMMKV.decodeStringSet(CommonConfig.DEVICES_GROUP_TAG, new HashSet<>());
|
||||
Log.e(TAG, "setPushTags: groupTagSets = " + groupTagSets);
|
||||
String tagstring = cacheHelper.getAsString(UrlAddress.GET_DEVICES_TAGS);
|
||||
Log.e(TAG, "setPushTags: tagstring = " + tagstring);
|
||||
Set<String> tags = new HashSet<>();
|
||||
tags.addAll(groupTagSets);
|
||||
if (!TextUtils.isEmpty(tagSets)) {
|
||||
tags.add(tagSets);
|
||||
}
|
||||
NetInterfaceManager.getInstance().clearAndAppendTags(tags);
|
||||
// String tagSets = mMMKV.decodeString(CommonConfig.DEVICES_TAG);
|
||||
// Log.e(TAG, "setPushTags: tagSets =" + tagSets);
|
||||
// Set<String> groupTagSets = mMMKV.decodeStringSet(CommonConfig.DEVICES_GROUP_TAG, new HashSet<>());
|
||||
// Log.e(TAG, "setPushTags: groupTagSets = " + groupTagSets);
|
||||
// Set<String> tags = new HashSet<>();
|
||||
// tags.addAll(groupTagSets);
|
||||
// if (!TextUtils.isEmpty(tagSets)) {
|
||||
// tags.add(tagSets);
|
||||
// }
|
||||
// NetInterfaceManager.getInstance().clearAndAppendTags(tags);
|
||||
}
|
||||
|
||||
private void setpushTag(Set<String> tagSets) {
|
||||
@@ -146,45 +127,43 @@ public class MainSPresenter implements MainSContact.Presenter {
|
||||
});
|
||||
}
|
||||
|
||||
/*
|
||||
* 2
|
||||
*/
|
||||
|
||||
/**
|
||||
* 第一次连接
|
||||
*/
|
||||
@Override
|
||||
public void getFirstConnect() {
|
||||
int first = (int) SPUtils.get(mContext, CommonConfig.JGY_FIRST_CONNECT, 0);
|
||||
Log.e(TAG, "getFirstConnect: " + "first_connect = " + first);
|
||||
mView.setFirstConnect(first == 0);
|
||||
if (first == 0) {
|
||||
Log.e(TAG, "setDisableSetting: ");
|
||||
//设置系统管控
|
||||
SysSettingUtils.setDisableSetting(mContext);
|
||||
JgyUtils.getInstance().writeAppPackageList();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过sn获取用户信息
|
||||
*/
|
||||
@Override
|
||||
public void getStudesInfo() {
|
||||
NetInterfaceManager.getInstance().getStudesInfo(false, getLifecycle(), new NetInterfaceManager.StudesInfoListener() {
|
||||
NetInterfaceManager.getInstance().getStudesInfo(getLifecycle(), new NetInterfaceManager.StudesInfoListener() {
|
||||
@Override
|
||||
public void setStudentsInfo(StudentsInfo studentsInfo) {
|
||||
mView.setStudesInfo();
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onComplete() {
|
||||
// mView.setStudesInfo();
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
public void sendNetwork(List<Long> time) {
|
||||
if (time == null || time.size() == 0) {
|
||||
Log.e(TAG, "sendNetwork: " + "time empty");
|
||||
return;
|
||||
}
|
||||
NetInterfaceManager.getInstance().GetNetworkConnectControl(time.toString())
|
||||
NetInterfaceManager.getInstance().getNetworkConnectControl(time.toString())
|
||||
.compose(RxLifecycle.bindUntilEvent(lifecycle, ActivityEvent.DESTROY))
|
||||
.subscribe(new Observer<BaseResponse>() {
|
||||
@Override
|
||||
@@ -211,239 +190,197 @@ public class MainSPresenter implements MainSContact.Presenter {
|
||||
@Override
|
||||
public void onComplete() {
|
||||
Log.e("sendNetwork", "onComplete: ");
|
||||
mView.sendNetworkFinish();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 3
|
||||
*/
|
||||
|
||||
@Override
|
||||
public void sendMacAddress() {
|
||||
NetInterfaceManager.getInstance().sendMACAddress(true, getLifecycle(), new NetInterfaceManager.onCompleteCallback() {
|
||||
NetInterfaceManager.getInstance().sendMACAddress(getLifecycle(), new NetInterfaceManager.onCompleteCallback() {
|
||||
@Override
|
||||
public void onComplete() {
|
||||
mView.sendMacFinish();
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateDeviceInfo() {
|
||||
if (JgyUtils.isOfficialVersion()) {
|
||||
mView.updateDeviceInfoFinish();
|
||||
}
|
||||
// if (!JgyUtils.getInstance().tagEmpty()) {
|
||||
NetInterfaceManager.getInstance().updateDeviceInfo(true, getLifecycle(), new NetInterfaceManager.onCompleteCallback() {
|
||||
@Override
|
||||
public void onComplete() {
|
||||
mView.updateDeviceInfoFinish();
|
||||
}
|
||||
});
|
||||
NetInterfaceManager.getInstance().updateDeviceInfo(getLifecycle(), new NetInterfaceManager.onCompleteCallback() {
|
||||
@Override
|
||||
public void onComplete() {
|
||||
|
||||
}
|
||||
});
|
||||
// }
|
||||
}
|
||||
|
||||
/**
|
||||
* 上传安装的应用列表
|
||||
*/
|
||||
@Override
|
||||
public void sendInstalled() {
|
||||
// if (!JgyUtils.getInstance().tagEmpty()) {
|
||||
NetInterfaceManager.getInstance().sendInstalledAppInfo(new NetInterfaceManager.onCompleteCallback() {
|
||||
@Override
|
||||
public void onComplete() {
|
||||
mView.sendInstalledFinish();
|
||||
}
|
||||
});
|
||||
NetInterfaceManager.getInstance().sendInstalledAppInfo(new NetInterfaceManager.onCompleteCallback() {
|
||||
@Override
|
||||
public void onComplete() {
|
||||
}
|
||||
});
|
||||
// }
|
||||
}
|
||||
|
||||
/**
|
||||
* 4
|
||||
*/
|
||||
|
||||
@Override
|
||||
public void checkAoleyunUpdate() {
|
||||
NetInterfaceManager.getInstance()
|
||||
.checkAoleyunUpdate(true, getLifecycle(), new NetInterfaceManager.onCompleteCallback() {
|
||||
.checkAoleyunUpdate(getLifecycle(), new NetInterfaceManager.onCompleteCallback() {
|
||||
@Override
|
||||
public void onComplete() {
|
||||
mView.checkAoleyunUpdateFinish();
|
||||
|
||||
}
|
||||
});
|
||||
// mView.checkAoleyunUpdateFinish();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void checkTestUpdate() {
|
||||
if (!JgyUtils.getInstance().tagEmpty()) {
|
||||
NetInterfaceManager.getInstance()
|
||||
.checkTestUpdate(true, getLifecycle(), new NetInterfaceManager.onCompleteCallback() {
|
||||
.checkTestUpdate(getLifecycle(), new NetInterfaceManager.onCompleteCallback() {
|
||||
@Override
|
||||
public void onComplete() {
|
||||
mView.checkTestUpdateFinish();
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 5
|
||||
*/
|
||||
@Override
|
||||
public void getDeveloper() {
|
||||
Log.e(TAG, "getDeveloper: ");
|
||||
NetInterfaceManager.getInstance()
|
||||
.getDeveloper(getLifecycle(), new NetInterfaceManager.onCompleteCallback() {
|
||||
@Override
|
||||
public void onComplete() {
|
||||
mView.getDeveloperFinish();
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
public void getRomApp() {
|
||||
String customVersion = Utils.getCustomVersion();
|
||||
Log.e(TAG, "getROMApp: " + customVersion);
|
||||
NetInterfaceManager.getInstance()
|
||||
.getCustomROMApp(true, getLifecycle(), new NetInterfaceManager.onCompleteCallback() {
|
||||
.getCustomRomApp(getLifecycle(), new NetInterfaceManager.onCompleteCallback() {
|
||||
@Override
|
||||
public void onComplete() {
|
||||
mView.getRomAppFinish();
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
public MutableLiveData<ScreenLockState> mScreenLockStateData = new MutableLiveData<>();
|
||||
|
||||
public void getScreenLockState() {
|
||||
NetInterfaceManager.getInstance().getScreenLockState(true, getLifecycle(), new NetInterfaceManager.ScreenLockStateListener() {
|
||||
NetInterfaceManager.getInstance().getScreenLockState(getLifecycle(), new NetInterfaceManager.ScreenLockStateListener() {
|
||||
@Override
|
||||
public void setScreenLockState(boolean locked, String tips) {
|
||||
mView.setScreenLockStateFinish(locked, tips);
|
||||
public void setScreenLockState(ScreenLockState screenLockState) {
|
||||
mScreenLockStateData.postValue(screenLockState);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
public void geteFence() {
|
||||
NetInterfaceManager.getInstance().geElectronicFence(getLifecycle(), new NetInterfaceManager.onCompleteCallback() {
|
||||
@Override
|
||||
public void onComplete() {
|
||||
mView.geteFenceFinish();
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
public void getSystemSettingBegin() {
|
||||
//重置设备
|
||||
JgyUtils.getInstance().resetDevice();
|
||||
Toaster.debugShow("开始获取管控");
|
||||
mView.setSystemSetting();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void getAppLimit() {
|
||||
NetInterfaceManager.getInstance()
|
||||
.getAppLimit(getLifecycle(), new NetInterfaceManager.onCompleteCallback() {
|
||||
@Override
|
||||
public void onComplete() {
|
||||
mView.getAppLimitFinish();
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
public void getForceDownload() {
|
||||
NetInterfaceManager.getInstance()
|
||||
.getForceDownload(getLifecycle(), new NetInterfaceManager.onCompleteCallback() {
|
||||
@Override
|
||||
public void onComplete() {
|
||||
mView.getForceDownloadFinish();
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
public void getDefaultDesktop() {
|
||||
Log.e(TAG, "getDefaultDesktop: ");
|
||||
if (JgyUtils.isOfficialVersion() || !JgyUtils.getInstance().getDeviceIsLocked()) {
|
||||
Log.e(TAG, "getDefaultDesktop: " + "Device unLocked");
|
||||
mView.getDefaultDesktopFinish();
|
||||
} else {
|
||||
int aihuaUnlock = Settings.System.getInt(mContext.getContentResolver(), CommonConfig.AIHUA_UNLOCK, 0);
|
||||
if (JgyUtils.getInstance().isAihuaFramework() && aihuaUnlock == 1) {
|
||||
Log.e(TAG, "getDefaultDesktop: " + "Device aihua");
|
||||
mView.getDefaultDesktopFinish();
|
||||
|
||||
} else {
|
||||
NetInterfaceManager.getInstance()
|
||||
.getDefaultDesktop( getLifecycle(), new NetInterfaceManager.onCompleteCallback() {
|
||||
.getDefaultDesktop(getLifecycle(), new NetInterfaceManager.onCompleteCallback() {
|
||||
@Override
|
||||
public void onComplete() {
|
||||
mView.getDefaultDesktopFinish();
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setLogoImg() {
|
||||
if (JgyUtils.isOfficialVersion()) {
|
||||
mView.setLogoImgFinish();
|
||||
} else {
|
||||
NetInterfaceManager.getInstance()
|
||||
.setLogoImg(true, getLifecycle(), new NetInterfaceManager.onCompleteCallback() {
|
||||
@Override
|
||||
public void onComplete() {
|
||||
mView.setLogoImgFinish();
|
||||
}
|
||||
});
|
||||
}
|
||||
NetInterfaceManager.getInstance()
|
||||
.setLogoImg(getLifecycle(), new NetInterfaceManager.onCompleteCallback() {
|
||||
@Override
|
||||
public void onComplete() {
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
public void getWallpaper() {
|
||||
NetInterfaceManager.getInstance().getWallpaper(getLifecycle(), new NetInterfaceManager.onCompleteCallback() {
|
||||
@Override
|
||||
public void onComplete() {
|
||||
mView.getWallpaperFinish();
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
public void getAllAppList() {
|
||||
NetInterfaceManager.getInstance()
|
||||
.getAllAppList(true, getLifecycle(), new NetInterfaceManager.onCompleteCallback() {
|
||||
.getAllAppList(getLifecycle(), new NetInterfaceManager.onCompleteCallback() {
|
||||
@Override
|
||||
public void onComplete() {
|
||||
mView.getAllAppListFinish();
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
public void getBrowserBookmarks() {
|
||||
NetInterfaceManager.getInstance()
|
||||
.getBookMarkBlackWhiteList(true, getLifecycle(), new NetInterfaceManager.onCompleteCallback() {
|
||||
.getBookMarkBlackWhiteList(getLifecycle(), new NetInterfaceManager.onCompleteCallback() {
|
||||
@Override
|
||||
public void onComplete() {
|
||||
mView.getBrowserBookmarksFinish();
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
public void getBrowserWhiteList() {
|
||||
new URLUtils(mContext).setBrowserBlackList();
|
||||
mView.setBrowserWhiteList();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void getDesktopIcon() {
|
||||
NetInterfaceManager.getInstance()
|
||||
.getDesktopIcon(getLifecycle(), new NetInterfaceManager.onCompleteCallback() {
|
||||
@@ -451,161 +388,145 @@ public class MainSPresenter implements MainSContact.Presenter {
|
||||
public void onComplete() {
|
||||
Log.e("getDesktopIcon", "onComplete: ");
|
||||
// JgyUtils.getInstance().hideSystemAPP();
|
||||
mView.getDesktopIconFinish();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
public void getAllInfoAndSetting() {
|
||||
NetInterfaceManager.getInstance().getAllInfoAndSetting(getLifecycle());
|
||||
}
|
||||
|
||||
public void getAppAutoStartUpdateAndNet() {
|
||||
NetInterfaceManager.getInstance()
|
||||
.getAppAutoStartUpdateAndNet( getLifecycle(), new NetInterfaceManager.onCompleteCallback() {
|
||||
.getAppAutoStartUpdateAndNet(getLifecycle(), new NetInterfaceManager.onCompleteCallback() {
|
||||
@Override
|
||||
public void onComplete() {
|
||||
mView.getAppAutoStartUpdateAndNetFinish();
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
public void getSnAppAttr() {
|
||||
NetInterfaceManager.getInstance().getSnAppAttr(new NetInterfaceManager.onCompleteCallback() {
|
||||
@Override
|
||||
public void onComplete() {
|
||||
mView.getSnAppAttrFinish();
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
public void getAppIdControl() {
|
||||
NetInterfaceManager.getInstance()
|
||||
.getAppIDControl(true, getLifecycle(), new NetInterfaceManager.onCompleteCallback() {
|
||||
.getAppIDControl(getLifecycle(), new NetInterfaceManager.onCompleteCallback() {
|
||||
@Override
|
||||
public void onComplete() {
|
||||
mView.getAppIdControlFinish();
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setAppinsideWeb() {
|
||||
Log.e(TAG, "setAppinsideWeb: ");
|
||||
NetInterfaceManager.getInstance().getAppinsideWeb(new NetInterfaceManager.GetAppinsideWebCallback() {
|
||||
@Override
|
||||
public void onComplete() {
|
||||
Log.e(TAG, "setAppinsideWeb: " + "onComplete");
|
||||
if (mView != null) {
|
||||
mView.setAppinsideWebFinish();
|
||||
}
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
public void getSystemSetting() {
|
||||
NetInterfaceManager.getInstance()
|
||||
.setSystemSetting(getLifecycle(), new NetInterfaceManager.onCompleteCallback() {
|
||||
@Override
|
||||
public void onComplete() {
|
||||
mView.getSystemSettingFinish();
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
public void getDefaultApp() {
|
||||
NetInterfaceManager.getInstance()
|
||||
.getDefaultApp(true, getLifecycle(), new NetInterfaceManager.onCompleteCallback() {
|
||||
.getDefaultApp(getLifecycle(), new NetInterfaceManager.onCompleteCallback() {
|
||||
@Override
|
||||
public void onComplete() {
|
||||
mView.setDefaultAppFinish();
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setTopApp() {
|
||||
if (JgyUtils.isOfficialVersion()) {
|
||||
mView.setTopAppFinish();
|
||||
return;
|
||||
}
|
||||
NetInterfaceManager.getInstance()
|
||||
.getTopApp(true, getLifecycle(), new NetInterfaceManager.onCompleteCallback() {
|
||||
.getTopApp(getLifecycle(), new NetInterfaceManager.onCompleteCallback() {
|
||||
@Override
|
||||
public void onComplete() {
|
||||
mView.setTopAppFinish();
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
public void getPoweroffTime() {
|
||||
NetInterfaceManager.getInstance()
|
||||
.getPoweroffTime(true, getLifecycle(), new NetInterfaceManager.onCompleteCallback() {
|
||||
.getPoweroffTime(getLifecycle(), new NetInterfaceManager.onCompleteCallback() {
|
||||
@Override
|
||||
public void onComplete() {
|
||||
mView.setPoweroffTime();
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
public void getSnTimeControl() {
|
||||
if (JgyUtils.isOfficialVersion()) {
|
||||
mView.getSnTimeControlFinish();
|
||||
} else {
|
||||
NetInterfaceManager.getInstance()
|
||||
.getSnTimeControl(getLifecycle(), new NetInterfaceManager.onCompleteCallback() {
|
||||
@Override
|
||||
public void onComplete() {
|
||||
mView.getSnTimeControlFinish();
|
||||
}
|
||||
});
|
||||
NetInterfaceManager.getInstance()
|
||||
.getTimeControl(getLifecycle(), new NetInterfaceManager.onCompleteCallback() {
|
||||
@Override
|
||||
public void onComplete() {
|
||||
mView.getSnTimeControlFinish();
|
||||
}
|
||||
});
|
||||
}
|
||||
NetInterfaceManager.getInstance()
|
||||
.getSnTimeControl(getLifecycle(), new NetInterfaceManager.onCompleteCallback() {
|
||||
@Override
|
||||
public void onComplete() {
|
||||
|
||||
}
|
||||
});
|
||||
NetInterfaceManager.getInstance()
|
||||
.getTimeControl(getLifecycle(), new NetInterfaceManager.onCompleteCallback() {
|
||||
@Override
|
||||
public void onComplete() {
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
public void getSnSetting() {
|
||||
NetInterfaceManager.getInstance().getSnSetting(getLifecycle(), new NetInterfaceManager.onCompleteCallback() {
|
||||
@Override
|
||||
public void onComplete() {
|
||||
mView.getSnSettingFinish();
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
public void getCloudLessonSettings() {
|
||||
NetInterfaceManager.getInstance().getCloudLessonSettings(lifecycle, new NetInterfaceManager.onCompleteCallback() {
|
||||
@Override
|
||||
public void onComplete() {
|
||||
if (mView != null) {
|
||||
mView.setCloudLessonSettings();
|
||||
}
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
public void getEbagCode() {
|
||||
NetInterfaceManager.getInstance()
|
||||
.getEBagCode(true, getLifecycle(), new NetInterfaceManager.onCompleteCallback() {
|
||||
.getEBagCode(getLifecycle(), new NetInterfaceManager.onCompleteCallback() {
|
||||
@Override
|
||||
public void onComplete() {
|
||||
mView.getEbagCodeFinish(Settings.Global.getInt(mContext.getContentResolver(), CommonConfig.UIUI_ACTIVATION_KEY, 0) == 1);
|
||||
if (Settings.Global.getInt(mContext.getContentResolver(), CommonConfig.UIUI_ACTIVATION_KEY, 0) == 1) {
|
||||
// getExclusiveAdminApp();
|
||||
Log.e(TAG, "getEBagCodeFinish: " + "已激活");
|
||||
} else {
|
||||
// getBlackList();
|
||||
Log.e(TAG, "getEBagCodeFinish: " + "未激活");
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
public void getExclusiveAdminApp() {
|
||||
NetInterfaceManager.getInstance().getExclusiveAdminAppObservable()
|
||||
.subscribeOn(Schedulers.io())
|
||||
@@ -635,38 +556,34 @@ public class MainSPresenter implements MainSContact.Presenter {
|
||||
@Override
|
||||
public void onComplete() {
|
||||
Log.e("getExclusiveAdminApp", "onComplete: ");
|
||||
mView.getExclusiveAdminAppFinish();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
public void getBlackList() {
|
||||
NetInterfaceManager.getInstance().getBlackList(getLifecycle(), new NetInterfaceManager.onCompleteCallback() {
|
||||
@Override
|
||||
public void onComplete() {
|
||||
mView.getBlackListFinish();
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
public void getWhiteList() {
|
||||
NetInterfaceManager.getInstance().getWhiteList(getLifecycle(), new NetInterfaceManager.onCompleteCallback() {
|
||||
@Override
|
||||
public void onComplete() {
|
||||
mView.getWhiteListFinish();
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
public void getWiFiPasswd() {
|
||||
NetInterfaceManager.getInstance()
|
||||
.getWiFiPasswd(true, getLifecycle(), new NetInterfaceManager.onCompleteCallback() {
|
||||
.getWiFiPasswd(getLifecycle(), new NetInterfaceManager.onCompleteCallback() {
|
||||
@Override
|
||||
public void onComplete() {
|
||||
mView.setWiFiPasswd();
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
@@ -536,7 +536,7 @@ public class ApkUtils {
|
||||
this.add("com.aoleyun.browser");
|
||||
this.add("com.android.music");
|
||||
this.add("com.android.fmradio");
|
||||
this.add("com.android.gallery3d");
|
||||
// this.add("com.android.gallery3d");
|
||||
this.add("com.android.calendar");
|
||||
this.add("com.android.calculator2");
|
||||
this.add("com.android.deskclock");
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
package com.aoleyun.sn.utils;
|
||||
|
||||
import static android.app.ActivityManager.RECENT_IGNORE_UNAVAILABLE;
|
||||
|
||||
import android.annotation.SuppressLint;
|
||||
import android.app.ActivityManager;
|
||||
import android.app.ActivityManagerNative;
|
||||
@@ -52,7 +54,6 @@ import com.aoleyun.sn.bean.Appground;
|
||||
import com.aoleyun.sn.bean.BaseResponse;
|
||||
import com.aoleyun.sn.bean.ForceDownloadData;
|
||||
import com.aoleyun.sn.bean.LessonJson;
|
||||
import com.aoleyun.sn.bean.NetAndLaunchBean;
|
||||
import com.aoleyun.sn.bean.NetAndLaunchData;
|
||||
import com.aoleyun.sn.bean.TTAppground;
|
||||
import com.aoleyun.sn.bean.TimeControlApp;
|
||||
@@ -64,7 +65,6 @@ import com.aoleyun.sn.disklrucache.CacheHelper;
|
||||
import com.aoleyun.sn.gson.GsonUtils;
|
||||
import com.aoleyun.sn.manager.AllwinnerCubeMdmManager;
|
||||
import com.aoleyun.sn.network.NetInterfaceManager;
|
||||
import com.aoleyun.sn.network.UrlAddress;
|
||||
import com.aoleyun.sn.receiver.BootReceiver;
|
||||
import com.aoleyun.sn.service.GuardService;
|
||||
import com.aoleyun.sn.service.StepService;
|
||||
@@ -126,8 +126,6 @@ import io.reactivex.rxjava3.core.ObservableOnSubscribe;
|
||||
import io.reactivex.rxjava3.core.Observer;
|
||||
import io.reactivex.rxjava3.disposables.Disposable;
|
||||
|
||||
import static android.app.ActivityManager.RECENT_IGNORE_UNAVAILABLE;
|
||||
|
||||
|
||||
public class JgyUtils {
|
||||
private static final String TAG = "JgyUtils";
|
||||
@@ -434,35 +432,7 @@ public class JgyUtils {
|
||||
|
||||
public String getAppPlatform() {
|
||||
String platform = BuildConfig.platform;
|
||||
if (MTKTag.equalsIgnoreCase(platform)) {
|
||||
return MTKTag;
|
||||
} else if (ZhanruiTag.equalsIgnoreCase(platform)) {
|
||||
return ZhanruiTag;
|
||||
}
|
||||
// else if (CubeTag.equalsIgnoreCase(platform)) {
|
||||
// return CubeTag;
|
||||
// }
|
||||
else if (MTK11Tag.equalsIgnoreCase(platform)) {
|
||||
return MTK11Tag;
|
||||
} else if (TeclastP20sTag.equalsIgnoreCase(platform)) {
|
||||
return TeclastP20sTag;
|
||||
} else if (AH6016Tag.equalsIgnoreCase(platform)) {
|
||||
return AH6016Tag;
|
||||
} else if (ZR6016Tag.equalsIgnoreCase(platform)) {
|
||||
return ZR6016Tag;
|
||||
} else if (HRAD13Tag.equalsIgnoreCase(platform)) {
|
||||
return HRAD13Tag;
|
||||
} else if (G10PTag.equalsIgnoreCase(platform)) {
|
||||
return G10PTag;
|
||||
} else if (C2Tag.equalsIgnoreCase(platform)) {
|
||||
return C2Tag;
|
||||
} else if (YXPD1TAG.equalsIgnoreCase(platform)) {
|
||||
return YXPD1TAG;
|
||||
} else if (G11TAG.equalsIgnoreCase(platform)) {
|
||||
return G11TAG;
|
||||
} else {
|
||||
return Other;
|
||||
}
|
||||
return platform;
|
||||
}
|
||||
|
||||
public static boolean isOfficialVersion() {
|
||||
@@ -609,62 +579,50 @@ public class JgyUtils {
|
||||
/**
|
||||
* 应用自启升级和网络权限管理
|
||||
*
|
||||
* @param netAndLaunchBean
|
||||
* @param dataList
|
||||
*/
|
||||
public void setNetAndlaunch(NetAndLaunchBean netAndLaunchBean, List<AppListInfo> appListInfos) {
|
||||
Log.e(TAG, "setNetAndlaunch: " + "应用联网管控: " + netAndLaunchBean.getData().toString());
|
||||
Log.e(TAG, "setNetAndlaunch: ");
|
||||
HashSet<String> autoLaunchApp = new HashSet<>();//开机自启app
|
||||
HashSet<String> allowNetApp = new HashSet<>();//允许联网
|
||||
HashSet<String> disallowNetApp = new HashSet<>();//禁止联网
|
||||
HashSet<String> allowUpgrade = new HashSet<>();//允许升级
|
||||
HashSet<String> disallowUpgrade = new HashSet<>();//禁止升级
|
||||
HashSet<String> allowSlide = new HashSet<>();//允许滑动
|
||||
HashSet<String> disallowSlide = new HashSet<>();//禁止滑动
|
||||
public void setNetAndlaunch(List<NetAndLaunchData> dataList, List<AppListInfo> appListInfos) {
|
||||
Log.e(TAG, "setNetAndlaunch: " + "应用联网管控: " + dataList.toString());
|
||||
|
||||
List<NetAndLaunchData> data = netAndLaunchBean.getData();
|
||||
for (NetAndLaunchData netAndLaunchData : data) {
|
||||
String app_package = netAndLaunchData.getApp_package();
|
||||
int is_auto = netAndLaunchData.getIs_auto();
|
||||
int is_network = netAndLaunchData.getIs_network();
|
||||
int is_upgrade = netAndLaunchData.getIs_upgrade();
|
||||
int is_slide = netAndLaunchData.getIs_slide();
|
||||
if (is_auto == 1) {
|
||||
autoLaunchApp.add(app_package);
|
||||
}
|
||||
if (is_network == 1) {
|
||||
allowNetApp.add(app_package);
|
||||
} else {
|
||||
disallowNetApp.add(app_package);
|
||||
}
|
||||
if (is_upgrade == 1) {
|
||||
allowUpgrade.add(app_package);
|
||||
} else {
|
||||
disallowUpgrade.add(app_package);
|
||||
}
|
||||
if (is_slide == 1) {
|
||||
allowSlide.add(app_package);
|
||||
} else {
|
||||
disallowSlide.add(app_package);
|
||||
}
|
||||
}
|
||||
//开机自启app
|
||||
HashSet<String> autoLaunchApp = dataList.stream().filter(netAndLaunchData -> netAndLaunchData.getIs_auto() == 1).map(NetAndLaunchData::getApp_package).collect(Collectors.toCollection(HashSet::new));
|
||||
//允许联网
|
||||
HashSet<String> allowNetApp = dataList.stream().filter(netAndLaunchData -> netAndLaunchData.getIs_network() == 1).map(NetAndLaunchData::getApp_package).collect(Collectors.toCollection(HashSet::new));
|
||||
//禁止联网
|
||||
HashSet<String> disallowNetApp = dataList.stream().filter(netAndLaunchData -> netAndLaunchData.getIs_network() == 0).map(NetAndLaunchData::getApp_package).collect(Collectors.toCollection(HashSet::new));
|
||||
//允许升级
|
||||
HashSet<String> allowUpgrade = dataList.stream().filter(netAndLaunchData -> netAndLaunchData.getIs_upgrade() == 1).map(NetAndLaunchData::getApp_package).collect(Collectors.toCollection(HashSet::new));
|
||||
//禁止升级
|
||||
HashSet<String> disallowUpgrade = dataList.stream().filter(netAndLaunchData -> netAndLaunchData.getIs_upgrade() == 0).map(NetAndLaunchData::getApp_package).collect(Collectors.toCollection(HashSet::new));
|
||||
//允许滑动
|
||||
HashSet<String> allowSlide = dataList.stream().filter(netAndLaunchData -> netAndLaunchData.getIs_slide() == 1).map(NetAndLaunchData::getApp_package).collect(Collectors.toCollection(HashSet::new));
|
||||
//禁止滑动
|
||||
HashSet<String> disallowSlide = dataList.stream().filter(netAndLaunchData -> netAndLaunchData.getIs_slide() == 0).map(NetAndLaunchData::getApp_package).collect(Collectors.toCollection(HashSet::new));
|
||||
//禁止通知栏显示通知
|
||||
List<String> disallowNotification = dataList.stream().filter(netAndLaunchData -> netAndLaunchData.getIs_notification() == 1).map(NetAndLaunchData::getApp_package).collect(Collectors.toList());
|
||||
//默认给所有权限
|
||||
HashSet<String> allowPermissions = dataList.stream().filter(netAndLaunchData -> netAndLaunchData.getIs_dynamic_perm() == 1).map(NetAndLaunchData::getApp_package).collect(Collectors.toCollection(HashSet::new));
|
||||
//允许应用安装其他应用
|
||||
HashSet<String> allowInstallApp = dataList.stream().filter(netAndLaunchData -> netAndLaunchData.getAllow_install_app() == 1).map(NetAndLaunchData::getApp_package).collect(Collectors.toCollection(HashSet::new));
|
||||
|
||||
if (disallowSlide.size() != 0) {
|
||||
String slide_not = String.join(",", disallowSlide);
|
||||
boolean writeSucceed = Settings.System.putString(crv, CommonConfig.AOLE_ACTION_DISABLE_SLIDE, slide_not);
|
||||
Log.e("fht", "aole_disable_slide=" + writeSucceed + ":" + slide_not);
|
||||
Log.e("setNetAndlaunch", "aole_disable_slide=" + writeSucceed + ":" + slide_not);
|
||||
} else {
|
||||
String slide_ok = String.join(",", allowSlide);
|
||||
boolean writeSucceed = Settings.System.putString(crv, CommonConfig.AOLE_ACTION_DISABLE_SLIDE, "Invalid");
|
||||
Log.e("fht", "aole_disable_slide ok=" + writeSucceed + ":" + slide_ok);
|
||||
Log.e("setNetAndlaunch", "aole_disable_slide ok=" + writeSucceed + ":" + slide_ok);
|
||||
}
|
||||
|
||||
String[] upgrade_ok = new String[allowUpgrade.size()];
|
||||
allowUpgrade.toArray(upgrade_ok);
|
||||
checkPackageAndVersion(disallowUpgrade, appListInfos);
|
||||
|
||||
String[] upgrade_not = new String[disallowUpgrade.size()];
|
||||
disallowUpgrade.toArray(upgrade_not);
|
||||
Utils.writeDisableUpdateList(mContext, upgrade_not, upgrade_ok);
|
||||
|
||||
String aole_app_power_on = String.join(",", autoLaunchApp);
|
||||
Log.e(TAG, "setNetAndlaunch: aole_app_power_on: " + aole_app_power_on);
|
||||
if (TextUtils.isEmpty(aole_app_power_on)) {
|
||||
@@ -681,6 +639,94 @@ public class JgyUtils {
|
||||
// Log.e(TAG, "setNetAndlaunch: 测试写入: " + w);
|
||||
// }
|
||||
setAppNetwork(disallowNetApp, allowNetApp);
|
||||
setAppSourceInstallWhiteList(allowInstallApp);
|
||||
}
|
||||
|
||||
public void setNetAndlaunch(List<NetAndLaunchData> dataList) {
|
||||
Log.e(TAG, "setNetAndlaunch: " + "应用联网管控: " + dataList.toString());
|
||||
//开机自启app
|
||||
HashSet<String> autoLaunchApp = dataList.stream().filter(netAndLaunchData -> netAndLaunchData.getIs_auto() == 1).map(NetAndLaunchData::getApp_package).collect(Collectors.toCollection(HashSet::new));
|
||||
//允许联网
|
||||
HashSet<String> allowNetApp = dataList.stream().filter(netAndLaunchData -> netAndLaunchData.getIs_network() == 1).map(NetAndLaunchData::getApp_package).collect(Collectors.toCollection(HashSet::new));
|
||||
//禁止联网
|
||||
HashSet<String> disallowNetApp = dataList.stream().filter(netAndLaunchData -> netAndLaunchData.getIs_network() == 0).map(NetAndLaunchData::getApp_package).collect(Collectors.toCollection(HashSet::new));
|
||||
//允许升级
|
||||
HashSet<String> allowUpgrade = dataList.stream().filter(netAndLaunchData -> netAndLaunchData.getIs_upgrade() == 1).map(NetAndLaunchData::getApp_package).collect(Collectors.toCollection(HashSet::new));
|
||||
//禁止升级
|
||||
HashSet<String> disallowUpgrade = dataList.stream().filter(netAndLaunchData -> netAndLaunchData.getIs_upgrade() == 0).map(NetAndLaunchData::getApp_package).collect(Collectors.toCollection(HashSet::new));
|
||||
//允许滑动
|
||||
HashSet<String> allowSlide = dataList.stream().filter(netAndLaunchData -> netAndLaunchData.getIs_slide() == 1).map(NetAndLaunchData::getApp_package).collect(Collectors.toCollection(HashSet::new));
|
||||
//禁止滑动
|
||||
HashSet<String> disallowSlide = dataList.stream().filter(netAndLaunchData -> netAndLaunchData.getIs_slide() == 0).map(NetAndLaunchData::getApp_package).collect(Collectors.toCollection(HashSet::new));
|
||||
//禁止通知栏显示通知
|
||||
HashSet<String> disallowNotification = dataList.stream().filter(netAndLaunchData -> netAndLaunchData.getIs_notification() == 1).map(NetAndLaunchData::getApp_package).collect(Collectors.toCollection(HashSet::new));
|
||||
//默认给所有权限
|
||||
HashSet<String> allowPermissions = dataList.stream().filter(netAndLaunchData -> netAndLaunchData.getIs_dynamic_perm() == 1).map(NetAndLaunchData::getApp_package).collect(Collectors.toCollection(HashSet::new));
|
||||
//允许应用安装其他应用
|
||||
HashSet<String> allowInstallApp = dataList.stream().filter(netAndLaunchData -> netAndLaunchData.getAllow_install_app() == 1).map(NetAndLaunchData::getApp_package).collect(Collectors.toCollection(HashSet::new));
|
||||
|
||||
if (disallowSlide.size() != 0) {
|
||||
String slide_not = String.join(",", disallowSlide);
|
||||
boolean writeSucceed = Settings.System.putString(crv, CommonConfig.AOLE_ACTION_DISABLE_SLIDE, slide_not);
|
||||
Log.e("setNetAndlaunch", "aole_disable_slide=" + writeSucceed + ":" + slide_not);
|
||||
} else {
|
||||
String slide_ok = String.join(",", allowSlide);
|
||||
boolean writeSucceed = Settings.System.putString(crv, CommonConfig.AOLE_ACTION_DISABLE_SLIDE, "Invalid");
|
||||
Log.e("setNetAndlaunch", "aole_disable_slide ok=" + writeSucceed + ":" + slide_ok);
|
||||
}
|
||||
|
||||
String[] upgrade_ok = new String[allowUpgrade.size()];
|
||||
allowUpgrade.toArray(upgrade_ok);
|
||||
String[] upgrade_not = new String[disallowUpgrade.size()];
|
||||
disallowUpgrade.toArray(upgrade_not);
|
||||
Utils.writeDisableUpdateList(mContext, upgrade_not, upgrade_ok);
|
||||
|
||||
Utils.writeDisableUpdateList(mContext, upgrade_not, upgrade_ok);
|
||||
String aole_app_power_on = String.join(",", autoLaunchApp);
|
||||
Log.e(TAG, "setNetAndlaunch: aole_app_power_on: " + aole_app_power_on);
|
||||
if (TextUtils.isEmpty(aole_app_power_on)) {
|
||||
//当 qch_app_power_on 的值为空时,会造成系统所有应用断网
|
||||
Settings.System.putString(crv, CommonConfig.AOLE_ACTION_APP_POWER_ON, "Invalid");
|
||||
Log.e(TAG, "setNetAndlaunch: aole_app_power_on: " + "Invalid");
|
||||
} else {
|
||||
Settings.System.putString(crv, CommonConfig.AOLE_ACTION_APP_POWER_ON, aole_app_power_on);
|
||||
Log.e(TAG, "setNetAndlaunch: aole_app_power_on: " + aole_app_power_on);
|
||||
}
|
||||
// if (BuildConfig.DEBUG) {
|
||||
// TODO: 2021/7/2 测试写入为空是否断网
|
||||
// boolean w = Settings.System.putString(crv, "aole_app_power_on", "");
|
||||
// Log.e(TAG, "setNetAndlaunch: 测试写入: " + w);
|
||||
// }
|
||||
setAppNetwork(disallowNetApp, allowNetApp);
|
||||
setDisallowNotificationPackage(mContext, disallowNotification);
|
||||
mMMKV.encode("aole_app_privilege", allowPermissions);
|
||||
setAllowPermissionsPackage();
|
||||
|
||||
setAppSourceInstallWhiteList(allowInstallApp);
|
||||
}
|
||||
|
||||
public static final List<String> DEFAULT_APP_SOURCE_WHITE_LIST = new ArrayList<String>() {{
|
||||
this.add("com.aoleyun.sn");
|
||||
this.add("com.aoleyun.appstore");
|
||||
this.add("com.aoleyun.browser");
|
||||
this.add("com.aoleyun.info");
|
||||
this.add("com.aoleyun.os");
|
||||
this.add("com.aoleyun.audos");
|
||||
|
||||
this.add("com.books.wisdom");
|
||||
this.add("com.japanese_books.wisdom");
|
||||
}};
|
||||
|
||||
public void setAppSourceInstallWhiteList(HashSet<String> allowInstallApp) {
|
||||
if (allowInstallApp == null || allowInstallApp.isEmpty()) {
|
||||
Log.e(TAG, "setAppSourceInstallWhiteList: allowInstallApp size = 0");
|
||||
Settings.System.putString(crv, CommonConfig.SEEWO_APP_SOURCE_INSTALL_WHITELIST, String.join(",", DEFAULT_APP_SOURCE_WHITE_LIST));
|
||||
} else {
|
||||
allowInstallApp.addAll(DEFAULT_APP_SOURCE_WHITE_LIST);
|
||||
List<String> allowList = new ArrayList<>(allowInstallApp);
|
||||
Settings.System.putString(crv, CommonConfig.SEEWO_APP_SOURCE_INSTALL_WHITELIST, String.join(",", allowList));
|
||||
}
|
||||
Log.e(TAG, "setAppSourceInstallWhiteList: getString = " + Settings.System.getString(crv, CommonConfig.SEEWO_APP_SOURCE_INSTALL_WHITELIST));
|
||||
}
|
||||
|
||||
public void onBootOpenApp() {
|
||||
@@ -744,93 +790,6 @@ public class JgyUtils {
|
||||
}
|
||||
}
|
||||
|
||||
public void setNetAndlaunch(NetAndLaunchBean netAndLaunchBean) {
|
||||
Log.e(TAG, "setNetAndlaunch: " + "应用联网管控: " + netAndLaunchBean.getData().toString());
|
||||
Log.e(TAG, "setNetAndlaunch: ");
|
||||
HashSet<String> autoLaunchApp = new HashSet<>();//开机自启app
|
||||
HashSet<String> allowNetApp = new HashSet<>();//允许联网
|
||||
HashSet<String> disallowNetApp = new HashSet<>();//禁止联网
|
||||
HashSet<String> allowUpgrade = new HashSet<>();//允许升级
|
||||
HashSet<String> disallowUpgrade = new HashSet<>();//禁止升级
|
||||
HashSet<String> allowSlide = new HashSet<>();//允许滑动
|
||||
HashSet<String> disallowSlide = new HashSet<>();//禁止滑动
|
||||
HashSet<String> disallowNotification = new HashSet<>();//禁止通知栏显示通知
|
||||
HashSet<String> allowPermissions = new HashSet<>();//默认给所有权限
|
||||
|
||||
|
||||
List<NetAndLaunchData> data = netAndLaunchBean.getData();
|
||||
for (NetAndLaunchData netAndLaunchData : data) {
|
||||
String app_package = netAndLaunchData.getApp_package();
|
||||
int is_auto = netAndLaunchData.getIs_auto();
|
||||
int is_network = netAndLaunchData.getIs_network();
|
||||
int is_upgrade = netAndLaunchData.getIs_upgrade();
|
||||
int is_slide = netAndLaunchData.getIs_slide();
|
||||
int is_notification = netAndLaunchData.getIs_notification();
|
||||
int is_dynamic_perm = netAndLaunchData.getIs_dynamic_perm();
|
||||
|
||||
if (is_auto == 1) {
|
||||
autoLaunchApp.add(app_package);
|
||||
}
|
||||
if (is_network == 1) {
|
||||
allowNetApp.add(app_package);
|
||||
} else {
|
||||
disallowNetApp.add(app_package);
|
||||
}
|
||||
if (is_upgrade == 1) {
|
||||
allowUpgrade.add(app_package);
|
||||
} else {
|
||||
disallowUpgrade.add(app_package);
|
||||
}
|
||||
if (is_slide == 1) {
|
||||
allowSlide.add(app_package);
|
||||
} else {
|
||||
disallowSlide.add(app_package);
|
||||
}
|
||||
|
||||
if (is_notification == 0) {
|
||||
disallowNotification.add(app_package);
|
||||
}
|
||||
if (is_dynamic_perm == 1) {
|
||||
allowPermissions.add(app_package);
|
||||
}
|
||||
}
|
||||
|
||||
if (disallowSlide.size() != 0) {
|
||||
String slide_not = String.join(",", disallowSlide);
|
||||
boolean writeSucceed = Settings.System.putString(crv, CommonConfig.AOLE_ACTION_DISABLE_SLIDE, slide_not);
|
||||
Log.e("fht", "aole_disable_slide=" + writeSucceed + ":" + slide_not);
|
||||
} else {
|
||||
String slide_ok = String.join(",", allowSlide);
|
||||
boolean writeSucceed = Settings.System.putString(crv, CommonConfig.AOLE_ACTION_DISABLE_SLIDE, "Invalid");
|
||||
Log.e("fht", "aole_disable_slide ok=" + writeSucceed + ":" + slide_ok);
|
||||
}
|
||||
|
||||
String[] upgrade_ok = new String[allowUpgrade.size()];
|
||||
allowUpgrade.toArray(upgrade_ok);
|
||||
String[] upgrade_not = new String[disallowUpgrade.size()];
|
||||
disallowUpgrade.toArray(upgrade_not);
|
||||
Utils.writeDisableUpdateList(mContext, upgrade_not, upgrade_ok);
|
||||
String aole_app_power_on = String.join(",", autoLaunchApp);
|
||||
Log.e(TAG, "setNetAndlaunch: aole_app_power_on: " + aole_app_power_on);
|
||||
if (TextUtils.isEmpty(aole_app_power_on)) {
|
||||
//当 qch_app_power_on 的值为空时,会造成系统所有应用断网
|
||||
Settings.System.putString(crv, CommonConfig.AOLE_ACTION_APP_POWER_ON, "Invalid");
|
||||
Log.e(TAG, "setNetAndlaunch: aole_app_power_on: " + "Invalid");
|
||||
} else {
|
||||
Settings.System.putString(crv, CommonConfig.AOLE_ACTION_APP_POWER_ON, aole_app_power_on);
|
||||
Log.e(TAG, "setNetAndlaunch: aole_app_power_on: " + aole_app_power_on);
|
||||
}
|
||||
// if (BuildConfig.DEBUG) {
|
||||
// TODO: 2021/7/2 测试写入为空是否断网
|
||||
// boolean w = Settings.System.putString(crv, "aole_app_power_on", "");
|
||||
// Log.e(TAG, "setNetAndlaunch: 测试写入: " + w);
|
||||
// }
|
||||
setAppNetwork(disallowNetApp, allowNetApp);
|
||||
setDisallowNotificationPackage(mContext, disallowNotification);
|
||||
mMMKV.encode("aole_app_privilege", allowPermissions);
|
||||
setAllowPermissionsPackage();
|
||||
}
|
||||
|
||||
private void setDisallowNotificationPackage(Context context, HashSet<String> pkgSet) {
|
||||
Log.e(TAG, "setDisallowNotificationPackage: " + pkgSet);
|
||||
if (pkgSet.size() == 0) {
|
||||
@@ -890,8 +849,8 @@ public class JgyUtils {
|
||||
Log.e(TAG, "setAppNetwork: " + "设置应用联网管控 blackList =" + blackList);
|
||||
Log.e(TAG, "setAppNetwork: " + "设置应用联网管控 whiteList =" + whiteList);
|
||||
|
||||
if ("Ebox201W".equals(Build.MODEL) || "Ebox201".equals(Build.MODEL)) {
|
||||
|
||||
if ("Ebox201W".equals(Build.MODEL) || "Ebox201".equals(Build.MODEL) || "G128A".equals(Build.MODEL)) {
|
||||
Log.e(TAG, "setAppNetwork: Ebox201 skip delete");
|
||||
} else {
|
||||
try {
|
||||
Settings.System.putString(crv, CommonConfig.AOLE_ACTION_NETWORK_ALLOW, null);
|
||||
@@ -932,7 +891,8 @@ public class JgyUtils {
|
||||
pkgs.addAll(DEFAULT_ALLOW_NETWORK_APP_SET);
|
||||
List<String> filterList = pkgs.stream().filter(s -> ApkUtils.isAvailable(mContext, s)).collect(Collectors.toList());
|
||||
Log.e(TAG, "setAppNetwork: filterList = " + filterList);
|
||||
if ("Ebox201W".equals(Build.MODEL) || "Ebox201".equals(Build.MODEL)) {
|
||||
|
||||
if ("Ebox201W".equals(Build.MODEL) || "Ebox201".equals(Build.MODEL) || "G128A".equals(Build.MODEL)) {
|
||||
if (filterList.size() == 0) {
|
||||
Settings.System.putString(crv, CommonConfig.AOLE_ACTION_NETWORK_ALLOW, null);
|
||||
} else {
|
||||
@@ -951,11 +911,11 @@ public class JgyUtils {
|
||||
*/
|
||||
public void updateNetworkWhiteList() {
|
||||
Log.e(TAG, "updateNetworkWhiteList: ");
|
||||
if ("Ebox201W".equals(Build.MODEL) || "Ebox201".equals(Build.MODEL)) {
|
||||
if ("Ebox201W".equals(Build.MODEL) || "Ebox201".equals(Build.MODEL) || "G128A".equals(Build.MODEL)) {
|
||||
|
||||
} else {
|
||||
Settings.System.putString(crv, CommonConfig.AOLE_ACTION_NETWORK_ALLOW, null);
|
||||
try {
|
||||
Settings.System.putString(crv, CommonConfig.AOLE_ACTION_NETWORK_ALLOW, null);
|
||||
CmdUtil.Result result = CmdUtil.execute(" settings delete system aole_network_allow");
|
||||
Log.e(TAG, "updateNetworkWhiteList: " + result);
|
||||
} catch (Exception e) {
|
||||
@@ -963,11 +923,11 @@ public class JgyUtils {
|
||||
}
|
||||
}
|
||||
|
||||
if ("Ebox201W".equals(Build.MODEL) || "Ebox201".equals(Build.MODEL)) {
|
||||
if ("Ebox201W".equals(Build.MODEL) || "Ebox201".equals(Build.MODEL) || "G128A".equals(Build.MODEL)) {
|
||||
|
||||
} else {
|
||||
Settings.System.putString(mContext.getContentResolver(), CommonConfig.AOLE_APP_WEB_BLACK_LIST, null);
|
||||
try {
|
||||
Settings.System.putString(mContext.getContentResolver(), CommonConfig.AOLE_APP_WEB_BLACK_LIST, null);
|
||||
CmdUtil.Result result = CmdUtil.execute(" settings delete system app_web_black_list");
|
||||
Log.e(TAG, "updateNetworkWhiteList: " + result);
|
||||
} catch (Exception e) {
|
||||
@@ -975,13 +935,13 @@ public class JgyUtils {
|
||||
}
|
||||
}
|
||||
|
||||
if ("Ebox201W".equals(Build.MODEL) || "Ebox201".equals(Build.MODEL)) {
|
||||
if ("Ebox201W".equals(Build.MODEL) || "Ebox201".equals(Build.MODEL) || "G128A".equals(Build.MODEL)) {
|
||||
|
||||
} else {
|
||||
Settings.System.putString(mContext.getContentResolver(), CommonConfig.AOLE_APP_WEB_WHITE_LIST, null);
|
||||
try {
|
||||
Settings.System.putString(mContext.getContentResolver(), CommonConfig.AOLE_APP_WEB_WHITE_LIST, null);
|
||||
CmdUtil.Result result = CmdUtil.execute(" settings delete system app_web_white_list");
|
||||
Log.e(TAG, "getWhiteList: " + result);
|
||||
Log.e(TAG, "updateNetworkWhiteList: " + result);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
@@ -1001,7 +961,7 @@ public class JgyUtils {
|
||||
List<String> filterList = whiteList.stream().filter(s -> ApkUtils.isAvailable(mContext, s)).collect(Collectors.toList());
|
||||
Log.e(TAG, "updateNetworkWhiteList: filterList = " + filterList);
|
||||
|
||||
if ("Ebox201W".equals(Build.MODEL) || "Ebox201".equals(Build.MODEL)) {
|
||||
if ("Ebox201W".equals(Build.MODEL) || "Ebox201".equals(Build.MODEL) || "G128A".equals(Build.MODEL)) {
|
||||
if (filterList.size() == 0) {
|
||||
Settings.System.putString(crv, CommonConfig.AOLE_ACTION_NETWORK_ALLOW, null);
|
||||
} else {
|
||||
@@ -1042,7 +1002,7 @@ public class JgyUtils {
|
||||
}
|
||||
|
||||
public void writeDeselectIDtoSystem(List<AppID> appIDList) {
|
||||
if (!"Ebox201".equals(Build.MODEL) && !"Ebox201W".equals(Build.MODEL)) {
|
||||
if (!"Ebox201".equals(Build.MODEL) && !"Ebox201W".equals(Build.MODEL) && !"G128A".equals(Build.MODEL)) {
|
||||
Log.e(TAG, "writeDeselectIDtoSystem: not match Ebox201 or Ebox201W");
|
||||
return;
|
||||
}
|
||||
@@ -1575,6 +1535,7 @@ public class JgyUtils {
|
||||
Settings.System.putString(crv, CommonConfig.AOLE_ACTION_APP_FORBID, aole_app_forbid);
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
public void checkForceDownload() {
|
||||
// String jsonString = cacheHelper.getAsString(UrlAddress.GET_FORCE_INSTALL_LIST);
|
||||
// //为 "" 是已经请求成功的
|
||||
@@ -1808,6 +1769,8 @@ public class JgyUtils {
|
||||
Log.e(TAG, "deleteOtherApp: " + "start");
|
||||
Set<String> allAppWhiteSet = mMMKV.decodeStringSet(CommonConfig.AOLE_ALL_APP_WHITE_LIST_KEY, new HashSet<>());
|
||||
Log.e("deleteOtherApp", "allAppWhiteSet:" + allAppWhiteSet);
|
||||
Set<String> pubAppSet = mMMKV.decodeStringSet(CommonConfig.AOLE_PUBLIC_APP_INSTALL_WHITELIST, new HashSet<>());
|
||||
Log.e(TAG, "deleteOtherApp: pubAppSet = " + pubAppSet);
|
||||
|
||||
List<String> resulWhitetList = new ArrayList<>(defaultPackages);
|
||||
resulWhitetList.addAll(allAppWhiteSet);
|
||||
@@ -2943,8 +2906,8 @@ public class JgyUtils {
|
||||
jsonObject.addProperty("jpush_id", PushServiceFactory.getCloudPushService().getDeviceId());
|
||||
jsonObject.addProperty("devices_version", Utils.getCustomVersion());
|
||||
jsonObject.addProperty("appstore_version", BuildConfig.VERSION_NAME);
|
||||
jsonObject.addProperty("store_version", Utils.getAPPVersionName(PackageNames.APPSTORE, mContext));
|
||||
jsonObject.addProperty("desktop_version", Utils.getAPPVersionName("com.aoleyun.os", mContext));
|
||||
jsonObject.addProperty("store_version", Utils.getAppVersionName(PackageNames.APPSTORE, mContext));
|
||||
jsonObject.addProperty("desktop_version", Utils.getAppVersionName("com.aoleyun.os", mContext));
|
||||
jsonObject.addProperty("local_mac", Utils.getAndroid7MAC());
|
||||
// jsonObject.addProperty("wifi_status", Utils.obtainWifiInfo(mContext));
|
||||
jsonObject.addProperty("PN_ip", mMMKV.decodeString(NetInterfaceManager.PublicIP, ""));
|
||||
@@ -3012,25 +2975,6 @@ public class JgyUtils {
|
||||
}
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
public List<String> getHidePackage() {
|
||||
String jsonString = cacheHelper.getAsString(UrlAddress.GET_HIDE_DESKTOPICON);
|
||||
//为 "" 是已经请求成功的
|
||||
if (jsonString == null) {
|
||||
return new ArrayList<>();
|
||||
} else {
|
||||
Gson gson = new Gson();
|
||||
Type type = new TypeToken<List<String>>() {
|
||||
}.getType();
|
||||
List<String> list = gson.fromJson(jsonString, type);
|
||||
if (list == null) {
|
||||
return new ArrayList<>();
|
||||
} else {
|
||||
return list;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public List<String> getDisablePackage() {
|
||||
List<String> list = new ArrayList<>();
|
||||
if (Settings.System.getInt(crv, "qch_app_camera", 0) == 1) {
|
||||
|
||||
@@ -741,7 +741,7 @@ public class Utils {
|
||||
}
|
||||
|
||||
//获取App版本号
|
||||
public static String getAPPVersionName(String pck, Context context) {
|
||||
public static String getAppVersionName(String pck, Context context) {
|
||||
PackageManager pm = context.getPackageManager();
|
||||
String versionName;
|
||||
try {
|
||||
|
||||
+9
-5
@@ -4,10 +4,11 @@ buildscript {
|
||||
repositories {
|
||||
google()
|
||||
// mavenCentral()
|
||||
maven { url "https://jitpack.io" }
|
||||
maven { url 'https://jitpack.io' }
|
||||
maven { url 'https://developer.huawei.com/repo/' }
|
||||
maven { url 'https://developer.hihonor.com/repo' }
|
||||
maven { url 'https://maven.aliyun.com/repository/central' }
|
||||
maven { url "https://maven.aliyun.com/repository/jcenter" }
|
||||
maven { url 'https://maven.aliyun.com/repository/jcenter' }
|
||||
maven { url 'https://maven.aliyun.com/repository/public' }
|
||||
maven { url 'https://maven.aliyun.com/repository/google' }
|
||||
}
|
||||
@@ -29,10 +30,13 @@ allprojects {
|
||||
repositories {
|
||||
google()
|
||||
// mavenCentral()
|
||||
maven { url "https://jitpack.io" }
|
||||
maven { url 'https://jitpack.io' }
|
||||
maven { url 'https://developer.huawei.com/repo/' }
|
||||
maven { url 'https://maven.aliyun.com/repository/central/' }
|
||||
maven { url 'https://maven.aliyun.com/repository/public/' }
|
||||
maven { url 'https://developer.hihonor.com/repo' }
|
||||
maven { url 'https://maven.aliyun.com/repository/central' }
|
||||
maven { url 'https://maven.aliyun.com/repository/jcenter' }
|
||||
maven { url 'https://maven.aliyun.com/repository/public' }
|
||||
maven { url 'https://maven.aliyun.com/repository/google' }
|
||||
}
|
||||
gradle.projectsEvaluated {
|
||||
tasks.withType(JavaCompile) {
|
||||
|
||||
Reference in new issue
Block a user