version:1.7
fix:优化接口请求 update:增加锁屏密码
This commit is contained in:
@@ -73,8 +73,8 @@ android {
|
||||
|
||||
official {
|
||||
flavorDimensions "default"
|
||||
versionCode 6
|
||||
versionName "1.5"
|
||||
versionCode 8
|
||||
versionName "1.7"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -292,6 +292,9 @@ dependencies {
|
||||
implementation 'com.github.chrisbanes:PhotoView:2.0.0'
|
||||
//沉浸状态栏
|
||||
implementation 'com.gitee.zackratos:UltimateBarX:0.8.0'
|
||||
//验证码输入
|
||||
implementation 'com.jacktuotuo.customview:verificationcodeview:1.0.5'
|
||||
// implementation 'com.king.view:splitedittext:1.0.0'
|
||||
//动态权限框架
|
||||
// implementation 'com.hjq:xxpermissions:6.0'
|
||||
}
|
||||
|
||||
@@ -15,10 +15,12 @@ public class MainAContact {
|
||||
void getAppletQRCode();
|
||||
/*获取二维码*/
|
||||
void getQRCode();
|
||||
//获取所有app包名
|
||||
void getAllApp();
|
||||
/*检查更新*/
|
||||
void checkUpdate();
|
||||
/*获取强制下载*/
|
||||
void getForceInstall();
|
||||
/*检查扶小鹰App更新*/
|
||||
void checkFXYUpdate();
|
||||
/*获取所有全局更新*/
|
||||
void getOverallApp();
|
||||
}
|
||||
@@ -27,8 +29,9 @@ public class MainAContact {
|
||||
void setSnInfo(BaseResponse<SnInfo> response);
|
||||
void setAppletQRCode(String url);
|
||||
void setQRCode(Bitmap bitmap);
|
||||
void getAllAppFinish();
|
||||
void checkUpdateFinish();
|
||||
void setForceInstall();
|
||||
void checkFXYUpdateFinish();
|
||||
void setOverallApp();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -91,25 +91,26 @@ public class MainAPresenter implements MainAContact.Presenter {
|
||||
|
||||
@Override
|
||||
public void getAppletQRCode() {
|
||||
NetInterfaceManager.getInstance()
|
||||
.getQRCodeURL(true, getLifecycle(), new NetInterfaceManager.onNextCallback() {
|
||||
@Override
|
||||
public void onNext(Object o) {
|
||||
Log.e("getAppletQRCode", "onNext: " + o);
|
||||
mView.setAppletQRCode((String) o);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(Object o) {
|
||||
Log.e("getAppletQRCode", "onError: " + o);
|
||||
mView.setAppletQRCode(null);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onComplete() {
|
||||
Log.e("getAppletQRCode", "onComplete: ");
|
||||
}
|
||||
});
|
||||
// NetInterfaceManager.getInstance()
|
||||
// .getQRCodeURL(true, getLifecycle(), new NetInterfaceManager.onNextCallback() {
|
||||
// @Override
|
||||
// public void onNext(Object o) {
|
||||
// Log.e("getAppletQRCode", "onNext: " + o);
|
||||
// mView.setAppletQRCode((String) o);
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public void onError(Object o) {
|
||||
// Log.e("getAppletQRCode", "onError: " + o);
|
||||
// mView.setAppletQRCode(null);
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public void onComplete() {
|
||||
// Log.e("getAppletQRCode", "onComplete: ");
|
||||
// }
|
||||
// });
|
||||
mView.setAppletQRCode(null);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -121,17 +122,31 @@ public class MainAPresenter implements MainAContact.Presenter {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void checkUpdate() {
|
||||
mView.checkUpdateFinish();
|
||||
public void getAllApp() {
|
||||
NetInterfaceManager.getInstance().getAppWhiteList(new NetInterfaceManager.WhiteListCallback() {
|
||||
@Override
|
||||
public void onComplet() {
|
||||
mView.getAllAppFinish();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
public void getForceInstall() {
|
||||
NetInterfaceManager.getInstance().getForceInstall(false, getLifecycle(), new NetInterfaceManager.CompleteCallback() {
|
||||
public void checkUpdate() {
|
||||
NetInterfaceManager.getInstance().checkAllAppUpdate(true, getLifecycle(), new NetInterfaceManager.CompleteCallback() {
|
||||
@Override
|
||||
public void onComplete() {
|
||||
Log.e("getForceInstall", "onComplete: ");
|
||||
mView.setForceInstall();
|
||||
mView.checkUpdateFinish();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
public void checkFXYUpdate() {
|
||||
NetInterfaceManager.getInstance().checkFXYAppUpdate(true, getLifecycle(), new NetInterfaceManager.CompleteCallback() {
|
||||
@Override
|
||||
public void onComplete() {
|
||||
mView.checkFXYUpdateFinish();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@@ -17,6 +17,7 @@ import android.text.TextUtils;
|
||||
import android.util.Log;
|
||||
import android.view.Gravity;
|
||||
import android.view.KeyEvent;
|
||||
import android.view.View;
|
||||
import android.view.WindowManager;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.TextView;
|
||||
@@ -81,6 +82,8 @@ public class MainActivity extends BaseActivity implements MainAContact.MainView,
|
||||
ImageView iv_appqrcode;
|
||||
@BindView(R.id.iv_exit)
|
||||
ImageView iv_exit;
|
||||
@BindView(R.id.tv_update)
|
||||
TextView tv_update;
|
||||
|
||||
private MainAPresenter mPresenter;
|
||||
|
||||
@@ -138,6 +141,14 @@ public class MainActivity extends BaseActivity implements MainAContact.MainView,
|
||||
|
||||
Utils.getBattery(this);
|
||||
Utils.getBatterymAh(this);
|
||||
|
||||
tv_update.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View view) {
|
||||
ToastUtil.show("正在检查更新");
|
||||
mPresenter.getAllApp();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
private TimeTask task;
|
||||
@@ -393,31 +404,36 @@ public class MainActivity extends BaseActivity implements MainAContact.MainView,
|
||||
|
||||
@Override
|
||||
public void setAppletQRCode(String url) {
|
||||
if (!TextUtils.isEmpty(url)) {
|
||||
Glide.with(iv_appqrcode)
|
||||
.load(url)
|
||||
.dontAnimate()
|
||||
.placeholder(getDrawable(R.drawable.applet_qrcode))
|
||||
.into(iv_appqrcode);
|
||||
} else {
|
||||
iv_appqrcode.setImageDrawable(getDrawable(R.drawable.applet_qrcode));
|
||||
}
|
||||
// if (!TextUtils.isEmpty(url)) {
|
||||
// Glide.with(iv_appqrcode)
|
||||
// .load(url)
|
||||
// .dontAnimate()
|
||||
// .placeholder(getDrawable(R.drawable.applet_qrcode))
|
||||
// .into(iv_appqrcode);
|
||||
// } else {
|
||||
// iv_appqrcode.setImageDrawable(getDrawable(R.drawable.applet_qrcode));
|
||||
// }
|
||||
mPresenter.getQRCode();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setQRCode(@NotNull Bitmap bitmap) {
|
||||
qr_code.setImageBitmap(bitmap);
|
||||
mPresenter.getAllApp();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void getAllAppFinish() {
|
||||
mPresenter.checkUpdate();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void checkUpdateFinish() {
|
||||
mPresenter.getForceInstall();
|
||||
}
|
||||
mPresenter.checkFXYUpdate();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setForceInstall() {
|
||||
public void checkFXYUpdateFinish() {
|
||||
mPresenter.getOverallApp();
|
||||
}
|
||||
|
||||
|
||||
@@ -16,15 +16,15 @@ public class CommonConfig {
|
||||
public final static String BROWSER_APP_KEY = "browser_app_key";
|
||||
public final static String TYPEWRITING_APP_KEY = "typewriting_app_key";
|
||||
|
||||
public static String isLogined = "isLogined";
|
||||
public static String AES_KEY = "0123456789ABCDEF";
|
||||
public static String HTTP_KEY = "YTM3YTAxNTJmMmZmNzkyM2E2YzIwZjlhZTc0NzNmMGI=";
|
||||
public static String UserName = "USERINFO_NAME";
|
||||
public static String UserSchool = "USERINFO_SCHOOL";
|
||||
public static String UserGrade = "USERINFO_GRADE";
|
||||
public static String userDebugMode = "ZUOYEOS_DEBUG";
|
||||
public static String EnableDebug = "EnableDebug";
|
||||
public static String SP_Userinfo_json = "USERINFO_JSON";
|
||||
public static final String isLogined = "isLogined";
|
||||
public static final String AES_KEY = "0123456789ABCDEF";
|
||||
public static final String HTTP_KEY = "YTM3YTAxNTJmMmZmNzkyM2E2YzIwZjlhZTc0NzNmMGI=";
|
||||
public static final String UserName = "USERINFO_NAME";
|
||||
public static final String UserSchool = "USERINFO_SCHOOL";
|
||||
public static final String UserGrade = "USERINFO_GRADE";
|
||||
public static final String userDebugMode = "ZUOYEOS_DEBUG";
|
||||
public static final String EnableDebug = "EnableDebug";
|
||||
public static final String SP_Userinfo_json = "USERINFO_JSON";
|
||||
|
||||
public static final String KEY_IS_CONTROL = "is_control_key";
|
||||
|
||||
@@ -41,7 +41,7 @@ public class CommonConfig {
|
||||
/*投屏开关*/
|
||||
public final static String AOLE_ACTION_SCREEN_SHARE = "aole_app_screen_share";
|
||||
/*内部黑名单*/
|
||||
public final static String AOLE_APP_WEB_WHITE_LIST ="app_web_white_list";
|
||||
public final static String AOLE_APP_WEB_WHITE_LIST = "app_web_white_list";
|
||||
/*应用安装白名单*/
|
||||
public final static String AOLE_ACTION_APP_FORBID = "aole_app_forbid";
|
||||
/*强制安装应用,禁止卸载*/
|
||||
|
||||
@@ -73,6 +73,7 @@ import com.fuying.sn.network.api.ScreenState;
|
||||
import com.fuying.sn.network.api.Setting;
|
||||
import com.fuying.sn.network.api.TimeControl;
|
||||
import com.fuying.sn.network.api.UpdateAdminSn;
|
||||
import com.fuying.sn.network.api.UpdateLockScreen;
|
||||
import com.fuying.sn.network.api.UploadScreenshot;
|
||||
import com.fuying.sn.network.api.UserInfoControl;
|
||||
import com.fuying.sn.network.interceptor.RepeatRequestInterceptor;
|
||||
@@ -511,6 +512,12 @@ public class NetInterfaceManager {
|
||||
.observeOn(AndroidSchedulers.mainThread());
|
||||
}
|
||||
|
||||
public Observable<BaseResponse> getUpdateLockScreenObservable() {
|
||||
return mRetrofit.create(UpdateLockScreen.class)
|
||||
.updateLockScreen(Utils.getSerial())
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread());
|
||||
}
|
||||
|
||||
/*
|
||||
*
|
||||
@@ -608,7 +615,7 @@ public class NetInterfaceManager {
|
||||
public void getSnInfo(boolean refresh, BehaviorSubject<ActivityEvent> lifecycle, ObserverCallback callback) {
|
||||
ConnectMode connectMode = ConnectMode.SIX_HOUR;
|
||||
if (refresh) {
|
||||
connectMode = ConnectMode.ONE_HOUR;
|
||||
connectMode = ConnectMode.ONE_MINUTE;
|
||||
}
|
||||
if (ConnectManager.getInstance().isNeedConnect(UrlAddress.SNINFO, connectMode)) {
|
||||
getSnInfo(lifecycle, callback);
|
||||
@@ -663,7 +670,7 @@ public class NetInterfaceManager {
|
||||
} else if (code == 300) {
|
||||
mCacheHelper.put(UrlAddress.SNINFO, "");
|
||||
SPUtils.put(mContext, CommonConfig.isLogined, 0);
|
||||
} else if (code == 400) {
|
||||
} else if (code == 401) {
|
||||
mCacheHelper.put(UrlAddress.SNINFO, "");
|
||||
SPUtils.put(mContext, CommonConfig.isLogined, 2);
|
||||
}
|
||||
@@ -1249,7 +1256,7 @@ public class NetInterfaceManager {
|
||||
public void getQRCodeURL(boolean refresh, BehaviorSubject<ActivityEvent> lifecycle, onNextCallback callback) {
|
||||
ConnectMode connectMode = ConnectMode.ONE_DAY;
|
||||
if (refresh) {
|
||||
connectMode = ConnectMode.DEFAULT;
|
||||
connectMode = ConnectMode.HALF_DAY;
|
||||
}
|
||||
if (ConnectManager.getInstance().isNeedConnect(UrlAddress.GET_APPLET_QRCODE, connectMode)) {
|
||||
getQRCodeURL(lifecycle, callback);
|
||||
@@ -1283,7 +1290,7 @@ public class NetInterfaceManager {
|
||||
|
||||
@Override
|
||||
public void onNext(BaseResponse<AppletQRCode> baseResponse) {
|
||||
Log.e("getQRCodeURL", "onNext: ");
|
||||
Log.e("getQRCodeURL", "onNext: " + baseResponse);
|
||||
if (baseResponse.code == 200) {
|
||||
AppletQRCode appletQRCode = baseResponse.data;
|
||||
mCacheHelper.put(UrlAddress.GET_APPLET_QRCODE, GsonUtils.toJSONString(appletQRCode));
|
||||
@@ -1361,9 +1368,9 @@ public class NetInterfaceManager {
|
||||
}
|
||||
|
||||
public void getBrowserWhiteList(boolean refresh, BehaviorSubject<ActivityEvent> lifecycle, CompleteCallback callback) {
|
||||
ConnectMode connectMode = ConnectMode.SIX_HOUR;
|
||||
ConnectMode connectMode = ConnectMode.HALF_DAY;
|
||||
if (refresh) {
|
||||
connectMode = ConnectMode.ONE_HOUR;
|
||||
connectMode = ConnectMode.SIX_HOUR;
|
||||
}
|
||||
if (ConnectManager.getInstance().isNeedConnect(UrlAddress.SET_BROWSER_URL, connectMode)) {
|
||||
getBrowserWhiteList(lifecycle, callback);
|
||||
@@ -1458,9 +1465,9 @@ public class NetInterfaceManager {
|
||||
|
||||
|
||||
public void getBrowserLabel(boolean refresh, BehaviorSubject<ActivityEvent> lifecycle, CompleteCallback callback) {
|
||||
ConnectMode connectMode = ConnectMode.SIX_HOUR;
|
||||
ConnectMode connectMode = ConnectMode.HALF_DAY;
|
||||
if (refresh) {
|
||||
connectMode = ConnectMode.ONE_HOUR;
|
||||
connectMode = ConnectMode.SIX_HOUR;
|
||||
}
|
||||
if (ConnectManager.getInstance().isNeedConnect(UrlAddress.SET_BROWSER_LABEL, connectMode)) {
|
||||
getBrowserLabel(lifecycle, callback);
|
||||
@@ -2054,11 +2061,12 @@ public class NetInterfaceManager {
|
||||
return new Observer<BaseResponse<List<AppInfo>>>() {
|
||||
@Override
|
||||
public void onSubscribe(@NonNull Disposable d) {
|
||||
|
||||
Log.e("getForceInstall", "onSubscribe: ");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onNext(@NonNull BaseResponse<List<AppInfo>> listBaseResponse) {
|
||||
Log.e("getForceInstall", "onNext: " + listBaseResponse);
|
||||
int code = listBaseResponse.code;
|
||||
if (code == 200) {
|
||||
List<AppInfo> appInfos = listBaseResponse.data;
|
||||
@@ -2082,6 +2090,7 @@ public class NetInterfaceManager {
|
||||
|
||||
@Override
|
||||
public void onComplete() {
|
||||
Log.e("getForceInstall", "onComplete: ");
|
||||
if (callback != null) {
|
||||
callback.onComplete();
|
||||
}
|
||||
@@ -2586,9 +2595,9 @@ public class NetInterfaceManager {
|
||||
}
|
||||
|
||||
public void getOverallApp(boolean refresh, BehaviorSubject<ActivityEvent> lifecycle, CompleteCallback callback) {
|
||||
ConnectMode connectMode = ConnectMode.ONE_MINUTE;
|
||||
ConnectMode connectMode = ConnectMode.HALF_DAY;
|
||||
if (refresh) {
|
||||
connectMode = ConnectMode.DEFAULT;
|
||||
connectMode = ConnectMode.SIX_HOUR;
|
||||
}
|
||||
if (ConnectManager.getInstance().isNeedConnect(UrlAddress.GE_TOVERALL_APPBYPLATFORM, connectMode)) {
|
||||
getOverallApp(lifecycle, callback);
|
||||
@@ -2603,6 +2612,9 @@ public class NetInterfaceManager {
|
||||
}.getType();
|
||||
List<OverallAppBean> overallAppBeanList = gson.fromJson(jsonString, type);
|
||||
installOverallApp(overallAppBeanList);
|
||||
if (callback != null) {
|
||||
callback.onComplete();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -20,21 +20,21 @@ public class UrlAddress {
|
||||
public final static String GET_ADMIN_APP = "getAdminApp";
|
||||
/*根据包名获取更新*/
|
||||
public final static String GET_NEWESTAPPUPDATE = "app/newestAppUpdate";
|
||||
/*发送设备基本信息*/
|
||||
public final static String UPDATE_SNINFO = "sn/updateAdminSn";
|
||||
|
||||
|
||||
/*绑定设备消息*/
|
||||
public final static String BIND_DEVICES = "sn/bindSn";
|
||||
|
||||
/*获取批次*/
|
||||
public static final String GET_BATCH = "sn/getBatch";
|
||||
/*设备信息接口*/
|
||||
public static final String SNINFO = "sn/getSnInfo";
|
||||
/*发送app信息*/
|
||||
public static final String APPLOG = "App/getApplog";
|
||||
|
||||
/*获取正在运行的app*/
|
||||
public static final String RUN_NEW_APP = "app/runNewApp";
|
||||
/*获取所有应用*/
|
||||
public final static String GET_ALL_PACKAGE = "app/queryAllApp";
|
||||
/*绑定设备消息*/
|
||||
public final static String BIND_DEVICES = "sn/bindSn";
|
||||
/*获取系统设置*/
|
||||
public final static String GET_SETTINGS = "control/getSetting";
|
||||
/*浏览器网址管控*/
|
||||
@@ -51,12 +51,10 @@ public class UrlAddress {
|
||||
public final static String QUERY_APP_INSIDE = "control/queryAppInside";
|
||||
/*发送卸载或者安装信息*/
|
||||
public final static String SEND_INSTALLEDORREMOVED = "app/addAppInstall";
|
||||
/*发送设备基本信息*/
|
||||
public final static String UPDATE_SNINFO = "sn/updateAdminSn";
|
||||
|
||||
/*上传屏幕截图*/
|
||||
public final static String UPLOAD_SCREEN_SNAPSHOT = "sn/uploadScreenshot";
|
||||
/*获取屏幕管控*/
|
||||
public final static String GET_SCREEN_LOCK = "sn/getScreenshot";
|
||||
|
||||
/*获取时间管控*/
|
||||
public final static String GET_TIME_CONTROL = "sn/getTimeControlControl";
|
||||
/*获取用户头像和信息*/
|
||||
@@ -71,11 +69,18 @@ public class UrlAddress {
|
||||
public static final String GET_CLOUD_LESSON_SETTING = "Control/getCloudLessonSetting";
|
||||
/*应用使用记录*/
|
||||
public static final String APP_USAGE_RECORD = "appUsageRecord";
|
||||
|
||||
/*获取屏幕管控*/
|
||||
public final static String GET_SCREEN_LOCK = "sn/getScreenshot";
|
||||
/*获取锁屏密码*/
|
||||
public static final String LOCK_SCREEN_PWD = "sn/getLockScreenPwd";
|
||||
/*解除锁屏*/
|
||||
public static final String UPDATE_LOCK_SCREEN = "sn/updateLockScreen";
|
||||
|
||||
|
||||
|
||||
/*发送app信息*/
|
||||
@Deprecated
|
||||
public static final String APPLOG = "App/getApplog";
|
||||
/*根据包名获取更新*/
|
||||
@Deprecated
|
||||
public final static String GET_APP_UPDATE = "Update/update";
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
package com.fuying.sn.network.api;
|
||||
|
||||
import com.fuying.sn.bean.BaseResponse;
|
||||
import com.fuying.sn.network.UrlAddress;
|
||||
|
||||
import io.reactivex.rxjava3.core.Observable;
|
||||
import retrofit2.http.Field;
|
||||
import retrofit2.http.FormUrlEncoded;
|
||||
import retrofit2.http.POST;
|
||||
|
||||
public interface UpdateLockScreen {
|
||||
@FormUrlEncoded
|
||||
@POST(UrlAddress.UPDATE_LOCK_SCREEN)
|
||||
Observable<BaseResponse> updateLockScreen(
|
||||
@Field("sn") String sn
|
||||
);
|
||||
}
|
||||
@@ -10,6 +10,7 @@ import android.util.Log;
|
||||
import com.fuying.sn.config.CommonConfig;
|
||||
import com.fuying.sn.manager.ControlManager;
|
||||
import com.fuying.sn.network.NetInterfaceManager;
|
||||
import com.fuying.sn.service.main.MainService;
|
||||
import com.fuying.sn.utils.ApkUtils;
|
||||
import com.fuying.sn.utils.CacheUtils;
|
||||
import com.fuying.sn.utils.JGYUtils;
|
||||
@@ -88,7 +89,7 @@ public class APKinstallReceiver extends BroadcastReceiver {
|
||||
|
||||
private static void sendAppInfo() {
|
||||
Observable.create((ObservableEmitter<String> emitter) -> newAppListener = emitter::onNext)
|
||||
.throttleLast(3, TimeUnit.MINUTES)
|
||||
.throttleLast(5, TimeUnit.MINUTES)
|
||||
.subscribe(new Observer<String>() {
|
||||
@Override
|
||||
public void onSubscribe(Disposable d) {
|
||||
@@ -99,12 +100,12 @@ public class APKinstallReceiver extends BroadcastReceiver {
|
||||
public void onNext(String s) {
|
||||
Log.e("sendAppInfo", "onNext: " + s);
|
||||
int isLogined = (int) SPUtils.get(mContext, CommonConfig.isLogined, 2);
|
||||
if (isLogined == 2) return;
|
||||
if (isLogined != 2) {
|
||||
NetInterfaceManager.getInstance().getForceInstall();
|
||||
NetInterfaceManager.getInstance().getAppInside();
|
||||
}
|
||||
NetInterfaceManager.getInstance().SendAppInstallInfo();
|
||||
NetInterfaceManager.getInstance().getForceInstall();
|
||||
NetInterfaceManager.getInstance().getAllappPackage();
|
||||
NetInterfaceManager.getInstance().getAppInside();
|
||||
NetInterfaceManager.getInstance().getOverallApp();
|
||||
MainService.getPresenter().getAllApp();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -17,7 +17,7 @@ import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.WindowManager;
|
||||
import android.widget.Button;
|
||||
import android.widget.EditText;
|
||||
import android.widget.LinearLayout;
|
||||
import android.widget.TextView;
|
||||
|
||||
import com.blankj.utilcode.util.NetworkUtils;
|
||||
@@ -31,13 +31,14 @@ import com.fuying.sn.receiver.APKinstallReceiver;
|
||||
import com.fuying.sn.receiver.BootReceiver;
|
||||
import com.fuying.sn.utils.SPUtils;
|
||||
import com.fuying.sn.utils.TimeUtils;
|
||||
import com.fuying.sn.utils.ToastUtil;
|
||||
import com.fuying.sn.utils.Utils;
|
||||
import com.google.gson.JsonObject;
|
||||
import com.tuo.customview.VerificationCodeView;
|
||||
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
import io.reactivex.rxjava3.android.schedulers.AndroidSchedulers;
|
||||
import io.reactivex.rxjava3.annotations.NonNull;
|
||||
import io.reactivex.rxjava3.core.Observable;
|
||||
import io.reactivex.rxjava3.core.ObservableEmitter;
|
||||
import io.reactivex.rxjava3.core.ObservableOnSubscribe;
|
||||
@@ -224,43 +225,14 @@ public class ManagerService extends Service implements NetworkUtils.OnNetworkSta
|
||||
});
|
||||
if (null == topView) {
|
||||
topView = LayoutInflater.from(getApplicationContext()).inflate(R.layout.activity_screen_lock, null);
|
||||
TextView textView = topView.findViewById(R.id.textView);
|
||||
textView.setText(name);
|
||||
// EditText et_password = topView.findViewById(R.id.et_password);
|
||||
// TextView tv_confirm = topView.findViewById(R.id.tv_confirm);
|
||||
// tv_confirm.setOnClickListener(new View.OnClickListener() {
|
||||
// @Override
|
||||
// public void onClick(View view) {
|
||||
// String password = (String) SPUtils.get(ManagerService.this, UrlAddress.LOCK_SCREEN_PWD, "");
|
||||
// String pwd = et_password.getText().toString();
|
||||
// if (!TextUtils.isEmpty(pwd) && !TextUtils.isEmpty(password) && password.equals(pwd)) {
|
||||
// hideFloatingWindow();
|
||||
// }else {
|
||||
// ToastUtil.show("密码错误");
|
||||
// }
|
||||
// }
|
||||
// });
|
||||
initTopView(topView, name);
|
||||
} else {
|
||||
if ("added".equals(topView.getTag())) {
|
||||
TextView textView = topView.findViewById(R.id.textView);
|
||||
textView.setText(name);
|
||||
// EditText et_password = topView.findViewById(R.id.et_password);
|
||||
// TextView tv_confirm = topView.findViewById(R.id.tv_confirm);
|
||||
// tv_confirm.setOnClickListener(new View.OnClickListener() {
|
||||
// @Override
|
||||
// public void onClick(View view) {
|
||||
// String password = (String) SPUtils.get(ManagerService.this, UrlAddress.LOCK_SCREEN_PWD, "");
|
||||
// String pwd = et_password.getText().toString();
|
||||
// if (!TextUtils.isEmpty(pwd) && !TextUtils.isEmpty(password) && password.equals(pwd)) {
|
||||
// hideFloatingWindow();
|
||||
// }else {
|
||||
// ToastUtil.show("密码错误");
|
||||
// }
|
||||
// }
|
||||
// });
|
||||
initTopView(topView, name);
|
||||
} else {
|
||||
return;
|
||||
}
|
||||
return;
|
||||
}
|
||||
// topView.setAlpha(0.8f);
|
||||
// 设置LayoutParam
|
||||
@@ -291,6 +263,108 @@ public class ManagerService extends Service implements NetworkUtils.OnNetworkSta
|
||||
}
|
||||
}
|
||||
|
||||
private void initTopView(View view, String name) {
|
||||
TextView textView = view.findViewById(R.id.textView);
|
||||
TextView tv_hint = view.findViewById(R.id.tv_hint);
|
||||
textView.setText(name);
|
||||
LinearLayout ll_keyboard = view.findViewById(R.id.ll_keyboard);
|
||||
VerificationCodeView codeView = view.findViewById(R.id.icv);
|
||||
codeView.getEditText().setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View view) {
|
||||
ll_keyboard.setVisibility(View.VISIBLE);
|
||||
}
|
||||
});
|
||||
codeView.setInputCompleteListener(new VerificationCodeView.InputCompleteListener() {
|
||||
@Override
|
||||
public void inputComplete() {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void deleteContent() {
|
||||
|
||||
}
|
||||
});
|
||||
Button bt0 = view.findViewById(R.id.bt_0);
|
||||
Button bt1 = view.findViewById(R.id.bt_1);
|
||||
Button bt2 = view.findViewById(R.id.bt_2);
|
||||
Button bt3 = view.findViewById(R.id.bt_3);
|
||||
Button bt4 = view.findViewById(R.id.bt_4);
|
||||
Button bt5 = view.findViewById(R.id.bt_5);
|
||||
Button bt6 = view.findViewById(R.id.bt_6);
|
||||
Button bt7 = view.findViewById(R.id.bt_7);
|
||||
Button bt8 = view.findViewById(R.id.bt_8);
|
||||
Button bt9 = view.findViewById(R.id.bt_9);
|
||||
Button bt_del = view.findViewById(R.id.bt_del);
|
||||
Button bt_confirm = view.findViewById(R.id.bt_confirm);
|
||||
bt0.setOnClickListener(view1 -> add(codeView, "0"));
|
||||
bt1.setOnClickListener(view1 -> add(codeView, "1"));
|
||||
bt2.setOnClickListener(view1 -> add(codeView, "2"));
|
||||
bt3.setOnClickListener(view1 -> add(codeView, "3"));
|
||||
bt4.setOnClickListener(view1 -> add(codeView, "4"));
|
||||
bt5.setOnClickListener(view1 -> add(codeView, "5"));
|
||||
bt6.setOnClickListener(view1 -> add(codeView, "6"));
|
||||
bt7.setOnClickListener(view1 -> add(codeView, "7"));
|
||||
bt8.setOnClickListener(view1 -> add(codeView, "8"));
|
||||
bt9.setOnClickListener(view1 -> add(codeView, "9"));
|
||||
bt_del.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View view) {
|
||||
tv_hint.setText("");
|
||||
codeView.clearInputContent();
|
||||
}
|
||||
});
|
||||
bt_confirm.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View view) {
|
||||
String content = codeView.getInputContent();
|
||||
if (TextUtils.isEmpty(content)) {
|
||||
return;
|
||||
}
|
||||
Log.e(TAG, "inputComplete: " + content);
|
||||
String password = (String) SPUtils.get(ManagerService.this, UrlAddress.LOCK_SCREEN_PWD, "");
|
||||
if (!TextUtils.isEmpty(content) && !TextUtils.isEmpty(password) && password.equals(content)) {
|
||||
hideFloatingWindow();
|
||||
SPUtils.put(ManagerService.this, ManagerService.LOCK_STATE, 0);
|
||||
NetInterfaceManager.getInstance().getUpdateLockScreenObservable()
|
||||
.subscribe(new Observer<BaseResponse>() {
|
||||
@Override
|
||||
public void onSubscribe(@NonNull Disposable d) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onNext(@NonNull BaseResponse baseResponse) {
|
||||
Log.e("getUpdateLockScreenObservable", "onNext: " + baseResponse);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(@NonNull Throwable e) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onComplete() {
|
||||
|
||||
}
|
||||
});
|
||||
} else {
|
||||
// ToastUtil.show("密码错误");
|
||||
tv_hint.setText("密码错误");
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
private void add(VerificationCodeView codeView, String text) {
|
||||
Log.e(TAG, "add: text = " + text);
|
||||
String oldText = codeView.getEditText().getText().toString();
|
||||
Log.e(TAG, "add: " + oldText);
|
||||
codeView.getEditText().setText(text);
|
||||
}
|
||||
|
||||
private void hideFloatingWindow() {
|
||||
if (null == windowManager) {
|
||||
return;
|
||||
|
||||
@@ -7,6 +7,7 @@ import com.fuying.sn.bean.SnInfo;
|
||||
|
||||
public class MainSContact {
|
||||
public interface MainView extends BaseView {
|
||||
|
||||
void setSnInfo(BaseResponse<SnInfo> response);
|
||||
void setLocked(int lockedStatus);
|
||||
void updateInfoFinish();
|
||||
@@ -30,6 +31,7 @@ public class MainSContact {
|
||||
|
||||
interface Presenter extends BasePresenter<MainView> {
|
||||
|
||||
/*更新的*/
|
||||
//获取所有app包名
|
||||
void getAllApp();
|
||||
//检查更新
|
||||
@@ -39,16 +41,20 @@ public class MainSContact {
|
||||
/*获取所有全局更新*/
|
||||
void getOverallApp();
|
||||
|
||||
|
||||
/*获取上传或下载的*/
|
||||
//获取设备信息
|
||||
void getSnInfo();
|
||||
//获取锁定状态
|
||||
void getLocked();
|
||||
|
||||
//上传设备信息
|
||||
void updateDeviceInfo();
|
||||
//获取id管控
|
||||
void getAppInside();
|
||||
|
||||
//获取强制下载
|
||||
void getForceInstall();
|
||||
//获取id管控
|
||||
void getAppInside();
|
||||
//获取系统设置
|
||||
void getSystemSettings();
|
||||
//获取浏览器书签
|
||||
|
||||
@@ -79,6 +79,49 @@ public class MainSPresenter implements MainSContact.Presenter {
|
||||
this.mView = null;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
@SuppressLint("NewApi")
|
||||
public void getAllApp() {
|
||||
NetInterfaceManager.getInstance().getAppWhiteList(new NetInterfaceManager.WhiteListCallback() {
|
||||
@Override
|
||||
public void onComplet() {
|
||||
mView.getAllAppFinish();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
public void checkUpdate() {
|
||||
NetInterfaceManager.getInstance().checkAllAppUpdate(true, getLifecycle(), new NetInterfaceManager.CompleteCallback() {
|
||||
@Override
|
||||
public void onComplete() {
|
||||
mView.checkUpdateFinish();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
public void checkFXYUpdate() {
|
||||
NetInterfaceManager.getInstance().checkFXYAppUpdate(true, getLifecycle(), new NetInterfaceManager.CompleteCallback() {
|
||||
@Override
|
||||
public void onComplete() {
|
||||
mView.checkFXYUpdateFinish();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
public void getOverallApp() {
|
||||
NetInterfaceManager.getInstance().getOverallApp(true, getLifecycle(), new NetInterfaceManager.CompleteCallback() {
|
||||
@Override
|
||||
public void onComplete() {
|
||||
mView.setOverallApp();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void getSnInfo() {
|
||||
NetInterfaceManager.getInstance()
|
||||
@@ -108,7 +151,7 @@ public class MainSPresenter implements MainSContact.Presenter {
|
||||
|
||||
@Override
|
||||
public void getLocked() {
|
||||
int statu = (int) SPUtils.get(mContext, CommonConfig.isLogined, 0);
|
||||
int statu = (int) SPUtils.get(mContext, CommonConfig.isLogined, 2);
|
||||
mView.setLocked(statu);
|
||||
}
|
||||
|
||||
@@ -118,97 +161,6 @@ public class MainSPresenter implements MainSContact.Presenter {
|
||||
mView.updateInfoFinish();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void checkUpdate() {
|
||||
NetInterfaceManager.getInstance().checkAllAppUpdate(true, getLifecycle(), new NetInterfaceManager.CompleteCallback() {
|
||||
@Override
|
||||
public void onComplete() {
|
||||
mView.checkUpdateFinish();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
public void checkFXYUpdate() {
|
||||
NetInterfaceManager.getInstance().checkFXYAppUpdate(true, getLifecycle(), new NetInterfaceManager.CompleteCallback() {
|
||||
@Override
|
||||
public void onComplete() {
|
||||
mView.checkFXYUpdateFinish();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
@SuppressLint("NewApi")
|
||||
public void getAllApp() {
|
||||
// NetInterfaceManager.getInstance()
|
||||
// .getQueryAllAppControl()
|
||||
// .compose(RxLifecycle.bindUntilEvent(getLifecycle(), ActivityEvent.DESTROY))
|
||||
// .subscribe(new Observer<BaseResponse<List<AppInfo>>>() {
|
||||
// @Override
|
||||
// public void onSubscribe(Disposable d) {
|
||||
// Log.e("getAllApp", "onSubscribe: ");
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public void onNext(BaseResponse<List<AppInfo>> listBaseResponse) {
|
||||
// Log.e("getAllApp", "onNext: " + listBaseResponse);
|
||||
// int code = listBaseResponse.code;
|
||||
// if (code == 200) {
|
||||
// List<AppInfo> appInfoList = listBaseResponse.data;
|
||||
// if (appInfoList == null || appInfoList.size() == 0) {
|
||||
// mMMKV.encode(UrlAddress.GET_ALL_PACKAGE, "");
|
||||
// ApkUtils.writeAppPackageList(mContext, "");
|
||||
// } else {
|
||||
// mMMKV.encode(UrlAddress.GET_ALL_PACKAGE, GsonUtils.toJSONString(appInfoList));
|
||||
// HashSet allPkgSet = new HashSet<String>();
|
||||
// for (AppInfo pkg : appInfoList) {
|
||||
// allPkgSet.add(pkg.getApp_package());
|
||||
// }
|
||||
// String allPkgString = String.join(",", allPkgSet);
|
||||
// Settings.System.putString(mContext.getContentResolver(), CommonConfig.ONLY_SHORTCUT_LIST, allPkgString);
|
||||
// Log.e("getAllApp", "onNext: " + allPkgString);
|
||||
// ApkUtils.writeAppPackageList(mContext, allPkgString);
|
||||
// NetInterfaceManager.getInstance().getAppStart(appInfoList);
|
||||
// }
|
||||
// JGYUtils.getInstance().deleteOtherApp();
|
||||
// } else {
|
||||
// mMMKV.encode(UrlAddress.GET_ALL_PACKAGE, "");
|
||||
// ApkUtils.writeAppPackageList(mContext, "");
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public void onError(Throwable e) {
|
||||
// Log.e("getAllApp", "onError: " + e.getMessage());
|
||||
// onComplete();
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public void onComplete() {
|
||||
// Log.e("getAllApp", "onComplete: ");
|
||||
// mView.getAllAppFinish();
|
||||
// }
|
||||
// });
|
||||
|
||||
NetInterfaceManager.getInstance().getAppWhiteList(new NetInterfaceManager.WhiteListCallback() {
|
||||
@Override
|
||||
public void onComplet() {
|
||||
mView.getAllAppFinish();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
public void getOverallApp() {
|
||||
NetInterfaceManager.getInstance().getOverallApp(true, getLifecycle(), new NetInterfaceManager.CompleteCallback() {
|
||||
@Override
|
||||
public void onComplete() {
|
||||
mView.setOverallApp();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
public void getAppInside() {
|
||||
NetInterfaceManager.getInstance()
|
||||
@@ -305,76 +257,82 @@ public class MainSPresenter implements MainSContact.Presenter {
|
||||
|
||||
@Override
|
||||
public void getBrowserLabel() {
|
||||
NetInterfaceManager.getInstance().getLabelControl()
|
||||
.compose(RxLifecycle.bindUntilEvent(getLifecycle(), ActivityEvent.DESTROY))
|
||||
.subscribe(new Observer<BaseResponse<Label>>() {
|
||||
@Override
|
||||
public void onSubscribe(Disposable d) {
|
||||
Log.e("getBrowserLabel", "onSubscribe: ");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onNext(BaseResponse<Label> labelBaseResponse) {
|
||||
Log.e("getBrowserLabel", "onNext: " + labelBaseResponse);
|
||||
if (labelBaseResponse.code == 200) {
|
||||
String home_page = labelBaseResponse.data.getHome_page();
|
||||
Settings.System.putString(mContext.getContentResolver(), "homepagURL", home_page);
|
||||
//主页
|
||||
Intent homepag = new Intent("qch_app_brower_homepage");
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
|
||||
homepag.setPackage("com.android.settings")
|
||||
.setPackage("com.android.browser");
|
||||
}
|
||||
if (!TextUtils.isEmpty(home_page)) {
|
||||
homepag.putExtra("homepage", home_page);
|
||||
} else {
|
||||
homepag.putExtra("homepage", "");
|
||||
}
|
||||
mContext.sendBroadcast(homepag);
|
||||
|
||||
//书签
|
||||
String label_page = labelBaseResponse.data.getLabel_page();
|
||||
Intent websiteBookMark = new Intent("qch_app_brower_website");
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
|
||||
websiteBookMark.setPackage("com.android.settings")
|
||||
.setPackage("com.android.browser");
|
||||
}
|
||||
if (!TextUtils.isEmpty(label_page)) {
|
||||
websiteBookMark.putExtra("websiteBookMark", label_page);
|
||||
} else {
|
||||
websiteBookMark.putExtra("websiteBookMark", "");
|
||||
}
|
||||
mContext.sendBroadcast(websiteBookMark);
|
||||
} else {
|
||||
Intent intent1 = new Intent("qch_app_brower_homepage");
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
|
||||
intent1.setPackage("com.android.settings")
|
||||
.setPackage("com.android.browser");
|
||||
}
|
||||
intent1.putExtra("homepage", "");
|
||||
mContext.sendBroadcast(intent1);
|
||||
Intent intent2 = new Intent("qch_app_brower_website");
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
|
||||
intent2.setPackage("com.android.settings")
|
||||
.setPackage("com.android.browser");
|
||||
}
|
||||
intent2.putExtra("websiteBookMark", "");
|
||||
mContext.sendBroadcast(intent2);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(Throwable e) {
|
||||
Log.e("getBrowserLabel", "onError: " + e.getMessage());
|
||||
onComplete();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onComplete() {
|
||||
Log.e("getBrowserLabel", "onComplete: ");
|
||||
mView.setBrowserLabel();
|
||||
}
|
||||
});
|
||||
NetInterfaceManager.getInstance().getBrowserLabel(true, getLifecycle(), new NetInterfaceManager.CompleteCallback() {
|
||||
@Override
|
||||
public void onComplete() {
|
||||
mView.setBrowserLabel();
|
||||
}
|
||||
});
|
||||
// NetInterfaceManager.getInstance().getLabelControl()
|
||||
// .compose(RxLifecycle.bindUntilEvent(getLifecycle(), ActivityEvent.DESTROY))
|
||||
// .subscribe(new Observer<BaseResponse<Label>>() {
|
||||
// @Override
|
||||
// public void onSubscribe(Disposable d) {
|
||||
// Log.e("getBrowserLabel", "onSubscribe: ");
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public void onNext(BaseResponse<Label> labelBaseResponse) {
|
||||
// Log.e("getBrowserLabel", "onNext: " + labelBaseResponse);
|
||||
// if (labelBaseResponse.code == 200) {
|
||||
// String home_page = labelBaseResponse.data.getHome_page();
|
||||
// Settings.System.putString(mContext.getContentResolver(), "homepagURL", home_page);
|
||||
// //主页
|
||||
// Intent homepag = new Intent("qch_app_brower_homepage");
|
||||
// if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
|
||||
// homepag.setPackage("com.android.settings")
|
||||
// .setPackage("com.android.browser");
|
||||
// }
|
||||
// if (!TextUtils.isEmpty(home_page)) {
|
||||
// homepag.putExtra("homepage", home_page);
|
||||
// } else {
|
||||
// homepag.putExtra("homepage", "");
|
||||
// }
|
||||
// mContext.sendBroadcast(homepag);
|
||||
//
|
||||
// //书签
|
||||
// String label_page = labelBaseResponse.data.getLabel_page();
|
||||
// Intent websiteBookMark = new Intent("qch_app_brower_website");
|
||||
// if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
|
||||
// websiteBookMark.setPackage("com.android.settings")
|
||||
// .setPackage("com.android.browser");
|
||||
// }
|
||||
// if (!TextUtils.isEmpty(label_page)) {
|
||||
// websiteBookMark.putExtra("websiteBookMark", label_page);
|
||||
// } else {
|
||||
// websiteBookMark.putExtra("websiteBookMark", "");
|
||||
// }
|
||||
// mContext.sendBroadcast(websiteBookMark);
|
||||
// } else {
|
||||
// Intent intent1 = new Intent("qch_app_brower_homepage");
|
||||
// if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
|
||||
// intent1.setPackage("com.android.settings")
|
||||
// .setPackage("com.android.browser");
|
||||
// }
|
||||
// intent1.putExtra("homepage", "");
|
||||
// mContext.sendBroadcast(intent1);
|
||||
// Intent intent2 = new Intent("qch_app_brower_website");
|
||||
// if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
|
||||
// intent2.setPackage("com.android.settings")
|
||||
// .setPackage("com.android.browser");
|
||||
// }
|
||||
// intent2.putExtra("websiteBookMark", "");
|
||||
// mContext.sendBroadcast(intent2);
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public void onError(Throwable e) {
|
||||
// Log.e("getBrowserLabel", "onError: " + e.getMessage());
|
||||
// onComplete();
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public void onComplete() {
|
||||
// Log.e("getBrowserLabel", "onComplete: ");
|
||||
// mView.setBrowserLabel();
|
||||
// }
|
||||
// });
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -382,55 +340,61 @@ public class MainSPresenter implements MainSContact.Presenter {
|
||||
*/
|
||||
@Override
|
||||
public void getBrowserWhiteList() {
|
||||
NetInterfaceManager.getInstance().getBrowserControl()
|
||||
.compose(RxLifecycle.bindUntilEvent(getLifecycle(), ActivityEvent.DESTROY))
|
||||
.subscribe(new Observer<BaseResponse<BrowserApiData>>() {
|
||||
@Override
|
||||
public void onSubscribe(Disposable d) {
|
||||
Log.e("getBrowserWhiteList", "onSubscribe: ");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onNext(BaseResponse<BrowserApiData> response) {
|
||||
Log.e("getBrowserWhiteList", "onNext: " + response);
|
||||
if (response.code == 200) {
|
||||
//白名单
|
||||
List<BrowserBean> white = response.data.getWhiteList();
|
||||
if (null != white && white.size() != 0) {
|
||||
boolean whiteList = Settings.System.putString(mContext.getContentResolver(), "DeselectBrowserArray",
|
||||
white.stream().map(BrowserBean::getAddress).collect(Collectors.joining(",")));
|
||||
Log.e("getBrowserWhiteList", "setBrowserList_white:" + white + ":" + whiteList);
|
||||
} else {
|
||||
Settings.System.putString(mContext.getContentResolver(), "DeselectBrowserArray", " ");
|
||||
}
|
||||
//黑名单
|
||||
List<BrowserBean> black = response.data.getBlackList();
|
||||
if (null != black && black.size() != 0) {
|
||||
boolean blackList = Settings.System.putString(mContext.getContentResolver(), "qch_webblack_url",
|
||||
black.stream().map(BrowserBean::getAddress).collect(Collectors.joining(",")));
|
||||
Log.e("getBrowserWhiteList", "setBrowserList_black:" + black + ":" + blackList);
|
||||
} else {
|
||||
Settings.System.putString(mContext.getContentResolver(), "qch_webblack_url", " ");
|
||||
}
|
||||
} else {
|
||||
Settings.System.putString(mContext.getContentResolver(), "DeselectBrowserArray", " ");
|
||||
Settings.System.putString(mContext.getContentResolver(), "qch_webblack_url", " ");
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(Throwable e) {
|
||||
Log.e("getBrowserWhiteList", "onError: " + e.getMessage());
|
||||
onComplete();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onComplete() {
|
||||
new URLUtils(mContext).setBrowserList();
|
||||
mView.setBrowserWhiteList();
|
||||
Log.e("getBrowserWhiteList", "onComplete: ");
|
||||
}
|
||||
});
|
||||
NetInterfaceManager.getInstance().getBrowserWhiteList(true, getLifecycle(), new NetInterfaceManager.CompleteCallback() {
|
||||
@Override
|
||||
public void onComplete() {
|
||||
mView.setBrowserWhiteList();
|
||||
}
|
||||
});
|
||||
// NetInterfaceManager.getInstance().getBrowserControl()
|
||||
// .compose(RxLifecycle.bindUntilEvent(getLifecycle(), ActivityEvent.DESTROY))
|
||||
// .subscribe(new Observer<BaseResponse<BrowserApiData>>() {
|
||||
// @Override
|
||||
// public void onSubscribe(Disposable d) {
|
||||
// Log.e("getBrowserWhiteList", "onSubscribe: ");
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public void onNext(BaseResponse<BrowserApiData> response) {
|
||||
// Log.e("getBrowserWhiteList", "onNext: " + response);
|
||||
// if (response.code == 200) {
|
||||
// //白名单
|
||||
// List<BrowserBean> white = response.data.getWhiteList();
|
||||
// if (null != white && white.size() != 0) {
|
||||
// boolean whiteList = Settings.System.putString(mContext.getContentResolver(), "DeselectBrowserArray",
|
||||
// white.stream().map(BrowserBean::getAddress).collect(Collectors.joining(",")));
|
||||
// Log.e("getBrowserWhiteList", "setBrowserList_white:" + white + ":" + whiteList);
|
||||
// } else {
|
||||
// Settings.System.putString(mContext.getContentResolver(), "DeselectBrowserArray", " ");
|
||||
// }
|
||||
// //黑名单
|
||||
// List<BrowserBean> black = response.data.getBlackList();
|
||||
// if (null != black && black.size() != 0) {
|
||||
// boolean blackList = Settings.System.putString(mContext.getContentResolver(), "qch_webblack_url",
|
||||
// black.stream().map(BrowserBean::getAddress).collect(Collectors.joining(",")));
|
||||
// Log.e("getBrowserWhiteList", "setBrowserList_black:" + black + ":" + blackList);
|
||||
// } else {
|
||||
// Settings.System.putString(mContext.getContentResolver(), "qch_webblack_url", " ");
|
||||
// }
|
||||
// } else {
|
||||
// Settings.System.putString(mContext.getContentResolver(), "DeselectBrowserArray", " ");
|
||||
// Settings.System.putString(mContext.getContentResolver(), "qch_webblack_url", " ");
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public void onError(Throwable e) {
|
||||
// Log.e("getBrowserWhiteList", "onError: " + e.getMessage());
|
||||
// onComplete();
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public void onComplete() {
|
||||
// new URLUtils(mContext).setBrowserList();
|
||||
// mView.setBrowserWhiteList();
|
||||
// Log.e("getBrowserWhiteList", "onComplete: ");
|
||||
// }
|
||||
// });
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -456,7 +420,7 @@ public class MainSPresenter implements MainSContact.Presenter {
|
||||
|
||||
@Override
|
||||
public void onNext(BaseResponse<List<AppStart>> listBaseResponse) {
|
||||
Log.e("getAppStart", "onNext: ");
|
||||
Log.e("getAppStart", "onNext: " + listBaseResponse);
|
||||
int code = listBaseResponse.code;
|
||||
if (code == 200) {
|
||||
List<AppStart> list = listBaseResponse.data;
|
||||
|
||||
@@ -120,7 +120,6 @@ public class MainService extends Service implements MainSContact.MainView, Netwo
|
||||
mPresenter.getSnInfo();
|
||||
SPUtils.put(this, CommonConfig.JGY_FIRST_BOOT, 1);
|
||||
}
|
||||
mPresenter.checkUpdate();
|
||||
mPresenter.getAllApp();
|
||||
NTPTimeTask task = new NTPTimeTask();
|
||||
task.execute("ntp.aliyun.com");
|
||||
@@ -161,6 +160,7 @@ public class MainService extends Service implements MainSContact.MainView, Netwo
|
||||
if (TextUtils.isEmpty(aole_app_forbid)) {
|
||||
ApkUtils.writeAppPackageList(MainService.this, "");
|
||||
}
|
||||
mPresenter.getAllApp();
|
||||
|
||||
ApkUtils.UninstallAPP(this, "com.joytv.live");
|
||||
ApkUtils.UninstallAPP(this, "com.tencent.android.qqdownloader");
|
||||
@@ -435,10 +435,8 @@ public class MainService extends Service implements MainSContact.MainView, Netwo
|
||||
public void onNext(String string) {
|
||||
Log.e("TimeObserver", "onNext: " + string);
|
||||
startCommandTime = runningTime = SystemClock.elapsedRealtime();
|
||||
// mPresenter.getAllApp();
|
||||
mPresenter.getSnInfo();
|
||||
NetInterfaceManager.getInstance().getAppWhiteList(() -> {
|
||||
Log.e(TAG, "onNext: getAppWhiteList");
|
||||
});
|
||||
startService();
|
||||
}
|
||||
|
||||
@@ -453,6 +451,27 @@ public class MainService extends Service implements MainSContact.MainView, Netwo
|
||||
}
|
||||
};
|
||||
|
||||
@Override
|
||||
public void getAllAppFinish() {
|
||||
mPresenter.checkUpdate();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void checkUpdateFinish() {
|
||||
mPresenter.checkFXYUpdate();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void checkFXYUpdateFinish() {
|
||||
mPresenter.getOverallApp();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setOverallApp() {
|
||||
Log.e(TAG, "setOverallApp: finish");
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void setSnInfo(BaseResponse<SnInfo> response) {
|
||||
if (response != null) {
|
||||
@@ -468,7 +487,7 @@ public class MainService extends Service implements MainSContact.MainView, Netwo
|
||||
ControlManager.getInstance().setDisableSetting();
|
||||
}
|
||||
//没有授权的设备
|
||||
else if (code == 400) {
|
||||
else if (code == 401) {
|
||||
ControlManager.getInstance().setDisableSetting();
|
||||
}
|
||||
}
|
||||
@@ -476,14 +495,15 @@ public class MainService extends Service implements MainSContact.MainView, Netwo
|
||||
|
||||
@Override
|
||||
public void setLocked(int lockedStatus) {
|
||||
Log.e(TAG, "setLocked: ");
|
||||
Log.e(TAG, "setLocked: " + lockedStatus);
|
||||
switch (lockedStatus) {
|
||||
case 0:
|
||||
case 0://没有绑定的
|
||||
ControlManager.getInstance().setDisableSetting();
|
||||
break;
|
||||
case 1:
|
||||
case 1://绑定了的
|
||||
mPresenter.getForceInstall();
|
||||
break;
|
||||
case 2:
|
||||
case 2://sn没有导入后台的
|
||||
ControlManager.getInstance().setDisableSetting();
|
||||
break;
|
||||
default:
|
||||
@@ -493,36 +513,27 @@ public class MainService extends Service implements MainSContact.MainView, Netwo
|
||||
|
||||
@Override
|
||||
public void updateInfoFinish() {
|
||||
mPresenter.checkUpdate();
|
||||
mPresenter.getScreenLock();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void checkUpdateFinish() {
|
||||
mPresenter.checkFXYUpdate();
|
||||
public void setScreenLock() {
|
||||
mPresenter.getLockScreenPwd();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void checkFXYUpdateFinish() {
|
||||
mPresenter.getAllApp();
|
||||
public void setLockScreenPwd() {
|
||||
Log.e(TAG, "setLockScreenPwd: ");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void getAllAppFinish() {
|
||||
mPresenter.getOverallApp();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setOverallApp() {
|
||||
public void setForceInstall() {
|
||||
mPresenter.getAppInside();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setAppInside() {
|
||||
mPresenter.getForceInstall();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setForceInstall() {
|
||||
mPresenter.getSystemSettings();
|
||||
}
|
||||
|
||||
@@ -563,18 +574,6 @@ public class MainService extends Service implements MainSContact.MainView, Netwo
|
||||
|
||||
@Override
|
||||
public void setMyAppList() {
|
||||
mPresenter.getScreenLock();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setScreenLock() {
|
||||
mPresenter.getLockScreenPwd();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setLockScreenPwd() {
|
||||
Log.e(TAG, "SettingFinish: " + (SystemClock.elapsedRealtime() - runningTime) + " ms");
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -121,11 +121,25 @@
|
||||
android:layout_marginStart="@dimen/dp_16"
|
||||
android:layout_marginTop="@dimen/dp_32"
|
||||
android:layout_marginEnd="@dimen/dp_16"
|
||||
android:visibility="gone"
|
||||
android:adjustViewBounds="true"
|
||||
android:src="@drawable/bind_applet"
|
||||
app:layout_constraintTop_toBottomOf="@+id/tv_bind"
|
||||
tools:layout_editor_absoluteX="0dp" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="@dimen/dp_150"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@drawable/bt_selector"
|
||||
android:gravity="center"
|
||||
android:textSize="@dimen/sp_12"
|
||||
android:text="检查更新"
|
||||
android:textColor="@color/white"
|
||||
android:layout_marginBottom="@dimen/dp_32"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_appqrcode"
|
||||
android:layout_width="@dimen/dp_300"
|
||||
|
||||
@@ -1,46 +1,203 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@color/float_window_color">
|
||||
|
||||
|
||||
<TextView
|
||||
android:id="@+id/textView"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="屏幕已锁定"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="24sp"
|
||||
android:textSize="@dimen/sp_15"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintVertical_bias="0.065" />
|
||||
|
||||
<!-- <EditText-->
|
||||
<!-- android:id="@+id/et_password"-->
|
||||
<!-- android:layout_width="@dimen/dp_200"-->
|
||||
<!-- android:layout_height="wrap_content"-->
|
||||
<!-- android:layout_marginTop="@dimen/dp_16"-->
|
||||
<!-- android:background="@drawable/edit_background"-->
|
||||
<!-- android:gravity="center"-->
|
||||
<!-- android:hint="请输入密码解锁"-->
|
||||
<!-- android:maxEms="20"-->
|
||||
<!-- android:maxLines="1"-->
|
||||
<!-- android:singleLine="true"-->
|
||||
<!-- app:layout_constraintEnd_toEndOf="parent"-->
|
||||
<!-- app:layout_constraintStart_toStartOf="parent"-->
|
||||
<!-- app:layout_constraintTop_toBottomOf="@+id/textView" />-->
|
||||
<TextView
|
||||
android:id="@+id/textView4"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/dp_16"
|
||||
android:maxLines="1"
|
||||
android:singleLine="true"
|
||||
android:text="@string/locked_hint"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="@dimen/sp_14"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/textView" />
|
||||
|
||||
<!-- <TextView-->
|
||||
<!-- android:id="@+id/tv_confirm"-->
|
||||
<!-- android:layout_width="wrap_content"-->
|
||||
<!-- android:layout_height="wrap_content"-->
|
||||
<!-- android:layout_marginTop="@dimen/dp_16"-->
|
||||
<!-- android:text="确定"-->
|
||||
<!-- android:textColor="@color/white"-->
|
||||
<!-- android:textSize="24sp"-->
|
||||
<!-- app:layout_constraintEnd_toEndOf="@+id/et_password"-->
|
||||
<!-- app:layout_constraintStart_toStartOf="@+id/et_password"-->
|
||||
<!-- app:layout_constraintTop_toBottomOf="@+id/et_password" />-->
|
||||
<com.tuo.customview.VerificationCodeView
|
||||
android:id="@+id/icv"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="@dimen/sp_32"
|
||||
android:layout_marginTop="@dimen/dp_16"
|
||||
android:layout_centerHorizontal="true"
|
||||
app:icv_et_bg_focus="@drawable/shape_icv_et_bg_focus"
|
||||
app:icv_et_bg_normal="@drawable/shape_icv_et_bg_normal"
|
||||
app:icv_et_divider_drawable="@drawable/shape_divider_identifying"
|
||||
app:icv_et_number="4"
|
||||
app:icv_et_pwd_radius="10dp"
|
||||
app:icv_et_text_color="#000000"
|
||||
app:icv_et_width="@dimen/sp_32"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintHorizontal_bias="0.0"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/textView4" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_hint"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/dp_16"
|
||||
android:text=""
|
||||
android:textColor="@color/white"
|
||||
android:textSize="@dimen/sp_15"
|
||||
app:layout_constraintEnd_toEndOf="@+id/icv"
|
||||
app:layout_constraintStart_toStartOf="@+id/icv"
|
||||
app:layout_constraintTop_toBottomOf="@+id/icv" />
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/ll_keyboard"
|
||||
android:layout_width="@dimen/dp_200"
|
||||
android:layout_height="@dimen/dp_160"
|
||||
android:layout_marginBottom="@dimen/dp_8"
|
||||
android:orientation="vertical"
|
||||
android:visibility="visible"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<Button
|
||||
android:id="@+id/bt_1"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:text="1"
|
||||
android:textSize="@dimen/sp_14" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/bt_2"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:text="2"
|
||||
android:textSize="@dimen/sp_14" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/bt_3"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:text="3"
|
||||
android:textSize="@dimen/sp_14" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<Button
|
||||
android:id="@+id/bt_4"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:text="4"
|
||||
android:textSize="@dimen/sp_14" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/bt_5"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:text="5"
|
||||
android:textSize="@dimen/sp_14" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/bt_6"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:text="6"
|
||||
android:textSize="@dimen/sp_14" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<Button
|
||||
android:id="@+id/bt_7"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:text="7"
|
||||
android:textSize="@dimen/sp_14" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/bt_8"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:text="8"
|
||||
android:textSize="@dimen/sp_14" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/bt_9"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:text="9"
|
||||
android:textSize="@dimen/sp_14" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<Button
|
||||
android:id="@+id/bt_0"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:text="0"
|
||||
android:textSize="@dimen/sp_14" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/bt_del"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:text="清除"
|
||||
android:textSize="@dimen/sp_14" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/bt_confirm"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:text="确认"
|
||||
android:textSize="@dimen/sp_14" />
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
@@ -123,9 +123,24 @@
|
||||
android:layout_marginEnd="@dimen/dp_16"
|
||||
android:adjustViewBounds="true"
|
||||
android:src="@drawable/bind_applet"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintTop_toBottomOf="@+id/tv_bind"
|
||||
tools:layout_editor_absoluteX="0dp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_update"
|
||||
android:layout_width="@dimen/dp_150"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="@dimen/dp_32"
|
||||
android:background="@drawable/bt_selector"
|
||||
android:gravity="center"
|
||||
android:text="检查更新"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="@dimen/sp_12"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_appqrcode"
|
||||
android:layout_width="@dimen/dp_300"
|
||||
|
||||
@@ -15,32 +15,190 @@
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintVertical_bias="0.219" />
|
||||
|
||||
<!-- <EditText-->
|
||||
<!-- android:id="@+id/et_password"-->
|
||||
<!-- android:layout_width="@dimen/dp_200"-->
|
||||
<!-- android:layout_height="wrap_content"-->
|
||||
<!-- android:layout_marginTop="@dimen/dp_16"-->
|
||||
<!-- android:background="@drawable/edit_background"-->
|
||||
<!-- android:gravity="center"-->
|
||||
<!-- android:hint="请输入密码解锁"-->
|
||||
<!-- android:maxEms="20"-->
|
||||
<!-- android:maxLines="1"-->
|
||||
<!-- android:singleLine="true"-->
|
||||
<!-- app:layout_constraintEnd_toEndOf="parent"-->
|
||||
<!-- app:layout_constraintStart_toStartOf="parent"-->
|
||||
<!-- app:layout_constraintTop_toBottomOf="@+id/textView" />-->
|
||||
<TextView
|
||||
android:id="@+id/textView4"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/dp_40"
|
||||
android:layout_marginTop="@dimen/dp_16"
|
||||
android:layout_marginEnd="@dimen/dp_40"
|
||||
android:gravity="center"
|
||||
android:maxLines="2"
|
||||
android:text="@string/locked_hint"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="@dimen/sp_14"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/textView" />
|
||||
|
||||
<com.tuo.customview.VerificationCodeView
|
||||
android:id="@+id/icv"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="@dimen/sp_32"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:layout_marginTop="@dimen/dp_16"
|
||||
app:icv_et_bg_focus="@drawable/shape_icv_et_bg_focus"
|
||||
app:icv_et_bg_normal="@drawable/shape_icv_et_bg_normal"
|
||||
app:icv_et_divider_drawable="@drawable/shape_divider_identifying"
|
||||
app:icv_et_number="4"
|
||||
app:icv_et_pwd_radius="10dp"
|
||||
app:icv_et_text_color="#000000"
|
||||
app:icv_et_width="@dimen/sp_32"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintHorizontal_bias="0.0"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/textView4" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_hint"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/dp_16"
|
||||
android:text=""
|
||||
android:textColor="@color/white"
|
||||
android:textSize="@dimen/sp_15"
|
||||
app:layout_constraintEnd_toEndOf="@+id/icv"
|
||||
app:layout_constraintStart_toStartOf="@+id/icv"
|
||||
app:layout_constraintTop_toBottomOf="@+id/icv" />
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/ll_keyboard"
|
||||
android:layout_width="@dimen/dp_200"
|
||||
android:layout_height="@dimen/dp_200"
|
||||
android:layout_marginBottom="@dimen/dp_32"
|
||||
android:orientation="vertical"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<Button
|
||||
android:id="@+id/bt_1"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:text="1"
|
||||
android:textSize="@dimen/sp_14" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/bt_2"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:text="2"
|
||||
android:textSize="@dimen/sp_14" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/bt_3"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:text="3"
|
||||
android:textSize="@dimen/sp_14" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<Button
|
||||
android:id="@+id/bt_4"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:text="4"
|
||||
android:textSize="@dimen/sp_14" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/bt_5"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:text="5"
|
||||
android:textSize="@dimen/sp_14" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/bt_6"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:text="6"
|
||||
android:textSize="@dimen/sp_14" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<Button
|
||||
android:id="@+id/bt_7"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:text="7"
|
||||
android:textSize="@dimen/sp_14" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/bt_8"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:text="8"
|
||||
android:textSize="@dimen/sp_14" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/bt_9"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:text="9"
|
||||
android:textSize="@dimen/sp_14" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<Button
|
||||
android:id="@+id/bt_0"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:text="0"
|
||||
android:textSize="@dimen/sp_14" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/bt_del"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:text="清除"
|
||||
android:textSize="@dimen/sp_14" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/bt_confirm"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:text="确认"
|
||||
android:textSize="@dimen/sp_14" />
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<!-- <TextView-->
|
||||
<!-- android:id="@+id/tv_confirm"-->
|
||||
<!-- android:layout_width="wrap_content"-->
|
||||
<!-- android:layout_height="wrap_content"-->
|
||||
<!-- android:layout_marginTop="@dimen/dp_16"-->
|
||||
<!-- android:text="确定"-->
|
||||
<!-- android:textColor="@color/white"-->
|
||||
<!-- android:textSize="24sp"-->
|
||||
<!-- app:layout_constraintEnd_toEndOf="@+id/et_password"-->
|
||||
<!-- app:layout_constraintStart_toStartOf="@+id/et_password"-->
|
||||
<!-- app:layout_constraintTop_toBottomOf="@+id/et_password" />-->
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
@@ -20,4 +20,5 @@
|
||||
<string name="scan_tips">请使用UIUI小程序扫码添加设备</string>
|
||||
<string name="bind_succeed">设备已绑定成功</string>
|
||||
<string name="device_unauthorized">设备未经授权</string>
|
||||
<string name="locked_hint">家长设置了屏幕锁定,你可以联系家长解锁屏幕,或通过密码解锁</string>
|
||||
</resources>
|
||||
|
||||
Reference in New Issue
Block a user