version:zhanrui 6.3.8,MTK 2.3.8
fix: update:接口优化,主页优化,心跳机制优化
@@ -82,16 +82,16 @@ android {
|
||||
//酷比魔方
|
||||
cube {
|
||||
flavorDimensions "default"
|
||||
versionCode 73
|
||||
versionName "6.3.3"
|
||||
versionCode 78
|
||||
versionName "6.3.8"
|
||||
buildConfigField "String", "platform", '"ZhanRuiCube"'
|
||||
}
|
||||
|
||||
//MTK
|
||||
MTKnewly {
|
||||
flavorDimensions "default"
|
||||
versionCode 43
|
||||
versionName "2.3.3"
|
||||
versionCode 48
|
||||
versionName "2.3.8"
|
||||
buildConfigField "String", "platform", '"MTK"'
|
||||
}
|
||||
}
|
||||
@@ -278,7 +278,7 @@ dependencies {
|
||||
|
||||
implementation 'com.squareup.moshi:moshi:1.9.3'
|
||||
//OkHttp
|
||||
implementation 'com.squareup.okhttp3:okhttp:4.9.0'
|
||||
implementation 'com.squareup.okhttp3:okhttp:4.8.0'
|
||||
//Retrofit
|
||||
implementation 'com.squareup.retrofit2:retrofit:2.9.0'
|
||||
implementation 'com.squareup.retrofit2:converter-gson:2.9.0'
|
||||
|
||||
@@ -154,9 +154,9 @@ public class CheckNetPresenter implements CheckNetContact.Presenter {
|
||||
|
||||
@Override
|
||||
public void setPushTags() {
|
||||
mNetInterfaceManager.setPushTags(true, getLifecycle(), new NetInterfaceManager.onCompleteCallback() {
|
||||
mNetInterfaceManager.setPushTags(true, getLifecycle(), new NetInterfaceManager.PushTagCallback() {
|
||||
@Override
|
||||
public void onComplete() {
|
||||
public void setPushTag(String tag) {
|
||||
Log.e("setPushTags", "onComplete: ");
|
||||
mView.setTagsFinish(false);
|
||||
}
|
||||
|
||||
@@ -13,21 +13,33 @@ public class MainAContact {
|
||||
/*获取设备锁定状态*/
|
||||
void getLockedState();
|
||||
/*获取设备二维码*/
|
||||
void getQRCode(boolean loocked);
|
||||
void getQrCode(boolean loocked);
|
||||
/*获取学生信息*/
|
||||
void getStudesInfo(boolean refresh);
|
||||
void getStudesInfo();
|
||||
/*获取公网ip*/
|
||||
void getPublicIp();
|
||||
/*手动获取设备信息更新*/
|
||||
void buttonCheckUpdate(View view);
|
||||
/*获取设备信息更新*/
|
||||
void checkAoleyunUpdate();
|
||||
/*获取测试应用更新*/
|
||||
void checkTestUpdate();
|
||||
}
|
||||
|
||||
public interface MainView extends BaseView {
|
||||
/*获取设备锁定状态*/
|
||||
void setLockedState(boolean loocked);
|
||||
/*获取设备二维码*/
|
||||
void setQRCode(Bitmap qrcode);
|
||||
void setQrCode(Bitmap qrcode);
|
||||
/*获取学生信息*/
|
||||
void setStudesInfo(StudentsInfo studesInfo);
|
||||
/*获取公网ip*/
|
||||
void setPublicIp(String ip);
|
||||
/*手动获取设备信息更新*/
|
||||
void buttonCheckUpdateFinish(boolean update, JsonObject jsonObject);
|
||||
/*获取设备信息更新*/
|
||||
void checkAoleyunUpdateFinish();
|
||||
/*获取测试应用更新*/
|
||||
void checkTestUpdateFinish();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -84,18 +84,18 @@ public class MainAPresenter implements MainAContact.Presenter {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void getQRCode(boolean loocked) {
|
||||
public void getQrCode(boolean loocked) {
|
||||
String encryptString = CXAESUtil.encrypt(CommonConfig.AES_KEY, Utils.getSerial());
|
||||
Log.e("getQRCode", "setImageAndText: " + encryptString);
|
||||
Bitmap bitmap = Utils.createQRImage(encryptString, 400, 400);
|
||||
mView.setQRCode(bitmap);
|
||||
mView.setQrCode(bitmap);
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过sn获取用户信息
|
||||
*/
|
||||
@Override
|
||||
public void getStudesInfo(boolean refresh) {
|
||||
public void getStudesInfo() {
|
||||
NetInterfaceManager.getInstance().getStudesInfo(true, getLifecycle(), new NetInterfaceManager.StudesInfoListener() {
|
||||
@Override
|
||||
public void setStudentsInfo(StudentsInfo studentsInfo) {
|
||||
@@ -109,12 +109,41 @@ public class MainAPresenter implements MainAContact.Presenter {
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
public void getPublicIp() {
|
||||
NetInterfaceManager.getInstance().getPublicIp(lifecycle, ip -> mView.setPublicIp(ip));
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void buttonCheckUpdate(View view) {
|
||||
checkUpdateInfo();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void checkAoleyunUpdate() {
|
||||
checkUpdateInfo();
|
||||
NetInterfaceManager.getInstance()
|
||||
.checkAoleyunUpdate(true, getLifecycle(), new NetInterfaceManager.onCompleteCallback() {
|
||||
@Override
|
||||
public void onComplete() {
|
||||
mView.checkAoleyunUpdateFinish();
|
||||
}
|
||||
});
|
||||
// mView.checkAoleyunUpdateFinish();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void checkTestUpdate() {
|
||||
NetInterfaceManager.getInstance()
|
||||
.checkTestUpdate(true, getLifecycle(), new NetInterfaceManager.onCompleteCallback() {
|
||||
@Override
|
||||
public void onComplete() {
|
||||
mView.checkTestUpdateFinish();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
private void checkUpdateInfo() {
|
||||
NetInterfaceManager.getInstance()
|
||||
.getUpdateApi()
|
||||
|
||||
@@ -5,19 +5,25 @@ import android.app.AlertDialog;
|
||||
import android.content.BroadcastReceiver;
|
||||
import android.content.ComponentName;
|
||||
import android.content.Context;
|
||||
import android.content.DialogInterface;
|
||||
import android.content.Intent;
|
||||
import android.content.IntentFilter;
|
||||
import android.content.ServiceConnection;
|
||||
import android.graphics.Bitmap;
|
||||
import android.net.ConnectivityManager;
|
||||
import android.net.NetworkInfo;
|
||||
import android.net.wifi.WifiInfo;
|
||||
import android.net.wifi.WifiManager;
|
||||
import android.os.Build;
|
||||
import android.os.IBinder;
|
||||
import android.os.SystemClock;
|
||||
import android.provider.Settings;
|
||||
import android.text.TextUtils;
|
||||
import android.text.format.Formatter;
|
||||
import android.util.Log;
|
||||
import android.view.Gravity;
|
||||
import android.view.KeyEvent;
|
||||
import android.view.View;
|
||||
import android.widget.Button;
|
||||
import android.view.WindowManager;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.TextView;
|
||||
|
||||
@@ -30,6 +36,7 @@ import com.aoleyun.sn.base.BaseActivity;
|
||||
import com.aoleyun.sn.bean.StudentsInfo;
|
||||
import com.aoleyun.sn.comm.CommonConfig;
|
||||
import com.aoleyun.sn.comm.JGYActions;
|
||||
import com.aoleyun.sn.dialog.UpdateDialog;
|
||||
import com.aoleyun.sn.service.main.MainService;
|
||||
import com.aoleyun.sn.utils.JGYUtils;
|
||||
import com.aoleyun.sn.utils.SPUtils;
|
||||
@@ -53,57 +60,83 @@ import io.reactivex.rxjava3.core.ObservableOnSubscribe;
|
||||
import io.reactivex.rxjava3.core.Observer;
|
||||
import io.reactivex.rxjava3.disposables.Disposable;
|
||||
|
||||
import static android.os.BatteryManager.EXTRA_LEVEL;
|
||||
import static android.os.BatteryManager.EXTRA_VOLTAGE;
|
||||
|
||||
public class MainActivity extends BaseActivity implements MainAContact.MainView, NetworkUtils.OnNetworkStatusChangedListener {
|
||||
private static final String TAG = MainActivity.class.getSimpleName();
|
||||
|
||||
public static final String UPDATE_LOCKED_STATUS = "UPDATE_LOCKED_STATUS";
|
||||
|
||||
@BindView(R.id.iv_head)
|
||||
ImageView head;
|
||||
@BindView(R.id.tv_devsn)
|
||||
TextView tv_devsn;
|
||||
@BindView(R.id.tv_imei2)
|
||||
TextView tv_imei2;
|
||||
@BindView(R.id.tv_devmac)
|
||||
TextView tv_devmac;
|
||||
@BindView(R.id.version)
|
||||
TextView tv_version;
|
||||
@BindView(R.id.tv_batch)
|
||||
TextView tv_batch;
|
||||
@BindView(R.id.tv_class_name)
|
||||
TextView tv_class_name;
|
||||
@BindView(R.id.tv_class)
|
||||
TextView tv_class;
|
||||
@BindView(R.id.tv_number_name)
|
||||
TextView tv_number_name;
|
||||
@BindView(R.id.tv_number)
|
||||
TextView tv_number;
|
||||
@BindView(R.id.tv_name)
|
||||
TextView tv_name;
|
||||
@BindView(R.id.tv_wifi)
|
||||
TextView tv_wifi;
|
||||
@BindView(R.id.chkupd)
|
||||
Button bt_checkupdate;
|
||||
// @BindView(R.id.checkupdate)
|
||||
// ConstraintLayout checkupdate;
|
||||
@BindView(R.id.iv_back)
|
||||
ImageView back;
|
||||
@BindView(R.id.iv_locked)
|
||||
ImageView iv_locked;
|
||||
@BindView(R.id.layout_class)
|
||||
ConstraintLayout layout_class;
|
||||
@BindView(R.id.layout_number)
|
||||
ConstraintLayout layout_number;
|
||||
@BindView(R.id.layout_name)
|
||||
ConstraintLayout layout_name;
|
||||
@BindView(R.id.cl_imei)
|
||||
ConstraintLayout cl_imei;
|
||||
@BindView(R.id.tv_customversion)
|
||||
TextView tv_customversion;
|
||||
@BindView(R.id.tv_version)
|
||||
TextView tv_version;
|
||||
@BindView(R.id.iv_head)
|
||||
ImageView iv_head;
|
||||
@BindView(R.id.tv_name)
|
||||
TextView tv_name;
|
||||
@BindView(R.id.tv_batch)
|
||||
TextView tv_batch;
|
||||
@BindView(R.id.tv_number)
|
||||
TextView tv_number;
|
||||
@BindView(R.id.tv_class)
|
||||
TextView tv_class;
|
||||
@BindView(R.id.tv_model)
|
||||
TextView tv_model;
|
||||
@BindView(R.id.cl_ota)
|
||||
ConstraintLayout cl_ota;
|
||||
@BindView(R.id.tv_system_version)
|
||||
TextView tv_system_version;
|
||||
|
||||
@BindView(R.id.tv_battery)
|
||||
TextView tv_battery;
|
||||
@BindView(R.id.tv_voltage)
|
||||
TextView tv_voltage;
|
||||
@BindView(R.id.tv_wifi)
|
||||
TextView tv_wifi;
|
||||
@BindView(R.id.tv_signal)
|
||||
TextView tv_signal;
|
||||
@BindView(R.id.tv_ip)
|
||||
TextView tv_ip;
|
||||
@BindView(R.id.tv_public_ip)
|
||||
TextView tv_public_ip;
|
||||
|
||||
@BindView(R.id.tv_serial)
|
||||
TextView tv_serial;
|
||||
@BindView(R.id.tv_imei)
|
||||
TextView tv_imei;
|
||||
@BindView(R.id.tv_mac)
|
||||
TextView tv_mac;
|
||||
|
||||
@BindView(R.id.tv_bind_statu)
|
||||
TextView tv_bind_statu;
|
||||
@BindView(R.id.iv_qrcode)
|
||||
ImageView iv_qrcode;
|
||||
@BindView(R.id.tv_bind_time)
|
||||
TextView tv_bind_time;
|
||||
|
||||
@OnClick({R.id.iv_back, R.id.tv_title, R.id.chkupd})
|
||||
// @BindView(R.id.tv_class_name)
|
||||
// TextView tv_class_name;
|
||||
// @BindView(R.id.tv_number_name)
|
||||
// TextView tv_number_name;
|
||||
// @BindView(R.id.chkupd)
|
||||
// Button bt_checkupdate;
|
||||
// @BindView(R.id.checkupdate)
|
||||
// ConstraintLayout checkupdate;
|
||||
// @BindView(R.id.iv_locked)
|
||||
// ImageView iv_locked;
|
||||
// @BindView(R.id.layout_class)
|
||||
// ConstraintLayout layout_class;
|
||||
// @BindView(R.id.layout_number)
|
||||
// ConstraintLayout layout_number;
|
||||
// @BindView(R.id.layout_name)
|
||||
// ConstraintLayout layout_name;
|
||||
// @BindView(R.id.cl_imei)
|
||||
// ConstraintLayout cl_imei;
|
||||
|
||||
|
||||
@OnClick({R.id.iv_back, R.id.tv_title})
|
||||
public void onClick(View view) {
|
||||
switch (view.getId()) {
|
||||
case R.id.iv_back:
|
||||
@@ -144,7 +177,6 @@ public class MainActivity extends BaseActivity implements MainAContact.MainView,
|
||||
@Override
|
||||
public void onConnected(NetworkUtils.NetworkType networkType) {
|
||||
Log.e("OnNetworkStatusChanged", "onConnected: ");
|
||||
Utils.getPublicIP(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -161,11 +193,12 @@ public class MainActivity extends BaseActivity implements MainAContact.MainView,
|
||||
JGYUtils.startServices(MainActivity.this);
|
||||
getDevicesInfo();
|
||||
if (Utils.isWifiAvailable(MainActivity.this)) {
|
||||
tv_wifi.setText(Utils.obtainWifiInfo(MainActivity.this) + "dbm");
|
||||
tv_signal.setText(Utils.obtainWifiInfo(MainActivity.this) + "dbm");
|
||||
} else {
|
||||
tv_wifi.setText("未连接");
|
||||
tv_signal.setText("未连接");
|
||||
}
|
||||
setStoreUpdateListener(bt_checkupdate);
|
||||
// setStoreUpdateListener(bt_checkupdate);
|
||||
registerReceiver();
|
||||
}
|
||||
|
||||
private void setStoreUpdateListener(View view) {
|
||||
@@ -194,7 +227,7 @@ public class MainActivity extends BaseActivity implements MainAContact.MainView,
|
||||
public void onNext(@NonNull View view) {
|
||||
Log.e("mObserver", "onNext");
|
||||
ToastUtil.show("正在检查更新");
|
||||
mMainAPresenter.buttonCheckUpdate(bt_checkupdate);
|
||||
// mMainAPresenter.buttonCheckUpdate(bt_checkupdate);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -216,34 +249,39 @@ public class MainActivity extends BaseActivity implements MainAContact.MainView,
|
||||
}
|
||||
|
||||
private void getDevicesInfo() {
|
||||
tv_model.setText(Build.MODEL);
|
||||
String sn = Utils.getSerial(this);
|
||||
tv_devsn.setText(sn);
|
||||
tv_serial.setText(sn);
|
||||
getIMEI();
|
||||
checkSNError(sn);
|
||||
String macaddr = Utils.getAndroid10MAC(this);
|
||||
if (TextUtils.isEmpty(macaddr)) {
|
||||
tv_devmac.setText("获取失败");
|
||||
} else {
|
||||
tv_devmac.setText(macaddr);
|
||||
}
|
||||
setMac();
|
||||
checkSnError(sn);
|
||||
tv_version.setText(BuildConfig.VERSION_NAME);
|
||||
//获取自定义版本号
|
||||
Log.e(TAG, "getDevicesInfo: CustomVersion: " + Utils.getCustomVersion());
|
||||
Log.e(TAG, "getDevicesInfo: RomVersion: " + Utils.getRomVersion());
|
||||
tv_customversion.setText(Utils.getCustomVersion());
|
||||
tv_system_version.setText(Utils.getCustomVersion());
|
||||
}
|
||||
|
||||
private void getIMEI() {
|
||||
if (!Utils.NOSN.equalsIgnoreCase(Utils.getSerial())) {
|
||||
tv_imei2.setText(Utils.getIMEI(this, 1));
|
||||
tv_imei.setText(Utils.getIMEI(this, 1));
|
||||
} else {
|
||||
if (!TextUtils.isEmpty(Utils.getIMEI(this, 1))) {
|
||||
tv_imei2.setText(Utils.getIMEI(this, 1));
|
||||
tv_imei.setText(Utils.getIMEI(this, 1));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void checkSNError(String sn) {
|
||||
private void setMac() {
|
||||
String macaddr = Utils.getAndroid10MAC(this);
|
||||
if (TextUtils.isEmpty(macaddr)) {
|
||||
tv_mac.setText("获取失败");
|
||||
} else {
|
||||
tv_mac.setText(macaddr);
|
||||
}
|
||||
}
|
||||
|
||||
private void checkSnError(String sn) {
|
||||
//sn长度最长30位
|
||||
if (sn.length() > 30) {
|
||||
showSNErrorDialog("设备SN号码格式错误!");
|
||||
@@ -302,23 +340,23 @@ public class MainActivity extends BaseActivity implements MainAContact.MainView,
|
||||
public void setLockedState(boolean loocked) {
|
||||
Log.e(TAG, "setLockedState: " + loocked);
|
||||
if (loocked) {
|
||||
iv_locked.setVisibility(View.VISIBLE);
|
||||
iv_locked.setImageDrawable(getDrawable(R.drawable.locked));
|
||||
mMainAPresenter.getStudesInfo(false);
|
||||
// iv_locked.setVisibility(View.VISIBLE);
|
||||
// iv_locked.setImageDrawable(getDrawable(R.drawable.locked));
|
||||
mMainAPresenter.getStudesInfo();
|
||||
} else {
|
||||
iv_locked.setVisibility(View.VISIBLE);
|
||||
iv_locked.setImageDrawable(getDrawable(R.drawable.unlock));
|
||||
// iv_locked.setVisibility(View.VISIBLE);
|
||||
// iv_locked.setImageDrawable(getDrawable(R.drawable.unlock));
|
||||
setNumberText("", View.GONE);
|
||||
setNameText("", View.GONE);
|
||||
setClassText("", View.GONE);
|
||||
setBatchText("", View.GONE);
|
||||
SysSettingUtils.setEnableSetting(this);
|
||||
}
|
||||
mMainAPresenter.getQRCode(loocked);
|
||||
mMainAPresenter.getQrCode(loocked);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setQRCode(Bitmap qrcode) {
|
||||
public void setQrCode(Bitmap qrcode) {
|
||||
iv_qrcode.setImageBitmap(qrcode);
|
||||
}
|
||||
|
||||
@@ -357,21 +395,28 @@ public class MainActivity extends BaseActivity implements MainAContact.MainView,
|
||||
setBatchText(batch, View.VISIBLE);
|
||||
}
|
||||
if (TextUtils.isEmpty(head_img)) {
|
||||
setHead("");
|
||||
setIv_head("");
|
||||
} else {
|
||||
setHead(head_img);
|
||||
setIv_head(head_img);
|
||||
}
|
||||
SPUtils.put(this, CommonConfig.ADMIN_ID, studesInfo.getAdmin_id());
|
||||
}
|
||||
|
||||
public void settradeType(int tradeType) {
|
||||
if (tradeType == 1) {
|
||||
tv_class_name.setText("班级");
|
||||
tv_number_name.setText("学号");
|
||||
} else if (tradeType == 2) {
|
||||
tv_class_name.setText("部门");
|
||||
tv_number_name.setText("工号");
|
||||
@Override
|
||||
public void setPublicIp(String ip) {
|
||||
Log.e(TAG, "setPublicIp: " + ip);
|
||||
tv_public_ip.setText(ip);
|
||||
mMainAPresenter.checkAoleyunUpdate();
|
||||
}
|
||||
|
||||
public void settradeType(int tradeType) {
|
||||
// if (tradeType == 1) {
|
||||
// tv_class_name.setText("班级");
|
||||
// tv_number_name.setText("学号");
|
||||
// } else if (tradeType == 2) {
|
||||
// tv_class_name.setText("部门");
|
||||
// tv_number_name.setText("工号");
|
||||
// }
|
||||
}
|
||||
|
||||
public void setBatchText(String text, int visibility) {
|
||||
@@ -394,11 +439,11 @@ public class MainActivity extends BaseActivity implements MainAContact.MainView,
|
||||
// layout_name.setVisibility(visibility);
|
||||
}
|
||||
|
||||
public void setHead(String url) {
|
||||
public void setIv_head(String url) {
|
||||
if (TextUtils.isEmpty(url)) {
|
||||
Glide.with(head).load(getDrawable(R.drawable.head)).into(head);
|
||||
Glide.with(iv_head).load(getDrawable(R.drawable.default_head)).into(iv_head);
|
||||
} else {
|
||||
Glide.with(head).load(url).into(head);
|
||||
Glide.with(iv_head).load(url).error(R.drawable.default_head).into(iv_head);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -407,7 +452,7 @@ public class MainActivity extends BaseActivity implements MainAContact.MainView,
|
||||
public void buttonCheckUpdateFinish(boolean update, JsonObject jsonObject) {
|
||||
this.updateApp = !update;
|
||||
if (update) {
|
||||
showDialog(jsonObject);
|
||||
showUpdateDialog(jsonObject);
|
||||
} else {
|
||||
Observable.timer(5000, TimeUnit.MILLISECONDS)
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
@@ -415,30 +460,66 @@ public class MainActivity extends BaseActivity implements MainAContact.MainView,
|
||||
}
|
||||
}
|
||||
|
||||
private void showDialog(JsonObject jsonObject) {
|
||||
AlertDialog.Builder builder = new AlertDialog.Builder(this);
|
||||
builder.setTitle("更新:");
|
||||
builder.setMessage("检测到有新版本,是否更新?");
|
||||
builder.setIcon(R.mipmap.ic_launcher);
|
||||
builder.setCancelable(true);
|
||||
//设置正面按钮
|
||||
builder.setPositiveButton("更新", new DialogInterface.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(DialogInterface dialog, int which) {
|
||||
public void checkAoleyunUpdateFinish() {
|
||||
mMainAPresenter.checkTestUpdate();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void checkTestUpdateFinish() {
|
||||
|
||||
}
|
||||
|
||||
private void showUpdateDialog(JsonObject jsonObject) {
|
||||
UpdateDialog dialog = new UpdateDialog(this);
|
||||
dialog.setMessage(String.format(getString(R.string.upgrade_app), jsonObject.get("version_name").getAsString()))
|
||||
.setTitle("版本更新")
|
||||
.setPositive("确定")
|
||||
.setSingle(true)
|
||||
.setOnClickBottomListener(new UpdateDialog.OnClickBottomListener() {
|
||||
@Override
|
||||
public void onPositiveClick() {
|
||||
JGYUtils.getInstance().installAPK(jsonObject);
|
||||
dialog.dismiss();
|
||||
}
|
||||
});
|
||||
//设置反面按钮
|
||||
builder.setNegativeButton("取消", new DialogInterface.OnClickListener() {
|
||||
|
||||
@Override
|
||||
public void onClick(DialogInterface dialog, int which) {
|
||||
public void onNegtiveClick() {
|
||||
dialog.dismiss();
|
||||
}
|
||||
});
|
||||
builder.show();
|
||||
dialog.getWindow().setType(WindowManager.LayoutParams.TYPE_SYSTEM_ALERT);
|
||||
dialog.show();
|
||||
dialog.getWindow().setGravity(Gravity.CENTER);
|
||||
dialog.getWindow().clearFlags(WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE | WindowManager.LayoutParams.FLAG_ALT_FOCUSABLE_IM);
|
||||
dialog.getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_VISIBLE);
|
||||
dialog.setCancelable(false);
|
||||
}
|
||||
|
||||
// private void showDialog(JsonObject jsonObject) {
|
||||
// AlertDialog.Builder builder = new AlertDialog.Builder(this);
|
||||
// builder.setTitle("版本更新");
|
||||
// builder.setMessage(String.format(getString(R.string.upgrade_app),jsonObject.get("version_code").getAsString()));
|
||||
// builder.setIcon(R.mipmap.ic_launcher);
|
||||
// builder.setCancelable(true);
|
||||
// //设置正面按钮
|
||||
// builder.setPositiveButton("更新", new DialogInterface.OnClickListener() {
|
||||
// @Override
|
||||
// public void onClick(DialogInterface dialog, int which) {
|
||||
// JGYUtils.getInstance().installAPK(jsonObject);
|
||||
// dialog.dismiss();
|
||||
// }
|
||||
// });
|
||||
// //设置反面按钮
|
||||
// builder.setNegativeButton("取消", new DialogInterface.OnClickListener() {
|
||||
// @Override
|
||||
// public void onClick(DialogInterface dialog, int which) {
|
||||
// dialog.dismiss();
|
||||
// }
|
||||
// });
|
||||
// builder.show();
|
||||
// }
|
||||
|
||||
@Override
|
||||
protected void onStop() {
|
||||
super.onStop();
|
||||
@@ -465,6 +546,7 @@ public class MainActivity extends BaseActivity implements MainAContact.MainView,
|
||||
super.onDestroy();
|
||||
mMainAPresenter.detachView();
|
||||
mMainAPresenter = null;
|
||||
unregister();
|
||||
JGYUtils.startServices(MainActivity.this);
|
||||
}
|
||||
|
||||
@@ -488,6 +570,20 @@ public class MainActivity extends BaseActivity implements MainAContact.MainView,
|
||||
}
|
||||
}
|
||||
|
||||
private void registerReceiver() {
|
||||
registerWiFiReceiver();
|
||||
registerBatteryReceiver();
|
||||
}
|
||||
|
||||
private void unregister() {
|
||||
if (mWifiReceiver != null) {
|
||||
unregisterReceiver(mWifiReceiver);
|
||||
}
|
||||
if (mBatteryReceiver != null) {
|
||||
unregisterReceiver(mBatteryReceiver);
|
||||
}
|
||||
}
|
||||
|
||||
private UpdateReceiver mUpdateReceiver;
|
||||
|
||||
private void registerUpdateReceiver() {
|
||||
@@ -505,19 +601,124 @@ public class MainActivity extends BaseActivity implements MainAContact.MainView,
|
||||
if (UPDATE_LOCKED_STATUS.equals(intent.getAction())) {
|
||||
int locked = Settings.System.getInt(getContentResolver(), JGYActions.ACTION_QCH_UNLOCK_IPAD, JGYActions.FRAME_CODE_LOCKED);
|
||||
if (locked == JGYActions.FRAME_CODE_LOCKED) {
|
||||
iv_locked.setVisibility(View.VISIBLE);
|
||||
iv_locked.setImageDrawable(getDrawable(R.drawable.locked));
|
||||
// iv_locked.setVisibility(View.VISIBLE);
|
||||
// iv_locked.setImageDrawable(getDrawable(R.drawable.locked));
|
||||
} else {
|
||||
iv_locked.setVisibility(View.VISIBLE);
|
||||
iv_locked.setImageDrawable(getDrawable(R.drawable.unlock));
|
||||
// iv_locked.setVisibility(View.VISIBLE);
|
||||
// iv_locked.setImageDrawable(getDrawable(R.drawable.unlock));
|
||||
setNumberText("", View.GONE);
|
||||
setNameText("", View.GONE);
|
||||
setClassText("", View.GONE);
|
||||
setBatchText("", View.GONE);
|
||||
Glide.with(head).load(getDrawable(R.drawable.head)).into(head);
|
||||
Glide.with(iv_head).load(getDrawable(R.drawable.default_head)).error(R.drawable.default_head).into(iv_head);
|
||||
SysSettingUtils.setEnableSetting(MainActivity.this);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private WifiReceiver mWifiReceiver;
|
||||
|
||||
private void registerWiFiReceiver() {
|
||||
if (mWifiReceiver == null) {
|
||||
mWifiReceiver = new WifiReceiver();
|
||||
}
|
||||
IntentFilter filter = new IntentFilter();
|
||||
filter.addAction(WifiManager.NETWORK_STATE_CHANGED_ACTION);
|
||||
filter.addAction(WifiManager.WIFI_STATE_CHANGED_ACTION);
|
||||
filter.addAction(WifiManager.RSSI_CHANGED_ACTION);
|
||||
filter.addAction(WifiManager.NETWORK_IDS_CHANGED_ACTION);
|
||||
filter.addAction(WifiManager.SCAN_RESULTS_AVAILABLE_ACTION);
|
||||
filter.addAction(WifiManager.CONFIGURED_NETWORKS_CHANGED_ACTION);
|
||||
filter.addAction(WifiManager.LINK_CONFIGURATION_CHANGED_ACTION);
|
||||
filter.addAction(WifiManager.SUPPLICANT_STATE_CHANGED_ACTION);
|
||||
filter.addAction(ConnectivityManager.CONNECTIVITY_ACTION);
|
||||
registerReceiver(mWifiReceiver, filter);
|
||||
}
|
||||
|
||||
public class WifiReceiver extends BroadcastReceiver {
|
||||
private static final String TAG = "wifiReceiver";
|
||||
|
||||
@Override
|
||||
public void onReceive(Context context, Intent intent) {
|
||||
switch (intent.getAction()) {
|
||||
case WifiManager.RSSI_CHANGED_ACTION:
|
||||
int rssi = intent.getIntExtra(WifiManager.EXTRA_NEW_RSSI, -1);
|
||||
tv_signal.setText(rssi + "dBm");
|
||||
//这函数可以计算出信号的等级
|
||||
int strength = WifiManager.calculateSignalLevel(rssi, 5);
|
||||
Log.e(TAG, "wifi信号强度变化");
|
||||
break;
|
||||
//wifi连接上与否
|
||||
case WifiManager.NETWORK_STATE_CHANGED_ACTION:
|
||||
NetworkInfo info = intent.getParcelableExtra(WifiManager.EXTRA_NETWORK_INFO);
|
||||
if (info.getState().equals(NetworkInfo.State.DISCONNECTED)) {
|
||||
Log.e(TAG, getString(R.string.wifi_disconnected));
|
||||
tv_wifi.setText(getString(R.string.wifi_disconnected));
|
||||
tv_signal.setText("");
|
||||
tv_ip.setText(getString(R.string.unknown));
|
||||
} else if (info.getState().equals(NetworkInfo.State.CONNECTED)) {
|
||||
WifiManager wifiManager = (WifiManager) context.getSystemService(Context.WIFI_SERVICE);
|
||||
WifiInfo wifiInfo = wifiManager.getConnectionInfo();
|
||||
//获取当前wifi名称
|
||||
String newSSID = wifiInfo.getSSID();
|
||||
tv_wifi.setText(newSSID);
|
||||
tv_ip.setText(Formatter.formatIpAddress(wifiInfo.getIpAddress()));
|
||||
setMac();
|
||||
Log.e(TAG, "连接到网络 " + newSSID);
|
||||
}
|
||||
break;
|
||||
//wifi打开与否
|
||||
case WifiManager.WIFI_STATE_CHANGED_ACTION:
|
||||
int wifistate = intent.getIntExtra(WifiManager.EXTRA_WIFI_STATE, WifiManager.WIFI_STATE_DISABLED);
|
||||
if (wifistate == WifiManager.WIFI_STATE_DISABLED) {
|
||||
// tv_wifi.setText(getString(R.string.turn_off_wifi));
|
||||
Log.e(TAG, getString(R.string.turn_off_wifi));
|
||||
} else if (wifistate == WifiManager.WIFI_STATE_ENABLED) {
|
||||
// tv_wifi.setText(getString(R.string.turn_on_wifi));
|
||||
Log.e(TAG, getString(R.string.turn_on_wifi));
|
||||
mMainAPresenter.getPublicIp();
|
||||
}
|
||||
break;
|
||||
default:
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private BatteryReceiver mBatteryReceiver;
|
||||
|
||||
private void registerBatteryReceiver() {
|
||||
if (mBatteryReceiver == null) {
|
||||
mBatteryReceiver = new BatteryReceiver();
|
||||
}
|
||||
IntentFilter filter = new IntentFilter();
|
||||
filter.addAction(Intent.ACTION_BATTERY_CHANGED);
|
||||
registerReceiver(mBatteryReceiver, filter);
|
||||
}
|
||||
|
||||
private class BatteryReceiver extends BroadcastReceiver {
|
||||
@Override
|
||||
public void onReceive(Context context, Intent intent) {
|
||||
if (null == intent) {
|
||||
return;
|
||||
}
|
||||
String action = intent.getAction();
|
||||
if (Intent.ACTION_BATTERY_CHANGED.equals(action)) {
|
||||
int level = intent.getIntExtra(EXTRA_LEVEL, 0);
|
||||
int batteryVolt = intent.getIntExtra(EXTRA_VOLTAGE, -1);
|
||||
String levelStr = getLevel(level);
|
||||
tv_battery.setText("电量:" + levelStr);
|
||||
String batteryVoltStr = getBatteryVolt(batteryVolt);
|
||||
tv_voltage.setText("电压:" + batteryVoltStr);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private String getLevel(int level) {
|
||||
return String.format("%d %%", level);
|
||||
}
|
||||
|
||||
private String getBatteryVolt(int batteryVolt) {
|
||||
return String.format("%.3f V", batteryVolt / 1000.0);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -9,8 +9,6 @@ import android.util.Log;
|
||||
|
||||
import androidx.multidex.MultiDexApplication;
|
||||
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.aoleyun.sn.BuildConfig;
|
||||
import com.aoleyun.sn.bean.BaseResponse;
|
||||
import com.aoleyun.sn.manager.MapManager;
|
||||
|
||||
@@ -12,6 +12,7 @@ public class AppUpdateInfo implements Serializable {
|
||||
int id;
|
||||
String url;
|
||||
long version_code;
|
||||
String version_name;
|
||||
String app_name;
|
||||
@SerializedName("package")
|
||||
String packages;
|
||||
@@ -41,6 +42,14 @@ public class AppUpdateInfo implements Serializable {
|
||||
this.version_code = version_code;
|
||||
}
|
||||
|
||||
public String getVersion_name() {
|
||||
return version_name;
|
||||
}
|
||||
|
||||
public void setVersion_name(String version_name) {
|
||||
this.version_name = version_name;
|
||||
}
|
||||
|
||||
public String getApp_name() {
|
||||
return app_name;
|
||||
}
|
||||
|
||||
@@ -48,7 +48,7 @@ public class CommonConfig {
|
||||
/*上次检查更新时间*/
|
||||
public final static String LAST_CHECK_ALL_UPDATE_TIME = "lastCheckAllUpdateTime";
|
||||
/*获取设备的标签*/
|
||||
public final static String DEVICES_TAG = "Aoleyun_devices_tag";
|
||||
public final static String DEVICES_TAG = "Aoleyun_devices_tpush_tag";
|
||||
/*上次获取标签的时间*/
|
||||
public final static String GET_DEVICES_TAG_LASTTIME = "Aoleyun_devices_tag_last_time";
|
||||
|
||||
|
||||
197
app/src/main/java/com/aoleyun/sn/dialog/UpdateDialog.java
Normal file
@@ -0,0 +1,197 @@
|
||||
package com.aoleyun.sn.dialog;
|
||||
|
||||
|
||||
import android.content.Context;
|
||||
import android.os.Bundle;
|
||||
import android.text.TextUtils;
|
||||
import android.view.View;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.TextView;
|
||||
|
||||
import androidx.appcompat.app.AlertDialog;
|
||||
|
||||
import com.aoleyun.sn.R;
|
||||
|
||||
|
||||
/**
|
||||
* description:自定义dialog
|
||||
*/
|
||||
|
||||
public class UpdateDialog extends AlertDialog {
|
||||
/**
|
||||
* 显示的标题
|
||||
*/
|
||||
private TextView titleTv;
|
||||
|
||||
/**
|
||||
* 显示的消息
|
||||
*/
|
||||
private TextView messageTv;
|
||||
|
||||
/**
|
||||
* 确认和取消按钮
|
||||
*/
|
||||
private TextView positiveBn;
|
||||
|
||||
/**
|
||||
* 按钮之间的分割线
|
||||
*/
|
||||
// private View columnLineView;
|
||||
|
||||
private Context mContext;
|
||||
|
||||
public UpdateDialog(Context context) {
|
||||
super(context, R.style.CustomDialog);
|
||||
this.mContext = context;
|
||||
}
|
||||
|
||||
/**
|
||||
* 都是内容数据
|
||||
*/
|
||||
private String message;
|
||||
private String title;
|
||||
private String positive;
|
||||
private int imageResId = -1;
|
||||
|
||||
/**
|
||||
* 底部是否只有一个按钮
|
||||
*/
|
||||
private boolean isSingle = false;
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.update_dialog);
|
||||
//按空白处不能取消动画
|
||||
setCanceledOnTouchOutside(false);
|
||||
//初始化界面控件
|
||||
initView();
|
||||
//初始化界面数据
|
||||
refreshView();
|
||||
//初始化界面控件的事件
|
||||
initEvent();
|
||||
}
|
||||
|
||||
/**
|
||||
* 初始化界面的确定和取消监听器
|
||||
*/
|
||||
private void initEvent() {
|
||||
//设置确定按钮被点击后,向外界提供监听
|
||||
positiveBn.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
if (onClickBottomListener != null) {
|
||||
onClickBottomListener.onPositiveClick();
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 初始化界面控件的显示数据
|
||||
*/
|
||||
private void refreshView() {
|
||||
//如果用户自定了title和message
|
||||
if (!TextUtils.isEmpty(title)) {
|
||||
titleTv.setText(title);
|
||||
titleTv.setVisibility(View.VISIBLE);
|
||||
} else {
|
||||
titleTv.setVisibility(View.GONE);
|
||||
}
|
||||
if (!TextUtils.isEmpty(message)) {
|
||||
messageTv.setText(message);
|
||||
}
|
||||
//如果设置按钮的文字
|
||||
if (!TextUtils.isEmpty(positive)) {
|
||||
positiveBn.setText(positive);
|
||||
} else {
|
||||
positiveBn.setText("确定");
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void show() {
|
||||
super.show();
|
||||
refreshView();
|
||||
}
|
||||
|
||||
/**
|
||||
* 初始化界面控件
|
||||
*/
|
||||
private void initView() {
|
||||
positiveBn = findViewById(R.id.positive);
|
||||
titleTv = findViewById(R.id.title);
|
||||
messageTv = findViewById(R.id.message);
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置确定取消按钮的回调
|
||||
*/
|
||||
private OnClickBottomListener onClickBottomListener;
|
||||
|
||||
public void setOnClickBottomListener(OnClickBottomListener onClickBottomListener) {
|
||||
this.onClickBottomListener = onClickBottomListener;
|
||||
}
|
||||
|
||||
public interface OnClickBottomListener {
|
||||
/**
|
||||
* 点击确定按钮事件
|
||||
*/
|
||||
void onPositiveClick();
|
||||
|
||||
/**
|
||||
* 点击取消按钮事件
|
||||
*/
|
||||
void onNegtiveClick();
|
||||
}
|
||||
|
||||
public String getMessage() {
|
||||
return message;
|
||||
}
|
||||
|
||||
public UpdateDialog setMessage(String message) {
|
||||
this.message = message;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getTitle() {
|
||||
return title;
|
||||
}
|
||||
|
||||
public UpdateDialog setTitle(String title) {
|
||||
this.title = title;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getPositive() {
|
||||
return positive;
|
||||
}
|
||||
|
||||
public UpdateDialog setPositive(String positive) {
|
||||
this.positive = positive;
|
||||
return this;
|
||||
}
|
||||
|
||||
public int getImageResId() {
|
||||
return imageResId;
|
||||
}
|
||||
|
||||
public boolean isSingle() {
|
||||
return isSingle;
|
||||
}
|
||||
|
||||
public UpdateDialog setSingle(boolean single) {
|
||||
isSingle = single;
|
||||
return this;
|
||||
}
|
||||
|
||||
public UpdateDialog setImageResId(int imageResId) {
|
||||
this.imageResId = imageResId;
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void dismiss() {
|
||||
super.dismiss();
|
||||
}
|
||||
}
|
||||
@@ -49,7 +49,6 @@ import com.aoleyun.sn.gson.GsonUtils;
|
||||
import com.aoleyun.sn.gson.NullStringToEmptyAdapterFactory;
|
||||
import com.aoleyun.sn.manager.ConnectManager;
|
||||
import com.aoleyun.sn.manager.ConnectMode;
|
||||
import com.aoleyun.sn.network.api.GetPublicIPApi;
|
||||
import com.aoleyun.sn.network.api.GetWhoisApi;
|
||||
import com.aoleyun.sn.network.api.get.CheckTestUpdateApi;
|
||||
import com.aoleyun.sn.network.api.get.DefaultAppApi;
|
||||
@@ -590,9 +589,9 @@ public class NetInterfaceManager {
|
||||
.observeOn(AndroidSchedulers.mainThread());
|
||||
}
|
||||
|
||||
public Observable<BaseResponse> GetNetworkConnectControl() {
|
||||
public Observable<BaseResponse> GetNetworkConnectControl(String time) {
|
||||
return mRetrofit.create(NetworkConnectApi.class)
|
||||
.sendNetwork(Utils.getSerial(mContext))
|
||||
.sendNetwork(Utils.getSerial(mContext), time)
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread());
|
||||
}
|
||||
@@ -1594,6 +1593,9 @@ public class NetInterfaceManager {
|
||||
@Override
|
||||
public void onComplete() {
|
||||
Log.e("getSnAppAttr", "onComplete: ");
|
||||
if (onCompleteCallback != null) {
|
||||
onCompleteCallback.onComplete();
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
@@ -1826,9 +1828,9 @@ public class NetInterfaceManager {
|
||||
* @param studesInfoListener
|
||||
*/
|
||||
public void getStudesInfo(boolean refresh, BehaviorSubject<ActivityEvent> lifecycle, StudesInfoListener studesInfoListener) {
|
||||
ConnectMode connectMode = ConnectMode.FIFTEEN_MINUTES;
|
||||
ConnectMode connectMode = ConnectMode.ONE_MINUTE;
|
||||
if (refresh) {
|
||||
connectMode = ConnectMode.ONE_MINUTE;
|
||||
connectMode = ConnectMode.DEFAULT;
|
||||
}
|
||||
if (ConnectManager.getInstance().isNeedConnect(UrlAddress.GET_STUDENTS_INFO, connectMode)) {
|
||||
getInfo(lifecycle, studesInfoListener);
|
||||
@@ -1903,23 +1905,23 @@ public class NetInterfaceManager {
|
||||
.subscribe(new Observer<BaseResponse>() {
|
||||
@Override
|
||||
public void onSubscribe(@NonNull Disposable d) {
|
||||
Log.e(TAG + ":" + "getLockedState", "onSubscribe: ");
|
||||
Log.e("getLockedState", "onSubscribe: ");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onNext(@NonNull BaseResponse response) {
|
||||
Log.e(TAG + ":" + "getLockedState", "onNext: " + response);
|
||||
Log.e("getLockedState", "onNext: " + response);
|
||||
if (response.code == OK) {
|
||||
JsonObject jsonObject = JsonParser.parseString(new Gson().toJson(response.data)).getAsJsonObject();
|
||||
int locked = jsonObject.get("lock").getAsInt();
|
||||
Log.e(TAG + ":" + "getLockedState", "locked: " + locked);
|
||||
Log.e("getLockedState", "locked: " + locked);
|
||||
// int oldState = Settings.System.getInt(mContext.getContentResolver(), JGYActions.ACTION_QCH_UNLOCK_IPAD, JGYActions.FRAME_CODE_LOCKED);
|
||||
// Log.e(TAG + ":" + "getLockedState", "qch_unlock_ipad: " + oldState);
|
||||
// Log.e( "getLockedState", "qch_unlock_ipad: " + oldState);
|
||||
//后台1是锁定,底层0是锁定
|
||||
SPUtils.put(mContext, CommonConfig.JGY_FIRST_CONNECT, 1);
|
||||
if (locked == JGYActions.NET_CODE_LOCKED) {
|
||||
// if (oldState == JGYActions.FRAME_CODE_UNLOCKED) {
|
||||
// Log.e(TAG + ":" + "getLockedState", "onNext: " + "state changed , reset devices");
|
||||
// Log.e( "getLockedState", "onNext: " + "state changed , reset devices");
|
||||
// Utils.doMasterClear(mContext);
|
||||
// }
|
||||
Settings.System.putInt(mContext.getContentResolver(), JGYActions.ACTION_QCH_UNLOCK_IPAD, JGYActions.FRAME_CODE_LOCKED);
|
||||
@@ -1929,19 +1931,19 @@ public class NetInterfaceManager {
|
||||
}
|
||||
} else if (response.code == NOTFOUND) {
|
||||
Settings.System.putInt(mContext.getContentResolver(), JGYActions.ACTION_QCH_UNLOCK_IPAD, JGYActions.FRAME_CODE_LOCKED);
|
||||
Log.e(TAG + ":" + "getLockedState", "locked: " + false);
|
||||
Log.e("getLockedState", "locked: " + false);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(@NonNull Throwable e) {
|
||||
Log.e(TAG + ":" + "getLockedState", "onError: " + e.getMessage());
|
||||
Log.e("getLockedState", "onError: " + e.getMessage());
|
||||
onComplete();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onComplete() {
|
||||
Log.e(TAG + ":" + "getLockedState", "onComplete: ");
|
||||
Log.e("getLockedState", "onComplete: ");
|
||||
callback.onComplete();
|
||||
}
|
||||
});
|
||||
@@ -2018,91 +2020,82 @@ public class NetInterfaceManager {
|
||||
});
|
||||
}
|
||||
|
||||
public interface PushTagCallback {
|
||||
void setPushTag(String tag);
|
||||
}
|
||||
|
||||
synchronized public void setPushTags(boolean refresh, BehaviorSubject<ActivityEvent> lifecycle, onCompleteCallback callback) {
|
||||
ConnectMode connectMode = ConnectMode.ONCE;
|
||||
public void setPushTags(boolean refresh, BehaviorSubject<ActivityEvent> lifecycle, PushTagCallback callback) {
|
||||
ConnectMode connectMode = ConnectMode.ONE_DAY;
|
||||
if (refresh) {
|
||||
connectMode = ConnectMode.ONE_DAY;
|
||||
connectMode = ConnectMode.SIX_HOUR;
|
||||
}
|
||||
if (ConnectManager.getInstance().isNeedConnect(UrlAddress.GET_DEVICES_TAGS, connectMode)) {
|
||||
setPushTags(lifecycle, callback);
|
||||
} else {
|
||||
String jsonString = cacheHelper.getAsString(UrlAddress.GET_DEVICES_TAGS);
|
||||
String batch = mMMKV.decodeString(CommonConfig.DEVICES_TAG, "");
|
||||
//为 "" 是已经请求成功的
|
||||
if (jsonString == null) {
|
||||
if (TextUtils.isEmpty(batch)) {
|
||||
setPushTags(lifecycle, callback);
|
||||
} else {
|
||||
Set tagSets = mMMKV.decodeStringSet(CommonConfig.DEVICES_TAG + "pushset");
|
||||
Log.e("setPushTags", "tagSets: " + tagSets);
|
||||
clearAndAppendTags(tagSets);
|
||||
callback.onComplete();
|
||||
Log.e("setPushTags", "tagSets: " + batch);
|
||||
callback.setPushTag(batch);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 设置推送的标签
|
||||
*
|
||||
* @param lifecycle
|
||||
* @param callback
|
||||
*/
|
||||
synchronized public void setPushTags(BehaviorSubject<ActivityEvent> lifecycle, onCompleteCallback callback) {
|
||||
Set<String> set = new HashSet<>();
|
||||
JGYUtils.getInstance().getAppPlatform(new JGYUtils.GetAppPlatformCallback() {
|
||||
@Override
|
||||
public void AppPlatform(int platform) {
|
||||
if (platform == JGYUtils.MTKPlatform) {
|
||||
set.add(JGYUtils.MTKTag);
|
||||
} else if (platform == JGYUtils.ZhanruiPlatform) {
|
||||
set.add(JGYUtils.ZhanruiTag);
|
||||
} else if (platform == JGYUtils.CubePlatform) {
|
||||
set.add(JGYUtils.CubeTag);
|
||||
}
|
||||
}
|
||||
});
|
||||
public void setPushTags(BehaviorSubject<ActivityEvent> lifecycle, PushTagCallback callback) {
|
||||
getPushTagsObservable()
|
||||
.compose(RxLifecycle.bindUntilEvent(lifecycle, ActivityEvent.DESTROY))
|
||||
.subscribe(new Observer<BaseResponse<Batch>>() {
|
||||
@Override
|
||||
public void onSubscribe(@NonNull Disposable d) {
|
||||
Log.e(TAG + ":" + "setPushTags", "onSubscribe: ");
|
||||
Log.e("setPushTags", "onSubscribe: ");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onNext(@NonNull BaseResponse<Batch> response) {
|
||||
if (response.code == OK) {
|
||||
String batch = response.data.getBatch();
|
||||
cacheHelper.put(UrlAddress.GET_DEVICES_TAGS, GsonUtils.toJSONString(response.data));
|
||||
Log.e(TAG + ":" + "setPushTags", "onNext: " + batch);
|
||||
if (!TextUtils.isEmpty(batch)) {
|
||||
set.add(batch);
|
||||
String batch = response.data.getBatch();
|
||||
Log.e("setPushTags", "onNext: " + batch);
|
||||
if (TextUtils.isEmpty(batch)) {
|
||||
Log.e("setPushTags", "onNext: " + "batch empty");
|
||||
callback.setPushTag("");
|
||||
} else {
|
||||
Log.e(TAG + ":" + "setPushTags", "onNext: " + "batch empty");
|
||||
callback.setPushTag(batch);
|
||||
mMMKV.encode(CommonConfig.DEVICES_TAG, batch);
|
||||
}
|
||||
} else {
|
||||
cacheHelper.put(UrlAddress.GET_DEVICES_TAGS, "");
|
||||
Log.e(TAG + ":" + "setPushTags", "onNext: " + response.toString());
|
||||
callback.setPushTag("");
|
||||
Log.e("setPushTags", "onNext: " + response.toString());
|
||||
}
|
||||
mMMKV.encode(CommonConfig.DEVICES_TAG + "pushset", set);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(@NonNull Throwable e) {
|
||||
Log.e(TAG + ":" + "setPushTags", "onError: " + e.getMessage());
|
||||
Log.e("setPushTags", "onError: " + e.getMessage());
|
||||
String batch = mMMKV.decodeString(CommonConfig.DEVICES_TAG, "");
|
||||
Log.e("setPushTags", "tagSets: " + batch);
|
||||
callback.setPushTag(batch);
|
||||
onComplete();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onComplete() {
|
||||
Log.e(TAG + ":" + "setPushTags", "onComplete: ");
|
||||
Log.e("setPushTags", "tagSets: " + set);
|
||||
clearAndAppendTags(set);
|
||||
callback.onComplete();
|
||||
Log.e("setPushTags", "onComplete: ");
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
synchronized private void clearAndAppendTags(Set tagSets) {
|
||||
public void clearAndAppendTags(Set tagSets) {
|
||||
XGPushManager.clearAndAppendTags(mContext, "clearAndAppendTags :" + System.currentTimeMillis(), tagSets, new XGIOperateCallback() {
|
||||
@Override
|
||||
public void onSuccess(Object o, int i) {
|
||||
@@ -2118,7 +2111,7 @@ public class NetInterfaceManager {
|
||||
|
||||
|
||||
public void updateDeviceInfo(boolean refresh, BehaviorSubject<ActivityEvent> lifecycle, onCompleteCallback callback) {
|
||||
ConnectMode connectMode = ConnectMode.SIX_HOUR;
|
||||
ConnectMode connectMode = ConnectMode.ONE_MINUTE;
|
||||
if (refresh) {
|
||||
connectMode = ConnectMode.DEFAULT;
|
||||
}
|
||||
@@ -2328,7 +2321,7 @@ public class NetInterfaceManager {
|
||||
}
|
||||
|
||||
public void getBookMarkBlackWhiteList(boolean refresh, BehaviorSubject<ActivityEvent> lifecycle, onCompleteCallback callback) {
|
||||
ConnectMode connectMode = ConnectMode.ONE_HOUR;
|
||||
ConnectMode connectMode = ConnectMode.ONE_MINUTE;
|
||||
if (refresh) {
|
||||
connectMode = ConnectMode.DEFAULT;
|
||||
}
|
||||
@@ -2585,9 +2578,9 @@ public class NetInterfaceManager {
|
||||
listener.setScreenLockState(false, "");
|
||||
return;
|
||||
}
|
||||
ConnectMode connectMode = ConnectMode.SIX_HOUR;
|
||||
ConnectMode connectMode = ConnectMode.ONE_MINUTE;
|
||||
if (refresh) {
|
||||
connectMode = ConnectMode.ONE_HOUR;
|
||||
connectMode = ConnectMode.DEFAULT;
|
||||
}
|
||||
if (ConnectManager.getInstance().isNeedConnect(UrlAddress.GET_LOCK_SCREEN_STATE, connectMode)) {
|
||||
getScreenLock(lifecycle, listener);
|
||||
@@ -2646,9 +2639,9 @@ public class NetInterfaceManager {
|
||||
}
|
||||
|
||||
public void getAppLimit(boolean refresh, BehaviorSubject<ActivityEvent> lifecycle, onCompleteCallback callback) {
|
||||
ConnectMode connectMode = ConnectMode.HALF_DAY;
|
||||
ConnectMode connectMode = ConnectMode.ONE_MINUTE;
|
||||
if (refresh) {
|
||||
connectMode = ConnectMode.SIX_HOUR;
|
||||
connectMode = ConnectMode.DEFAULT;
|
||||
}
|
||||
if (ConnectManager.getInstance().isNeedConnect(UrlAddress.SET_WHITE_PACKAGE_LIST, connectMode)) {
|
||||
getAppLimit(lifecycle, callback);
|
||||
@@ -2732,9 +2725,9 @@ public class NetInterfaceManager {
|
||||
* 获取所有app详细信息
|
||||
*/
|
||||
public void getAllAppList(boolean refresh, BehaviorSubject<ActivityEvent> lifecycle, onCompleteCallback callback) {
|
||||
ConnectMode connectMode = ConnectMode.ONE_HOUR;
|
||||
ConnectMode connectMode = ConnectMode.ONE_MINUTE;
|
||||
if (refresh) {
|
||||
connectMode = ConnectMode.HALF_HOUR;
|
||||
connectMode = ConnectMode.DEFAULT;
|
||||
}
|
||||
if (ConnectManager.getInstance().isNeedConnect(UrlAddress.GET_ALL_APP, connectMode)) {
|
||||
getAllAppList(lifecycle, callback);
|
||||
@@ -2807,9 +2800,9 @@ public class NetInterfaceManager {
|
||||
|
||||
|
||||
public void getSnTimeControl(boolean refresh, BehaviorSubject<ActivityEvent> lifecycle, onCompleteCallback callback) {
|
||||
ConnectMode connectMode = ConnectMode.SIX_HOUR;
|
||||
ConnectMode connectMode = ConnectMode.ONE_MINUTE;
|
||||
if (refresh) {
|
||||
connectMode = ConnectMode.ONE_HOUR;
|
||||
connectMode = ConnectMode.DEFAULT;
|
||||
}
|
||||
if (ConnectManager.getInstance().isNeedConnect(UrlAddress.GET_SN_TIME_CONTROL, connectMode)) {
|
||||
getSnTimeControl(lifecycle, callback);
|
||||
@@ -2960,9 +2953,9 @@ public class NetInterfaceManager {
|
||||
}
|
||||
|
||||
public void getTopApp(boolean refresh, BehaviorSubject<ActivityEvent> lifecycle, onCompleteCallback callback) {
|
||||
ConnectMode connectMode = ConnectMode.HALF_DAY;
|
||||
ConnectMode connectMode = ConnectMode.ONE_MINUTE;
|
||||
if (refresh) {
|
||||
connectMode = ConnectMode.SIX_HOUR;
|
||||
connectMode = ConnectMode.DEFAULT;
|
||||
}
|
||||
if (ConnectManager.getInstance().isNeedConnect(UrlAddress.GET_TOP_APP_CONTROL, connectMode)) {
|
||||
getTopApp(lifecycle, callback);
|
||||
@@ -3099,7 +3092,7 @@ public class NetInterfaceManager {
|
||||
}
|
||||
|
||||
public void getPoweroffTime(boolean refresh, BehaviorSubject<ActivityEvent> lifecycle, onCompleteCallback callback) {
|
||||
ConnectMode connectMode = ConnectMode.ONE_HOUR;
|
||||
ConnectMode connectMode = ConnectMode.ONE_MINUTE;
|
||||
if (refresh) {
|
||||
connectMode = ConnectMode.DEFAULT;
|
||||
}
|
||||
@@ -3176,7 +3169,7 @@ public class NetInterfaceManager {
|
||||
|
||||
|
||||
public void getWiFiPasswd(boolean refresh, BehaviorSubject<ActivityEvent> lifecycle, onCompleteCallback callback) {
|
||||
ConnectMode connectMode = ConnectMode.ONE_HOUR;
|
||||
ConnectMode connectMode = ConnectMode.ONE_MINUTE;
|
||||
if (refresh) {
|
||||
connectMode = ConnectMode.DEFAULT;
|
||||
}
|
||||
@@ -3198,21 +3191,18 @@ public class NetInterfaceManager {
|
||||
}
|
||||
|
||||
public void getWiFiPasswd(BehaviorSubject<ActivityEvent> lifecycle, onCompleteCallback callback) {
|
||||
NetInterfaceManager.getInstance()
|
||||
.getWiFiControl()
|
||||
getWiFiControl()
|
||||
.compose(RxLifecycle.bindUntilEvent(lifecycle, ActivityEvent.DESTROY))
|
||||
.subscribe(getWiFiPasswdObserver(callback));
|
||||
}
|
||||
|
||||
public void getWiFiPasswd(onCompleteCallback callback) {
|
||||
NetInterfaceManager.getInstance()
|
||||
.getWiFiControl()
|
||||
getWiFiControl()
|
||||
.subscribe(getWiFiPasswdObserver(callback));
|
||||
}
|
||||
|
||||
public void getWiFiPasswd() {
|
||||
NetInterfaceManager.getInstance()
|
||||
.getWiFiControl()
|
||||
getWiFiControl()
|
||||
.subscribe(getWiFiPasswdObserver(null));
|
||||
}
|
||||
|
||||
@@ -3308,73 +3298,8 @@ public class NetInterfaceManager {
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
public interface PublicIP {
|
||||
void set(String ip);
|
||||
}
|
||||
|
||||
public static final String PublicIP = "PublicIP";
|
||||
|
||||
/**
|
||||
* 获取设备公网IP
|
||||
*
|
||||
* @param publicIP
|
||||
*/
|
||||
private static String IpAddr = "";
|
||||
|
||||
public static void getPublicIP(PublicIP publicIP) {
|
||||
Retrofit retrofit = new Retrofit.Builder()
|
||||
.client(NetInterfaceManager.getInstance().getOkHttpClient())
|
||||
.baseUrl(UrlAddress.SHOUHU_CITYJSON)
|
||||
.addConverterFactory(GsonConverterFactory.create())
|
||||
.addCallAdapterFactory(RxJava3CallAdapterFactory.create())
|
||||
.build();
|
||||
retrofit.create(GetPublicIPApi.class)
|
||||
.getPublicIP()
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(new Observer<ResponseBody>() {
|
||||
@Override
|
||||
public void onSubscribe(Disposable d) {
|
||||
Log.e("getPublicIP", "onSubscribe: ");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onNext(ResponseBody responseBody) {
|
||||
try {
|
||||
String s = responseBody.string();
|
||||
Log.e("getPublicIP", "onNext: " + s);
|
||||
if (!TextUtils.isEmpty(s)) {
|
||||
//var returnCitySN = {"cip": "183.11.74.141", "cid": "440300", "cname": "广东省深圳市"};
|
||||
if (s.contains("{")) {
|
||||
String jsonString = s.substring(s.indexOf("{"), s.lastIndexOf("}") + 1);
|
||||
JsonObject jsonObject = JsonParser.parseString(jsonString).getAsJsonObject();
|
||||
String ip = jsonObject.get("cip").getAsString();
|
||||
if (!TextUtils.isEmpty(ip)) {
|
||||
IpAddr = ip;
|
||||
}
|
||||
}
|
||||
}
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
Log.e("getPublicIP", "IOException: " + e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(Throwable e) {
|
||||
Log.e("getPublicIP", "onError: " + e.getMessage());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onComplete() {
|
||||
Log.e("getPublicIP", "onComplete: ");
|
||||
MMKV.defaultMMKV().encode(NetInterfaceManager.PublicIP, IpAddr);
|
||||
publicIP.set(IpAddr);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
public static final String WHOIS_ADDR = "whois_ip_addr";
|
||||
|
||||
public static void GetWhois() {
|
||||
@@ -3565,4 +3490,53 @@ public class NetInterfaceManager {
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
public static final String WHOIS_IP = "whois_ip_addr";
|
||||
|
||||
public interface PublicIpCallbak {
|
||||
void getPublicIp(String ip);
|
||||
}
|
||||
|
||||
public void getPublicIp(BehaviorSubject<ActivityEvent> lifecycle, PublicIpCallbak callbak) {
|
||||
Retrofit retrofit = new Retrofit.Builder()
|
||||
.client(NetInterfaceManager.getInstance().getOkHttpClient())
|
||||
.baseUrl(UrlAddress.PCONLINE_WHOIS)
|
||||
.addConverterFactory(GsonConverterFactory.create())
|
||||
.addCallAdapterFactory(RxJava3CallAdapterFactory.create())
|
||||
.build();
|
||||
retrofit.create(GetWhoisApi.class)
|
||||
.getWhois(true)
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.compose(RxLifecycle.bindUntilEvent(lifecycle, ActivityEvent.DESTROY))
|
||||
.subscribe(new Observer<WhoisBean>() {
|
||||
@Override
|
||||
public void onSubscribe(@NonNull Disposable d) {
|
||||
Log.e("getPublicIp", "onSubscribe: ");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onNext(@NonNull WhoisBean whoisBean) {
|
||||
Log.e("getPublicIp", "onNext: " + whoisBean);
|
||||
if (whoisBean != null && !TextUtils.isEmpty(whoisBean.getIp())) {
|
||||
callbak.getPublicIp(whoisBean.getIp());
|
||||
MMKV.defaultMMKV().encode(NetInterfaceManager.WHOIS_IP, whoisBean.getIp());
|
||||
} else {
|
||||
callbak.getPublicIp("unknown");
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(@NonNull Throwable e) {
|
||||
Log.e("getPublicIp", "onError: ");
|
||||
callbak.getPublicIp("unknown");
|
||||
onComplete();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onComplete() {
|
||||
Log.e("getPublicIp", "onComplete: ");
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,6 +4,20 @@ package com.aoleyun.sn.network;
|
||||
* @author Administrator
|
||||
*/
|
||||
public class UrlAddress {
|
||||
|
||||
/**
|
||||
* 设备管控信息
|
||||
*/
|
||||
|
||||
/*获取设备锁定状态*/
|
||||
public static final String GET_DEVICES_LOCKED = "lock/index";
|
||||
/*获取设备标签*/
|
||||
public static final String GET_DEVICES_TAGS = "Sn/getSnTag";
|
||||
|
||||
/*获取批次*/
|
||||
@Deprecated
|
||||
public static final String GET_BATCH = "log/getBatch";
|
||||
|
||||
/**
|
||||
* 应用策略相关
|
||||
*/
|
||||
@@ -37,16 +51,8 @@ public class UrlAddress {
|
||||
/*下载接口 根据包名匹配 请求后更新下载次数*/
|
||||
public static final String SEND_DOWNLOAD_TIMES = "count/index";
|
||||
|
||||
/**
|
||||
* 设备相关
|
||||
*/
|
||||
|
||||
/*获取设备锁定状态*/
|
||||
public static final String GET_DEVICES_LOCKED = "lock/index";
|
||||
/*获取设备标签*/
|
||||
public static final String GET_DEVICES_TAGS = "Sn/getSnTag";
|
||||
/*获取批次*/
|
||||
public static final String GET_BATCH = "log/getBatch";
|
||||
|
||||
|
||||
/*上传安装的应用信息*/
|
||||
public static final String UPLOAD_APPINFO = "log/index";
|
||||
@@ -70,6 +76,7 @@ public class UrlAddress {
|
||||
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";
|
||||
|
||||
|
||||
@@ -115,6 +122,11 @@ public class UrlAddress {
|
||||
|
||||
/*开发人员选项开关*/
|
||||
public static final String GET_DEVELOPER = "Sn/getDeveloper";
|
||||
|
||||
/**
|
||||
* log相关
|
||||
*/
|
||||
|
||||
/*获取log任务*/
|
||||
public static final String GET_LOG_ORDER = "And/getSnRunLog";
|
||||
/*上传log文件*/
|
||||
@@ -123,8 +135,7 @@ public class UrlAddress {
|
||||
public static final String UPLOAD_IS_LOG_FILE = "And/sn/uploadIsLogFile";
|
||||
|
||||
|
||||
/*获取公网IP*/
|
||||
public static final String SHOUHU_CITYJSON = "http://pv.sohu.com/cityjson/";
|
||||
|
||||
/*通过ip获取信息*/
|
||||
public static final String PCONLINE_WHOIS = "http://whois.pconline.com.cn/";
|
||||
public static final String WHOIS = "ipJson.jsp";
|
||||
|
||||
@@ -1,19 +0,0 @@
|
||||
package com.aoleyun.sn.network.api;
|
||||
|
||||
import com.aoleyun.sn.network.UrlAddress;
|
||||
|
||||
import io.reactivex.rxjava3.core.Observable;
|
||||
import okhttp3.ResponseBody;
|
||||
import retrofit2.http.GET;
|
||||
|
||||
/**
|
||||
* @author : fanhuitong
|
||||
* e-mail :
|
||||
* @date : 2021/10/1814:39
|
||||
* desc :
|
||||
* version: 1.0
|
||||
*/
|
||||
public interface GetPublicIPApi {
|
||||
@GET(UrlAddress.SHOUHU_CITYJSON)
|
||||
Observable<ResponseBody> getPublicIP();
|
||||
}
|
||||
@@ -3,6 +3,8 @@ package com.aoleyun.sn.network.api.post;
|
||||
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;
|
||||
@@ -12,6 +14,7 @@ public interface NetworkConnectApi {
|
||||
@FormUrlEncoded
|
||||
@POST(UrlAddress.NETWORK_CONNECT)
|
||||
Observable<BaseResponse> sendNetwork(
|
||||
@Field("sn") String sn
|
||||
@Field("sn") String sn,
|
||||
@Field("time") String time
|
||||
);
|
||||
}
|
||||
|
||||
@@ -39,7 +39,11 @@ public class RepeatRequestInterceptor implements Interceptor {
|
||||
// Response copy = response.newBuilder().body(responseBody).build();
|
||||
ResponseBody copy = ResponseBody.create(responseBody.contentType(), content);
|
||||
if (BuildConfig.DEBUG) {
|
||||
Log.e(TAG, "请求体返回:| Response: " + request.url().encodedPath() + "\t body: " + content);
|
||||
if (content.length() < 1024) {
|
||||
Log.e(TAG, "请求体返回:| Response: " + request.url() + "\t body: " + content);
|
||||
}else {
|
||||
Log.e(TAG, "请求体返回:| Response: " + request.url() + "\t body: too long" );
|
||||
}
|
||||
}
|
||||
//相同的请求
|
||||
String requestKey = MD5Util.getUpperMD5Str(request.method() + request.url().toString() + requestBodyToString(request.body()));
|
||||
@@ -83,7 +87,7 @@ public class RepeatRequestInterceptor implements Interceptor {
|
||||
final Request copy = request.newBuilder().build();
|
||||
final Buffer buffer = new Buffer();
|
||||
copy.body().writeTo(buffer);
|
||||
if (buffer.size() > 4096) {
|
||||
if (buffer.size() > 1024) {
|
||||
return "-too long";
|
||||
}
|
||||
return buffer.readUtf8();
|
||||
@@ -96,7 +100,7 @@ public class RepeatRequestInterceptor implements Interceptor {
|
||||
try {
|
||||
final Buffer buffer = new Buffer();
|
||||
body.writeTo(buffer);
|
||||
if (buffer.size() > 4096) {
|
||||
if (buffer.size() > 1024) {
|
||||
return "-too long";
|
||||
}
|
||||
return buffer.readUtf8();
|
||||
|
||||
@@ -96,6 +96,7 @@ public class NewAppReceiver extends BroadcastReceiver {
|
||||
public void onNext(@NonNull String s) {
|
||||
Log.e(TAG, "sendAppInfo: onNext: " + s);
|
||||
JGYUtils.getInstance().checkForceDownload();
|
||||
NetInterfaceManager.getInstance().getAppLimit();
|
||||
NetInterfaceManager.getInstance().getDefaultDesktop();
|
||||
NetInterfaceManager.getInstance().sendInstalledAppInfo(new NetInterfaceManager.onCompleteCallback() {
|
||||
@Override
|
||||
|
||||
@@ -18,6 +18,7 @@ import androidx.annotation.Nullable;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.aoleyun.sn.BuildConfig;
|
||||
import com.aoleyun.sn.utils.JGYUtils;
|
||||
import com.blankj.utilcode.util.NetworkUtils;
|
||||
import com.aoleyun.sn.KeepAliveConnection;
|
||||
import com.aoleyun.sn.utils.ServiceAliveUtils;
|
||||
@@ -46,7 +47,7 @@ public class StepService extends Service implements NetworkUtils.OnNetworkStatus
|
||||
|
||||
@Override
|
||||
public void onConnected(NetworkUtils.NetworkType networkType) {
|
||||
connect();
|
||||
// connect();
|
||||
}
|
||||
|
||||
//用于Activity和service通讯
|
||||
@@ -134,6 +135,7 @@ public class StepService extends Service implements NetworkUtils.OnNetworkStatus
|
||||
case Intent.ACTION_BOOT_COMPLETED:
|
||||
case Intent.ACTION_USER_PRESENT:
|
||||
case Intent.ACTION_SCREEN_ON:
|
||||
mHandler.post(heartBeatRunnable);//开启心跳检测
|
||||
sendMsg(1);
|
||||
break;
|
||||
case Intent.ACTION_SCREEN_OFF:
|
||||
@@ -185,8 +187,9 @@ public class StepService extends Service implements NetworkUtils.OnNetworkStatus
|
||||
Log.i("JWebSocketClientService", "websocket连接关闭");
|
||||
// client.close();
|
||||
// initSocketClient();
|
||||
if (JGYUtils.getInstance().isScreenOn()) {
|
||||
mHandler.postDelayed(heartBeatRunnable, HEART_BEAT_RATE);//开启心跳检测
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -195,8 +198,11 @@ public class StepService extends Service implements NetworkUtils.OnNetworkStatus
|
||||
Log.i("JWebSocketClientService", "websocket连接错误:" + ex.getMessage());
|
||||
// client.close();
|
||||
// initSocketClient();
|
||||
if (JGYUtils.getInstance().isScreenOn()) {
|
||||
mHandler.postDelayed(heartBeatRunnable, HEART_BEAT_RATE);//开启心跳检测
|
||||
|
||||
} else {
|
||||
Log.i("JWebSocketClientService", "postDelayed off");
|
||||
}
|
||||
}
|
||||
};
|
||||
connect();
|
||||
@@ -219,7 +225,6 @@ public class StepService extends Service implements NetworkUtils.OnNetworkStatus
|
||||
}
|
||||
}
|
||||
}.start();
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -285,7 +290,11 @@ public class StepService extends Service implements NetworkUtils.OnNetworkStatus
|
||||
sendMsg();
|
||||
} else if (client.isClosed()) {
|
||||
Log.i("JWebSocketClientService", "websocket重连中");
|
||||
if (JGYUtils.getInstance().isScreenOn()) {
|
||||
reconnectWs();
|
||||
} else {
|
||||
Log.i("JWebSocketClientService", "reconnectWs off");
|
||||
}
|
||||
}
|
||||
} else {
|
||||
//如果client已为空,重新初始化连接
|
||||
@@ -293,7 +302,11 @@ public class StepService extends Service implements NetworkUtils.OnNetworkStatus
|
||||
initSocketClient();
|
||||
}
|
||||
//每隔一定的时间,对长连接进行一次心跳检测
|
||||
if (JGYUtils.getInstance().isScreenOn()) {
|
||||
mHandler.postDelayed(this, HEART_BEAT_RATE);
|
||||
} else {
|
||||
Log.i("JWebSocketClientService", "websocket息屏不重连");
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -3,37 +3,49 @@ package com.aoleyun.sn.service.main;
|
||||
import com.aoleyun.sn.base.BasePresenter;
|
||||
import com.aoleyun.sn.base.BaseView;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class MainSContact {
|
||||
public interface Presenter extends BasePresenter<MainView> {
|
||||
void sendNetwork();
|
||||
/*分支1*/
|
||||
/*获取设备锁定状态*/
|
||||
void getLockedState(String key);
|
||||
void getLockedState();
|
||||
/*设置极光推送标签*/
|
||||
void setPushTags();
|
||||
/*获取设备批次*/
|
||||
void getDeviceBatch();
|
||||
|
||||
|
||||
/*分支2 基本信息*/
|
||||
/*是否第一次联网*/
|
||||
void getFirstConnect();
|
||||
/*获取学生信息*/
|
||||
void getStudesInfo(boolean refresh);
|
||||
void getStudesInfo();
|
||||
|
||||
/*分支3 上传信息*/
|
||||
/*上传联网时间*/
|
||||
void sendNetwork(List<Long> time);
|
||||
/*发送mac地址*/
|
||||
void sendMACAddress();
|
||||
void sendMacAddress();
|
||||
/*更新设备信息*/
|
||||
void updateDeviceInfo();
|
||||
/*上传安装的应用列表*/
|
||||
void sendInstalled();
|
||||
|
||||
/*分支4 获取应用*/
|
||||
/*获取设备信息更新*/
|
||||
void checkAoleyunUpdate();
|
||||
/*获取测试应用更新*/
|
||||
void checkTestUpdate();
|
||||
|
||||
/*分支4 根据SN获取*/
|
||||
/*获取开发者选项*/
|
||||
void getDeveloper();
|
||||
/*获取自定义内置app*/
|
||||
void getRomApp();
|
||||
/*获取屏幕锁状态*/
|
||||
void getScreenLockState();
|
||||
|
||||
|
||||
/*分支5 根据批次获取*/
|
||||
/*获取设备后台设置*/
|
||||
void getSystemSettingBegin();
|
||||
/*获取可被写入的安装包名*/
|
||||
void getAppLimit();
|
||||
/*获取强制下载apk*/
|
||||
@@ -42,16 +54,8 @@ public class MainSContact {
|
||||
void getDefaultDesktop();
|
||||
/*设置开机动画*/
|
||||
void setLogoImg();
|
||||
|
||||
/*分支5 获取管控*/
|
||||
/*获取开发者选项*/
|
||||
void getDeveloper();
|
||||
/*获取设备后台设置*/
|
||||
void getSystemSettingBegin();
|
||||
/*获取所有app详细信息*/
|
||||
void getAllAppList();
|
||||
/*获取自定义内置app*/
|
||||
void getROMApp();
|
||||
/*获取浏览器书签设置管控*/
|
||||
void getBrowserBookmarks();
|
||||
/*设置白名单的url 单独*/
|
||||
@@ -63,11 +67,11 @@ public class MainSContact {
|
||||
/*获取禁用app*/
|
||||
void getSnAppAttr();
|
||||
/*获取第三方应用子页面ID连网限制*/
|
||||
void getAppIDControl();
|
||||
void getAppIdControl();
|
||||
/*获取第三方应用内部网页跳转屏蔽*/
|
||||
void setAppinsideWeb();
|
||||
/*获取系统其他管控设置*/
|
||||
void setSystemSetting();
|
||||
void getSystemSetting();
|
||||
/*获取系统默认程序设置*/
|
||||
void getDefaultApp();
|
||||
/*应用霸屏*/
|
||||
@@ -77,23 +81,16 @@ public class MainSContact {
|
||||
/*获取时间管控*/
|
||||
void getSnTimeControl();
|
||||
/*获取电子书包激活码*/
|
||||
void getEBagCode();
|
||||
void getEbagCode();
|
||||
/*获取wifi密码*/
|
||||
void getWiFiPasswd();
|
||||
|
||||
/*获取屏幕锁状态*/
|
||||
void getScreenLockState();
|
||||
}
|
||||
|
||||
public interface MainView extends BaseView {
|
||||
void sendNetworkFinish();
|
||||
|
||||
/*获取设备锁定状态*/
|
||||
void setLockedState(boolean loocked);
|
||||
/*设置极光推送标签*/
|
||||
void setTagsFinish(boolean noTag);
|
||||
/*获取设备批次结束*/
|
||||
void getDeviceBatchFinish();
|
||||
|
||||
|
||||
/*是否第一次联网*/
|
||||
@@ -101,8 +98,10 @@ public class MainSContact {
|
||||
/*获取学生信息*/
|
||||
void setStudesInfo();
|
||||
|
||||
/*上传联网时间*/
|
||||
void sendNetworkFinish();
|
||||
/*发送mac地址*/
|
||||
void sendMACFinish();
|
||||
void sendMacFinish();
|
||||
/*更新设备信息*/
|
||||
void updateDeviceInfoFinish();
|
||||
/*上传安装的应用列表*/
|
||||
@@ -112,6 +111,15 @@ public class MainSContact {
|
||||
void checkAoleyunUpdateFinish();
|
||||
/*获取测试应用更新*/
|
||||
void checkTestUpdateFinish();
|
||||
/*获取开发者选项结束*/
|
||||
void getDeveloperFinish();
|
||||
/*获取自定义内置app*/
|
||||
void getRomAppFinish();
|
||||
/*设置屏幕锁状态结束*/
|
||||
void setScreenLockStateFinish(boolean locked, String tips);
|
||||
|
||||
/*设置设备后台设置*/
|
||||
void setSystemSetting();
|
||||
/*获取可被写入的安装包名结束*/
|
||||
void getAppLimitFinish();
|
||||
/*获取强制下载apk结束*/
|
||||
@@ -120,15 +128,8 @@ public class MainSContact {
|
||||
void getDefaultDesktopFinish();
|
||||
/*设置开机动画*/
|
||||
void setLogoImgFinish();
|
||||
|
||||
/*获取开发者选项结束*/
|
||||
void getDeveloperFinish();
|
||||
/*设置设备后台设置*/
|
||||
void setSystemSetting();
|
||||
/*获取所有app详细信息*/
|
||||
void getAllAppListFinish();
|
||||
/*获取自定义内置app*/
|
||||
void getROMAppFinish();
|
||||
/*获取浏览器书签设置管控结束*/
|
||||
void getBrowserBookmarksFinish();
|
||||
/*设置白名单的url 单独*/
|
||||
@@ -140,11 +141,11 @@ public class MainSContact {
|
||||
/*获取禁用app*/
|
||||
void getSnAppAttrFinish();
|
||||
/*获取第三方应用子页面ID连网限制结束*/
|
||||
void getAppIDControlFinish();
|
||||
void getAppIdControlFinish();
|
||||
/*获取第三方应用内部网页跳转屏蔽结束*/
|
||||
void setAppinsideWebFinish();
|
||||
/*获取系统其他管控设置结束*/
|
||||
void setSystemSettingFinish();
|
||||
void getSystemSettingFinish();
|
||||
/*获取系统默认程序设置*/
|
||||
void setDefaultAppFinish();
|
||||
/*获取应用霸屏结束*/
|
||||
@@ -154,11 +155,9 @@ public class MainSContact {
|
||||
/*获取时间管控*/
|
||||
void getSnTimeControlFinish();
|
||||
/*获取电子书包激活码*/
|
||||
void getEBagCodeFinish();
|
||||
void getEbagCodeFinish();
|
||||
/*获取wifi密码结束*/
|
||||
void setWiFiPasswd();
|
||||
|
||||
/*设置屏幕锁状态结束*/
|
||||
void setScreenLockStateFinish(boolean locked, String tips);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,6 +3,7 @@ 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 com.aoleyun.sn.bean.BaseResponse;
|
||||
@@ -11,17 +12,17 @@ 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.ToastUtil;
|
||||
import com.aoleyun.sn.utils.URLUtils;
|
||||
import com.aoleyun.sn.utils.Utils;
|
||||
import com.arialyy.aria.orm.annotation.Ignore;
|
||||
import com.tencent.mmkv.MMKV;
|
||||
import com.trello.rxlifecycle4.RxLifecycle;
|
||||
import com.trello.rxlifecycle4.android.ActivityEvent;
|
||||
|
||||
import java.util.Set;
|
||||
import java.util.List;
|
||||
|
||||
import io.reactivex.rxjava3.annotations.NonNull;
|
||||
import io.reactivex.rxjava3.core.Observer;
|
||||
@@ -69,59 +70,18 @@ public class MainSPresenter implements MainSContact.Presenter {
|
||||
this.mView = null;
|
||||
}
|
||||
|
||||
private boolean requesting = false;
|
||||
|
||||
public boolean isRequesting() {
|
||||
return requesting;
|
||||
}
|
||||
|
||||
public void setRequesting(boolean requesting) {
|
||||
this.requesting = requesting;
|
||||
}
|
||||
|
||||
public long responseTime;
|
||||
|
||||
@Override
|
||||
public void sendNetwork() {
|
||||
NetInterfaceManager.getInstance().GetNetworkConnectControl()
|
||||
.compose(RxLifecycle.bindUntilEvent(lifecycle, ActivityEvent.DESTROY))
|
||||
.subscribe(new Observer<BaseResponse>() {
|
||||
@Override
|
||||
public void onSubscribe(@NonNull Disposable d) {
|
||||
Log.e("sendNetwork", "onSubscribe: ");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onNext(@NonNull BaseResponse baseResponse) {
|
||||
Log.e("sendNetwork", "onNext: " + baseResponse);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(@NonNull Throwable e) {
|
||||
Log.e("sendNetwork", "onError: ");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onComplete() {
|
||||
Log.e("sendNetwork", "onComplete: ");
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 1
|
||||
*/
|
||||
@Override
|
||||
public void getLockedState(String key) {
|
||||
Log.e(TAG, "getLockedState: " + key);
|
||||
public void getLockedState() {
|
||||
Log.e(TAG, "getLockedState: ");
|
||||
if (JGYUtils.getInstance().isAihuaFramwwork()) {
|
||||
int aihuaUnlock = Settings.System.getInt(mContext.getContentResolver(), CommonConfig.AIHUA_UNLOCK, 0);
|
||||
if (aihuaUnlock == 1) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
requesting = true;
|
||||
responseTime = System.currentTimeMillis();
|
||||
NetInterfaceManager.getInstance()
|
||||
.getLockedState(getLifecycle(), new NetInterfaceManager.onCompleteCallback() {
|
||||
@Override
|
||||
@@ -129,30 +89,31 @@ 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);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void setPushTags() {
|
||||
Set tagSets = mMMKV.decodeStringSet(CommonConfig.DEVICES_TAG + "pushset");
|
||||
NetInterfaceManager.getInstance().setPushTags(false, getLifecycle(), new NetInterfaceManager.PushTagCallback() {
|
||||
@Override
|
||||
public void setPushTag(String tag) {
|
||||
mView.setTagsFinish(TextUtils.isEmpty(tag));
|
||||
}
|
||||
});
|
||||
String tagSets = mMMKV.decodeString(CommonConfig.DEVICES_TAG);
|
||||
Log.e("setPushTags", "onComplete: tagSets =" + tagSets);
|
||||
String tags = cacheHelper.getAsString(CommonConfig.DEVICES_TAG);
|
||||
String tags = cacheHelper.getAsString(UrlAddress.GET_DEVICES_TAGS);
|
||||
Log.e("setPushTags", "onComplete: tags = " + tags);
|
||||
mView.setTagsFinish(tagSets == null || tagSets.size() < 2);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void getDeviceBatch() {
|
||||
int locked = Settings.System.getInt(mContext.getContentResolver(), JGYActions.ACTION_QCH_UNLOCK_IPAD, 0);
|
||||
Log.e(TAG, "getDeviceBatch: " + locked);
|
||||
if (locked == 0) {
|
||||
JGYUtils.getInstance().deleteOtherApp();
|
||||
mView.getDeviceBatchFinish();
|
||||
}
|
||||
}
|
||||
/*
|
||||
* 2
|
||||
*/
|
||||
|
||||
/**
|
||||
* 第一次连接
|
||||
@@ -164,15 +125,11 @@ public class MainSPresenter implements MainSContact.Presenter {
|
||||
mView.setFirstConnect(first == 0);
|
||||
}
|
||||
|
||||
/**
|
||||
* 2
|
||||
*/
|
||||
|
||||
/**
|
||||
* 通过sn获取用户信息
|
||||
*/
|
||||
@Override
|
||||
public void getStudesInfo(boolean refresh) {
|
||||
public void getStudesInfo() {
|
||||
NetInterfaceManager.getInstance().getStudesInfo(false, getLifecycle(), new NetInterfaceManager.StudesInfoListener() {
|
||||
@Override
|
||||
public void setStudentsInfo(StudentsInfo studentsInfo) {
|
||||
@@ -186,16 +143,54 @@ public class MainSPresenter implements MainSContact.Presenter {
|
||||
});
|
||||
}
|
||||
|
||||
@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())
|
||||
.compose(RxLifecycle.bindUntilEvent(lifecycle, ActivityEvent.DESTROY))
|
||||
.subscribe(new Observer<BaseResponse>() {
|
||||
@Override
|
||||
public void onSubscribe(@NonNull Disposable d) {
|
||||
Log.e("sendNetwork", "onSubscribe: ");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onNext(@NonNull BaseResponse baseResponse) {
|
||||
Log.e("sendNetwork", "onNext: " + baseResponse);
|
||||
if (baseResponse.code == 200) {
|
||||
JGYUtils.getInstance().removeNetworkConnectedTime(time);
|
||||
} else {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(@NonNull Throwable e) {
|
||||
Log.e("sendNetwork", "onError: ");
|
||||
onComplete();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onComplete() {
|
||||
Log.e("sendNetwork", "onComplete: ");
|
||||
mView.sendNetworkFinish();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 3
|
||||
*/
|
||||
|
||||
@Override
|
||||
public void sendMACAddress() {
|
||||
public void sendMacAddress() {
|
||||
NetInterfaceManager.getInstance().sendMACAddress(true, getLifecycle(), new NetInterfaceManager.onCompleteCallback() {
|
||||
@Override
|
||||
public void onComplete() {
|
||||
mView.sendMACFinish();
|
||||
mView.sendMacFinish();
|
||||
}
|
||||
});
|
||||
}
|
||||
@@ -226,7 +221,6 @@ public class MainSPresenter implements MainSContact.Presenter {
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 4
|
||||
*/
|
||||
@@ -240,9 +234,9 @@ public class MainSPresenter implements MainSContact.Presenter {
|
||||
mView.checkAoleyunUpdateFinish();
|
||||
}
|
||||
});
|
||||
// mView.checkAoleyunUpdateFinish();
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void checkTestUpdate() {
|
||||
NetInterfaceManager.getInstance()
|
||||
@@ -254,6 +248,51 @@ public class MainSPresenter implements MainSContact.Presenter {
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 5
|
||||
*/
|
||||
@Override
|
||||
public void getDeveloper() {
|
||||
NetInterfaceManager.getInstance()
|
||||
.getDeveloper(true, 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() {
|
||||
@Override
|
||||
public void onComplete() {
|
||||
mView.getRomAppFinish();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
public void getScreenLockState() {
|
||||
NetInterfaceManager.getInstance().getScreenLockState(true, getLifecycle(), new NetInterfaceManager.ScreenLockStateListener() {
|
||||
@Override
|
||||
public void setScreenLockState(boolean locked, String tips) {
|
||||
mView.setScreenLockStateFinish(locked, tips);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
public void getSystemSettingBegin() {
|
||||
//重置设备
|
||||
JGYUtils.getInstance().resetDevice();
|
||||
ToastUtil.betaShow("开始获取管控");
|
||||
mView.setSystemSetting();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void getAppLimit() {
|
||||
NetInterfaceManager.getInstance()
|
||||
@@ -312,29 +351,6 @@ public class MainSPresenter implements MainSContact.Presenter {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 5
|
||||
*/
|
||||
@Override
|
||||
public void getDeveloper() {
|
||||
NetInterfaceManager.getInstance()
|
||||
.getDeveloper(true, getLifecycle(), new NetInterfaceManager.onCompleteCallback() {
|
||||
@Override
|
||||
public void onComplete() {
|
||||
mView.getDeveloperFinish();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
public void getSystemSettingBegin() {
|
||||
//重置设备
|
||||
JGYUtils.getInstance().resetDevice();
|
||||
ToastUtil.betaShow("开始获取管控");
|
||||
mView.setSystemSetting();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void getAllAppList() {
|
||||
NetInterfaceManager.getInstance()
|
||||
@@ -346,19 +362,6 @@ public class MainSPresenter implements MainSContact.Presenter {
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
public void getROMApp() {
|
||||
String customVersion = Utils.getCustomVersion();
|
||||
Log.e(TAG, "getROMApp: " + customVersion);
|
||||
NetInterfaceManager.getInstance()
|
||||
.getCustomROMApp(true, getLifecycle(), new NetInterfaceManager.onCompleteCallback() {
|
||||
@Override
|
||||
public void onComplete() {
|
||||
mView.getROMAppFinish();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
public void getBrowserBookmarks() {
|
||||
NetInterfaceManager.getInstance()
|
||||
@@ -411,12 +414,12 @@ public class MainSPresenter implements MainSContact.Presenter {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void getAppIDControl() {
|
||||
public void getAppIdControl() {
|
||||
NetInterfaceManager.getInstance()
|
||||
.getAppIDControl(true, getLifecycle(), new NetInterfaceManager.onCompleteCallback() {
|
||||
@Override
|
||||
public void onComplete() {
|
||||
mView.getAppIDControlFinish();
|
||||
mView.getAppIdControlFinish();
|
||||
}
|
||||
});
|
||||
}
|
||||
@@ -436,12 +439,12 @@ public class MainSPresenter implements MainSContact.Presenter {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setSystemSetting() {
|
||||
public void getSystemSetting() {
|
||||
NetInterfaceManager.getInstance()
|
||||
.setSystemSetting(true, getLifecycle(), new NetInterfaceManager.onCompleteCallback() {
|
||||
@Override
|
||||
public void onComplete() {
|
||||
mView.setSystemSettingFinish();
|
||||
mView.getSystemSettingFinish();
|
||||
}
|
||||
});
|
||||
}
|
||||
@@ -499,17 +502,16 @@ public class MainSPresenter implements MainSContact.Presenter {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void getEBagCode() {
|
||||
public void getEbagCode() {
|
||||
NetInterfaceManager.getInstance()
|
||||
.getEBagCode(true, getLifecycle(), new NetInterfaceManager.onCompleteCallback() {
|
||||
@Override
|
||||
public void onComplete() {
|
||||
mView.getEBagCodeFinish();
|
||||
mView.getEbagCodeFinish();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void getWiFiPasswd() {
|
||||
NetInterfaceManager.getInstance()
|
||||
@@ -520,14 +522,4 @@ public class MainSPresenter implements MainSContact.Presenter {
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
public void getScreenLockState() {
|
||||
NetInterfaceManager.getInstance().getScreenLockState(true, getLifecycle(), new NetInterfaceManager.ScreenLockStateListener() {
|
||||
@Override
|
||||
public void setScreenLockState(boolean locked, String tips) {
|
||||
mView.setScreenLockStateFinish(locked, tips);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -43,7 +43,6 @@ import com.aoleyun.sn.bean.PoweroffBean;
|
||||
import com.aoleyun.sn.comm.CommonConfig;
|
||||
import com.aoleyun.sn.comm.JGYActions;
|
||||
import com.aoleyun.sn.comm.PackageNames;
|
||||
import com.aoleyun.sn.manager.ConnectManager;
|
||||
import com.aoleyun.sn.network.NetInterfaceManager;
|
||||
import com.aoleyun.sn.rlog.LogDBManager;
|
||||
import com.aoleyun.sn.utils.ApkUtils;
|
||||
@@ -76,6 +75,7 @@ import java.util.Arrays;
|
||||
import java.util.Date;
|
||||
import java.util.HashSet;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
import io.reactivex.rxjava3.core.Observable;
|
||||
@@ -103,23 +103,15 @@ public class MainService extends Service implements MainSContact.MainView, Netwo
|
||||
Aria.download(this).resumeAllTask();
|
||||
String WiFiAlias = Utils.getWifiAlias(this);
|
||||
Log.e("OnNetworkStatusChanged", "onConnected: " + WiFiAlias);
|
||||
|
||||
JGYUtils.getInstance().addNetworkConnectedTime(System.currentTimeMillis() / 1000);
|
||||
if (JGYUtils.getInstance().isScreenOn()) {
|
||||
TimeTask task = new TimeTask();
|
||||
task.execute("ntp.aliyun.com");
|
||||
if (!checkAoleyunApp()) {
|
||||
mPresenter.checkAoleyunUpdate();
|
||||
}
|
||||
Utils.getPublicIP(this);
|
||||
TimeTask task = new TimeTask();
|
||||
task.execute("ntp.aliyun.com");
|
||||
mPresenter.sendNetwork();
|
||||
if (JGYUtils.getInstance().isScreenOn()) {
|
||||
mPresenter.getLockedState("onConnected");
|
||||
mPresenter.getLockedState();
|
||||
}
|
||||
// if (mMMKV.decodeInt(CommonConfig.DEVICES_FRIST_START, 1) == 1) {
|
||||
// Intent intent = new Intent(this, CheckNetActivity.class);
|
||||
// intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
|
||||
// startActivity(intent);
|
||||
// }
|
||||
|
||||
}
|
||||
|
||||
private class TimeTask extends AsyncTask<String, Long, Long> {
|
||||
@@ -150,18 +142,13 @@ public class MainService extends Service implements MainSContact.MainView, Netwo
|
||||
public void onSuccess(Object data, int flag) {
|
||||
//token在设备卸载重装的时候有可能会变
|
||||
Log.e("TPush", "注册成功,设备token为:" + data);
|
||||
|
||||
List<XGPushManager.AccountInfo> accountInfoList = new ArrayList<>();
|
||||
accountInfoList.add(new XGPushManager.AccountInfo(XGPushManager.AccountType.CUSTOM.getValue(), Utils.getSerial(MainService.this)));
|
||||
XGPushManager.upsertAccounts(MainService.this, accountInfoList, new XGIOperateCallback() {
|
||||
@Override
|
||||
public void onSuccess(Object data, int flag) {
|
||||
Log.e("TPush", "onSuccess, data:" + data + ", flag:" + flag);
|
||||
NetInterfaceManager.getInstance().setPushTags(false, lifecycleSubject, new NetInterfaceManager.onCompleteCallback() {
|
||||
@Override
|
||||
public void onComplete() {
|
||||
Log.e("TimeTask", "onComplete: ");
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -169,6 +156,28 @@ public class MainService extends Service implements MainSContact.MainView, Netwo
|
||||
Log.e("TPush", "onFail, data:" + data + ", code:" + errCode + ", msg:" + msg);
|
||||
}
|
||||
});
|
||||
NetInterfaceManager.getInstance().setPushTags(false, lifecycleSubject, new NetInterfaceManager.PushTagCallback() {
|
||||
@Override
|
||||
public void setPushTag(String tag) {
|
||||
Set<String> tagSets = new HashSet<>();
|
||||
if (!TextUtils.isEmpty(tag)) {
|
||||
tagSets.add(tag);
|
||||
}
|
||||
JGYUtils.getInstance().getAppPlatform(new JGYUtils.GetAppPlatformCallback() {
|
||||
@Override
|
||||
public void AppPlatform(int platform) {
|
||||
if (platform == JGYUtils.MTKPlatform) {
|
||||
tagSets.add(JGYUtils.MTKTag);
|
||||
} else if (platform == JGYUtils.ZhanruiPlatform) {
|
||||
tagSets.add(JGYUtils.ZhanruiTag);
|
||||
} else if (platform == JGYUtils.CubePlatform) {
|
||||
tagSets.add(JGYUtils.CubeTag);
|
||||
}
|
||||
}
|
||||
});
|
||||
NetInterfaceManager.getInstance().clearAndAppendTags(tagSets);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -282,7 +291,41 @@ public class MainService extends Service implements MainSContact.MainView, Netwo
|
||||
String action = intent.getAction();
|
||||
Log.e("RefreshReceiver", "onReceive: " + action);
|
||||
if (!TextUtils.isEmpty(action)) {
|
||||
mPresenter.getLockedState("refresh");
|
||||
mPresenter.getLockedState();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private ScreenLockReceiver screenLockReceiver;
|
||||
|
||||
private void registerScreenLockReceiver() {
|
||||
if (null == screenLockReceiver) {
|
||||
screenLockReceiver = new ScreenLockReceiver();
|
||||
}
|
||||
IntentFilter filter = new IntentFilter();
|
||||
filter.setPriority(IntentFilter.SYSTEM_HIGH_PRIORITY);
|
||||
filter.addAction(Intent.ACTION_SCREEN_ON);
|
||||
filter.addAction(Intent.ACTION_SCREEN_OFF);
|
||||
registerReceiver(screenLockReceiver, filter);
|
||||
}
|
||||
|
||||
private class ScreenLockReceiver extends BroadcastReceiver {
|
||||
@Override
|
||||
public void onReceive(Context context, Intent intent) {
|
||||
String action = intent.getAction();
|
||||
Log.e(TAG, "onReceive:" + action);
|
||||
if (TextUtils.isEmpty(action)) {
|
||||
Log.e(TAG, "onReceive: is NULL");
|
||||
return;
|
||||
}
|
||||
switch (action) {
|
||||
case Intent.ACTION_SCREEN_ON:
|
||||
mPresenter.sendNetwork(JGYUtils.getInstance().getNetworkConnectedTime());
|
||||
break;
|
||||
case Intent.ACTION_SCREEN_OFF:
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -312,10 +355,9 @@ public class MainService extends Service implements MainSContact.MainView, Netwo
|
||||
mPresenter = new MainSPresenter(this);
|
||||
mPresenter.attachView(this);
|
||||
mPresenter.setLifecycle(lifecycleSubject);
|
||||
|
||||
TimeTask task = new TimeTask();
|
||||
task.execute("ntp.aliyun.com");
|
||||
mPresenter.getLockedState("onCreate");
|
||||
mPresenter.getLockedState();
|
||||
|
||||
//根据要求卸载这两个应用
|
||||
if (!JGYUtils.getInstance().getDeviceIsLocked()) {
|
||||
@@ -454,6 +496,7 @@ public class MainService extends Service implements MainSContact.MainView, Netwo
|
||||
registerTimeReceiver();
|
||||
registerInstallReceiver();
|
||||
registerRefreshReceiver();
|
||||
registerScreenLockReceiver();
|
||||
}
|
||||
|
||||
private void unRegisterReceivers() {
|
||||
@@ -472,6 +515,9 @@ public class MainService extends Service implements MainSContact.MainView, Netwo
|
||||
if (null != mRefreshReceiver) {
|
||||
unregisterReceiver(mRefreshReceiver);
|
||||
}
|
||||
if (null != screenLockReceiver) {
|
||||
unregisterReceiver(screenLockReceiver);
|
||||
}
|
||||
}
|
||||
|
||||
private static WindowManager windowManager;
|
||||
@@ -506,7 +552,7 @@ public class MainService extends Service implements MainSContact.MainView, Netwo
|
||||
TextView textView = topView.findViewById(R.id.textView);
|
||||
textView.setText(name);
|
||||
} else {
|
||||
if (topView.getTag().equals("added")) {
|
||||
if ("added".equals(topView.getTag())) {
|
||||
TextView textView = topView.findViewById(R.id.textView);
|
||||
textView.setText(name);
|
||||
return;
|
||||
@@ -665,7 +711,7 @@ public class MainService extends Service implements MainSContact.MainView, Netwo
|
||||
setFloatingWindow();
|
||||
} else if (ACTION_UPDATE.equals(intent.getAction())) {
|
||||
setFloatingWindow();
|
||||
mPresenter.getScreenLockState();
|
||||
// mPresenter.getScreenLockState();
|
||||
Log.e("TimeChangedReceiver", "onReceive:" + "date update");
|
||||
}
|
||||
timeChangedStart.onstar(System.currentTimeMillis());
|
||||
@@ -712,6 +758,40 @@ public class MainService extends Service implements MainSContact.MainView, Netwo
|
||||
}
|
||||
}
|
||||
|
||||
synchronized private void setFloatingWindow() {
|
||||
Log.e(TAG, "setFloatingWindow: ");
|
||||
long nowTime = System.currentTimeMillis();
|
||||
mTopApp.open(nowTime);
|
||||
// ForegroundAppUtil.openTopApp(MainService.this);
|
||||
TimeUtils.ContralTime contralTime = TimeUtils.getDefaltContralTime(this);
|
||||
Log.e(TAG, "setFloatingWindow: " + contralTime);
|
||||
Log.e(TAG, "setFloatingWindow: screenlocked: " + screenlocked);
|
||||
if (null != contralTime) {
|
||||
if (contralTime.inControlTime(nowTime)) {
|
||||
Log.e(TAG, "setFloatingWindow: " + "inControlTime is true");
|
||||
if (!screenlocked) {
|
||||
showFloatingWindow("设备可用时间:" + contralTime.toString());
|
||||
} else {
|
||||
TextView textView = topView.findViewById(R.id.textView);
|
||||
textView.setText("设备可用时间:" + contralTime.toString());
|
||||
}
|
||||
timelocked = true;
|
||||
} else {
|
||||
Log.e(TAG, "setFloatingWindow: " + "inControlTime is false");
|
||||
if (!screenlocked) {
|
||||
hideFloatingWindow();
|
||||
}
|
||||
timelocked = false;
|
||||
}
|
||||
} else {
|
||||
Log.e(TAG, "setFloatingWindow: " + "inControlTime is null");
|
||||
if (!screenlocked) {
|
||||
hideFloatingWindow();
|
||||
}
|
||||
timelocked = false;
|
||||
}
|
||||
}
|
||||
|
||||
private interface TopApp {
|
||||
void open(Long time);
|
||||
}
|
||||
@@ -748,39 +828,6 @@ public class MainService extends Service implements MainSContact.MainView, Netwo
|
||||
}
|
||||
};
|
||||
|
||||
synchronized private void setFloatingWindow() {
|
||||
Log.e(TAG, "setFloatingWindow: ");
|
||||
long nowTime = System.currentTimeMillis();
|
||||
mTopApp.open(nowTime);
|
||||
// ForegroundAppUtil.openTopApp(MainService.this);
|
||||
TimeUtils.ContralTime contralTime = TimeUtils.getDefaltContralTime(this);
|
||||
Log.e(TAG, "setFloatingWindow: " + contralTime);
|
||||
Log.e(TAG, "setFloatingWindow: screenlocked: " + screenlocked);
|
||||
if (null != contralTime) {
|
||||
if (contralTime.inControlTime(nowTime)) {
|
||||
Log.e(TAG, "setFloatingWindow: " + "inControlTime is true");
|
||||
if (!screenlocked) {
|
||||
showFloatingWindow("设备可用时间:" + contralTime.toString());
|
||||
} else {
|
||||
TextView textView = topView.findViewById(R.id.textView);
|
||||
textView.setText("设备可用时间:" + contralTime.toString());
|
||||
}
|
||||
timelocked = true;
|
||||
} else {
|
||||
Log.e(TAG, "setFloatingWindow: " + "inControlTime is false");
|
||||
if (!screenlocked) {
|
||||
hideFloatingWindow();
|
||||
}
|
||||
timelocked = false;
|
||||
}
|
||||
} else {
|
||||
Log.e(TAG, "setFloatingWindow: " + "inControlTime is null");
|
||||
if (!screenlocked) {
|
||||
hideFloatingWindow();
|
||||
}
|
||||
timelocked = false;
|
||||
}
|
||||
}
|
||||
|
||||
private void registerInstallReceiver() {
|
||||
if (mInstallReceiver == null) {
|
||||
@@ -790,12 +837,13 @@ public class MainService extends Service implements MainSContact.MainView, Netwo
|
||||
registerReceiver(mInstallReceiver, intentFilter, INSTALLAPK_PREMISSIONS, null);
|
||||
}
|
||||
|
||||
private String INSTALLAPK_ACTION = "JGY_INSTALLAPK_ACTION";
|
||||
private String INSTALLAPK_PREMISSIONS = "com.aoleyun.sn.permissions.INSTALL_APK";
|
||||
private static final String INSTALLAPK_ACTION = "JGY_INSTALLAPK_ACTION";
|
||||
private static final String INSTALLAPK_PREMISSIONS = "com.aoleyun.sn.permissions.INSTALL_APK";
|
||||
|
||||
private InstallReceiver mInstallReceiver;
|
||||
|
||||
/**
|
||||
* 安装第三方的应用
|
||||
* https://blog.csdn.net/jdsjlzx/article/details/82630113
|
||||
*/
|
||||
class InstallReceiver extends BroadcastReceiver {
|
||||
@@ -843,11 +891,6 @@ public class MainService extends Service implements MainSContact.MainView, Netwo
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void sendNetworkFinish() {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setLockedState(boolean loocked) {
|
||||
Log.e(TAG, "setLockedState: " + loocked);
|
||||
@@ -855,15 +898,16 @@ public class MainService extends Service implements MainSContact.MainView, Netwo
|
||||
ToastUtil.betaShow("设备已上锁");
|
||||
// sendSimpleNotification();
|
||||
mPresenter.setPushTags();
|
||||
mPresenter.getDeveloper();
|
||||
ApkUtils.UninstallAPP(this, "com.joytv.live");
|
||||
ApkUtils.UninstallAPP(this, "com.tencent.android.qqdownloader");
|
||||
} else {
|
||||
ToastUtil.betaShow("设备已解锁");
|
||||
notificationManager.cancel(NotificationID);
|
||||
// notificationManager.cancel(NotificationID);
|
||||
SysSettingUtils.setEnableSetting(this);
|
||||
mPresenter.checkAoleyunUpdate();
|
||||
}
|
||||
mPresenter.sendMacAddress();
|
||||
|
||||
//更新主页锁定状态
|
||||
Intent intent = new Intent(MainActivity.UPDATE_LOCKED_STATUS);
|
||||
sendBroadcast(intent);
|
||||
}
|
||||
@@ -875,14 +919,11 @@ public class MainService extends Service implements MainSContact.MainView, Netwo
|
||||
Log.e(TAG, "setTagsFinish: " + "not set tag");
|
||||
// mPresenter.getStudesInfo(true);
|
||||
} else {
|
||||
mPresenter.getDeviceBatch();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void getDeviceBatchFinish() {
|
||||
mPresenter.getFirstConnect();
|
||||
}
|
||||
mPresenter.getStudesInfo();
|
||||
mPresenter.getDeveloper();
|
||||
}
|
||||
|
||||
/**
|
||||
* 首次使用默认关闭所有功能
|
||||
@@ -896,20 +937,22 @@ public class MainService extends Service implements MainSContact.MainView, Netwo
|
||||
Log.e(TAG, "setDisableSetting: ");
|
||||
//设置系统管控
|
||||
SysSettingUtils.setDisableSetting(this);
|
||||
} else {
|
||||
|
||||
}
|
||||
mPresenter.getStudesInfo(true);
|
||||
mPresenter.getSystemSettingBegin();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setStudesInfo() {
|
||||
Log.e(TAG, "setStudesInfo: " + "基本信息获取完毕");
|
||||
mPresenter.sendMACAddress();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void sendMACFinish() {
|
||||
public void sendNetworkFinish() {
|
||||
Log.e(TAG, "sendNetworkFinish: " );
|
||||
}
|
||||
|
||||
@Override
|
||||
public void sendMacFinish() {
|
||||
mPresenter.updateDeviceInfo();
|
||||
}
|
||||
|
||||
@@ -931,6 +974,40 @@ public class MainService extends Service implements MainSContact.MainView, Netwo
|
||||
|
||||
@Override
|
||||
public void checkTestUpdateFinish() {
|
||||
Log.e(TAG, "checkTestUpdateFinish: ");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void getDeveloperFinish() {
|
||||
mPresenter.getRomApp();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void getRomAppFinish() {
|
||||
mPresenter.getScreenLockState();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setScreenLockStateFinish(boolean locked, String tips) {
|
||||
if (locked) {
|
||||
if (!timelocked) {
|
||||
showFloatingWindow(tips);
|
||||
}
|
||||
screenlocked = true;
|
||||
SPUtils.put(this, "is_screen_lock", true);
|
||||
SPUtils.put(this, "screen_tips", tips);
|
||||
} else {
|
||||
if (!timelocked) {
|
||||
hideFloatingWindow();
|
||||
}
|
||||
screenlocked = false;
|
||||
SPUtils.put(this, "is_screen_lock", false);
|
||||
SPUtils.put(this, "screen_tips", "");
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setSystemSetting() {
|
||||
mPresenter.getAppLimit();
|
||||
}
|
||||
|
||||
@@ -951,28 +1028,11 @@ public class MainService extends Service implements MainSContact.MainView, Netwo
|
||||
|
||||
@Override
|
||||
public void setLogoImgFinish() {
|
||||
mPresenter.setRequesting(false);
|
||||
Log.e(TAG, "setLogoImgFinish: ");
|
||||
Log.e(TAG, "SettingFinish: " + (System.currentTimeMillis() - mPresenter.responseTime) + " ms");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void getDeveloperFinish() {
|
||||
mPresenter.getSystemSettingBegin();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setSystemSetting() {
|
||||
mPresenter.getAllAppList();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void getAllAppListFinish() {
|
||||
mPresenter.getROMApp();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void getROMAppFinish() {
|
||||
mPresenter.getBrowserBookmarks();
|
||||
}
|
||||
|
||||
@@ -998,21 +1058,21 @@ public class MainService extends Service implements MainSContact.MainView, Netwo
|
||||
|
||||
@Override
|
||||
public void getSnAppAttrFinish() {
|
||||
mPresenter.getAppIDControl();
|
||||
mPresenter.getAppIdControl();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void getAppIDControlFinish() {
|
||||
public void getAppIdControlFinish() {
|
||||
mPresenter.setAppinsideWeb();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setAppinsideWebFinish() {
|
||||
mPresenter.setSystemSetting();
|
||||
mPresenter.getSystemSetting();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setSystemSettingFinish() {
|
||||
public void getSystemSettingFinish() {
|
||||
mPresenter.getDefaultApp();
|
||||
}
|
||||
|
||||
@@ -1033,37 +1093,16 @@ public class MainService extends Service implements MainSContact.MainView, Netwo
|
||||
|
||||
@Override
|
||||
public void getSnTimeControlFinish() {
|
||||
mPresenter.getEBagCode();
|
||||
mPresenter.getEbagCode();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void getEBagCodeFinish() {
|
||||
public void getEbagCodeFinish() {
|
||||
mPresenter.getWiFiPasswd();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setWiFiPasswd() {
|
||||
mPresenter.setRequesting(false);
|
||||
Log.e(TAG, "setWiFiPasswd: ");
|
||||
Log.e(TAG, "SettingFinish: " + (System.currentTimeMillis() - mPresenter.responseTime) + " ms");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setScreenLockStateFinish(boolean locked, String tips) {
|
||||
if (locked) {
|
||||
if (!timelocked) {
|
||||
showFloatingWindow(tips);
|
||||
}
|
||||
screenlocked = true;
|
||||
SPUtils.put(this, "is_screen_lock", true);
|
||||
SPUtils.put(this, "screen_tips", tips);
|
||||
} else {
|
||||
if (!timelocked) {
|
||||
hideFloatingWindow();
|
||||
}
|
||||
screenlocked = false;
|
||||
SPUtils.put(this, "is_screen_lock", false);
|
||||
SPUtils.put(this, "screen_tips", "");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -282,7 +282,7 @@ public class AesCbcWithIntegrity {
|
||||
aesCipherForEncryption.init(Cipher.ENCRYPT_MODE, secretKeys.getConfidentialityKey(), new IvParameterSpec(iv));
|
||||
|
||||
/*
|
||||
* Now we get back the IV that will actually be used. Some Android
|
||||
* Now we get bt_return the IV that will actually be used. Some Android
|
||||
* versions do funny stuff w/ the IV, so this is to work around bugs:
|
||||
*/
|
||||
iv = aesCipherForEncryption.getIV();
|
||||
|
||||
@@ -427,7 +427,6 @@ public class ApkUtils {
|
||||
ToastUtil.show("正在安装应用");
|
||||
install(packageInstaller, sessionId, context);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -447,7 +446,6 @@ public class ApkUtils {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@RequiresApi(api = Build.VERSION_CODES.LOLLIPOP)
|
||||
private static int createSession(PackageInstaller packageInstaller, PackageInstaller.SessionParams sessionParams) {
|
||||
int sessionId = -1;
|
||||
|
||||
@@ -51,6 +51,7 @@ import com.aoleyun.sn.comm.CommonConfig;
|
||||
import com.aoleyun.sn.comm.JGYActions;
|
||||
import com.aoleyun.sn.comm.PackageNames;
|
||||
import com.aoleyun.sn.disklrucache.CacheHelper;
|
||||
import com.aoleyun.sn.gson.GsonUtils;
|
||||
import com.aoleyun.sn.network.NetInterfaceManager;
|
||||
import com.aoleyun.sn.network.UrlAddress;
|
||||
import com.aoleyun.sn.receiver.BootReceiver;
|
||||
@@ -94,6 +95,7 @@ import java.util.HashSet;
|
||||
import java.util.LinkedHashSet;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
import java.util.concurrent.Executor;
|
||||
import java.util.function.Consumer;
|
||||
import java.util.function.Predicate;
|
||||
@@ -107,6 +109,7 @@ public class JGYUtils {
|
||||
|
||||
@SuppressLint("StaticFieldLeak")
|
||||
private static JGYUtils sInstance;
|
||||
private MMKV mMMKV = MMKV.defaultMMKV();
|
||||
private Context mContext;
|
||||
private ContentResolver crv;
|
||||
|
||||
@@ -136,6 +139,7 @@ public class JGYUtils {
|
||||
this.mContext = context;
|
||||
this.crv = context.getContentResolver();
|
||||
this.cacheHelper = new CacheHelper(context);
|
||||
initConnectedTimeCache();
|
||||
}
|
||||
|
||||
public static void init(Context context) {
|
||||
@@ -2165,7 +2169,7 @@ public class JGYUtils {
|
||||
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", MMKV.defaultMMKV().decodeString(NetInterfaceManager.PublicIP, ""));
|
||||
jsonObject.addProperty("PN_ip", mMMKV.decodeString(NetInterfaceManager.PublicIP, ""));
|
||||
jsonObject.addProperty("LAN_ip", Utils.getIPAddress(mContext));
|
||||
jsonObject.addProperty("bluetooth", Utils.getBluetoothList());
|
||||
jsonObject.addProperty("wifi_name", Utils.getWifiAlias(mContext));
|
||||
@@ -2370,4 +2374,43 @@ public class JGYUtils {
|
||||
//true为打开,false为关闭
|
||||
return powerManager.isInteractive();
|
||||
}
|
||||
|
||||
private static final String CONNECTED_TIME_KEY = "connectedTimeKey";
|
||||
|
||||
private List<Long> connectedTime;
|
||||
|
||||
private void initConnectedTimeCache() {
|
||||
String jsonString = cacheHelper.getAsString(CONNECTED_TIME_KEY);
|
||||
Gson gson = new Gson();
|
||||
Type listType = new TypeToken<List<Long>>() {
|
||||
}.getType();
|
||||
List<Long> longList = gson.fromJson(jsonString, listType);
|
||||
if (longList == null) {
|
||||
connectedTime = new ArrayList<>();
|
||||
} else {
|
||||
connectedTime = longList;
|
||||
}
|
||||
}
|
||||
|
||||
public List<Long> getNetworkConnectedTime() {
|
||||
Log.e(TAG, "getNetworkConnectedTime: " + connectedTime);
|
||||
return connectedTime;
|
||||
}
|
||||
|
||||
public void addNetworkConnectedTime(Long time) {
|
||||
Log.e(TAG, "addNetworkConnectedTime: " + time);
|
||||
connectedTime.add(time);
|
||||
cacheHelper.put(CONNECTED_TIME_KEY, GsonUtils.toJSONString(connectedTime));
|
||||
}
|
||||
|
||||
public void removeNetworkConnectedTime(List<Long> time) {
|
||||
if (time == null || time.size() == 0) {
|
||||
return;
|
||||
}
|
||||
List<Long> copy = new ArrayList<>(time);
|
||||
for (Long l : copy) {
|
||||
connectedTime.remove(l);
|
||||
}
|
||||
cacheHelper.put(CONNECTED_TIME_KEY, GsonUtils.toJSONString(connectedTime));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -271,7 +271,7 @@ public class StatusBarUtil {
|
||||
decor.setSystemUiVisibility(View.SYSTEM_UI_FLAG_LIGHT_STATUS_BAR);
|
||||
} else {
|
||||
// We want to change tint color to white again.
|
||||
// You can also record the flags in advance so that you can turn UI back completely if
|
||||
// You can also record the flags in advance so that you can turn UI bt_return completely if
|
||||
// you have set other flags before, such as translucent or full screen.
|
||||
decor.setSystemUiVisibility(0);
|
||||
}
|
||||
|
||||
@@ -1755,20 +1755,6 @@ public class Utils {
|
||||
return "获取失败";
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取公网IP并保存
|
||||
*
|
||||
* @param context
|
||||
*/
|
||||
public static void getPublicIP(Context context) {
|
||||
NetInterfaceManager.getPublicIP(new NetInterfaceManager.PublicIP() {
|
||||
@Override
|
||||
public void set(String ip) {
|
||||
Log.e("getPublicIP", "set: " + ip);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取WiFi信号强度
|
||||
*
|
||||
|
||||
|
Before Width: | Height: | Size: 2.0 KiB |
BIN
app/src/main/res/drawable-hdpi/bt_return.png
Normal file
|
After Width: | Height: | Size: 1.9 KiB |
BIN
app/src/main/res/drawable-hdpi/default_head.png
Normal file
|
After Width: | Height: | Size: 21 KiB |
BIN
app/src/main/res/drawable-hdpi/delimiter.png
Normal file
|
After Width: | Height: | Size: 3.5 KiB |
|
Before Width: | Height: | Size: 4.8 KiB |
BIN
app/src/main/res/drawable-hdpi/icon_battery.png
Normal file
|
After Width: | Height: | Size: 2.6 KiB |
BIN
app/src/main/res/drawable-hdpi/icon_ipaddress.png
Normal file
|
After Width: | Height: | Size: 3.4 KiB |
BIN
app/src/main/res/drawable-hdpi/icon_wifi.png
Normal file
|
After Width: | Height: | Size: 3.3 KiB |
BIN
app/src/main/res/drawable-hdpi/more.png
Normal file
|
After Width: | Height: | Size: 476 B |
9
app/src/main/res/drawable/bg_dialog.xml
Normal file
@@ -0,0 +1,9 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<solid android:color="#ffffff" />
|
||||
<stroke
|
||||
android:width="0.8dp"
|
||||
android:color="#ffffff" />
|
||||
<!-- 圆角 -->
|
||||
<corners android:radius="@dimen/dp_10" />
|
||||
</shape>
|
||||
15
app/src/main/res/drawable/bt_activation_normnl.xml
Normal file
@@ -0,0 +1,15 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<!-- 内部颜色 -->
|
||||
<solid android:color="@color/check_update_color" />
|
||||
<!-- 圆角的幅度 -->
|
||||
<corners
|
||||
android:bottomLeftRadius="@dimen/dp_20"
|
||||
android:bottomRightRadius="@dimen/dp_20"
|
||||
android:topLeftRadius="@dimen/dp_20"
|
||||
android:topRightRadius="@dimen/dp_20" />
|
||||
|
||||
<padding
|
||||
android:left="@dimen/dp_10"
|
||||
android:right="@dimen/dp_10" />
|
||||
</shape>
|
||||
15
app/src/main/res/drawable/bt_activation_pressed.xml
Normal file
@@ -0,0 +1,15 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<!-- 内部颜色 -->
|
||||
<solid android:color="@color/check_update_color_pressed" />
|
||||
<!-- 圆角的幅度 -->
|
||||
<corners
|
||||
android:bottomLeftRadius="@dimen/dp_20"
|
||||
android:bottomRightRadius="@dimen/dp_20"
|
||||
android:topLeftRadius="@dimen/dp_20"
|
||||
android:topRightRadius="@dimen/dp_20" />
|
||||
|
||||
<padding
|
||||
android:left="@dimen/dp_10"
|
||||
android:right="@dimen/dp_10" />
|
||||
</shape>
|
||||
13
app/src/main/res/drawable/bt_activation_selector.xml
Normal file
@@ -0,0 +1,13 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<!-- 没有焦点时的背景颜色 -->
|
||||
<item android:drawable="@drawable/bt_activation_normnl" android:state_window_focused="false" />
|
||||
<!-- 非触摸模式下获得焦点并单击时的背景颜色 -->
|
||||
<item android:drawable="@drawable/bt_activation_normnl" android:state_focused="true" android:state_pressed="true" />
|
||||
<!-- 触摸模式下单击时的背景颜色 -->
|
||||
<item android:drawable="@drawable/bt_activation_pressed" android:state_focused="false" android:state_pressed="true" />
|
||||
<!-- 选中时的背景颜色 -->
|
||||
<item android:drawable="@drawable/bt_activation_normnl" android:state_selected="true" />
|
||||
<!-- 获得焦点时的背景 颜色 -->
|
||||
<item android:drawable="@drawable/bt_activation_normnl" android:state_focused="true" />
|
||||
</selector>
|
||||
15
app/src/main/res/drawable/bt_trial.xml
Normal file
@@ -0,0 +1,15 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<!-- 内部颜色 -->
|
||||
<solid android:color="@color/bt_trial_color" />
|
||||
<!-- 圆角的幅度 -->
|
||||
<corners
|
||||
android:bottomLeftRadius="@dimen/dp_20"
|
||||
android:bottomRightRadius="@dimen/dp_20"
|
||||
android:topLeftRadius="@dimen/dp_20"
|
||||
android:topRightRadius="@dimen/dp_20" />
|
||||
|
||||
<padding
|
||||
android:left="@dimen/dp_10"
|
||||
android:right="@dimen/dp_10" />
|
||||
</shape>
|
||||
15
app/src/main/res/drawable/bt_vip.xml
Normal file
@@ -0,0 +1,15 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<!-- 内部颜色 -->
|
||||
<solid android:color="@color/check_update_color" />
|
||||
<!-- 圆角的幅度 -->
|
||||
<corners
|
||||
android:bottomLeftRadius="@dimen/dp_16"
|
||||
android:bottomRightRadius="@dimen/dp_16"
|
||||
android:topLeftRadius="@dimen/dp_16"
|
||||
android:topRightRadius="@dimen/dp_16" />
|
||||
|
||||
<padding
|
||||
android:left="@dimen/dp_8"
|
||||
android:right="@dimen/dp_8" />
|
||||
</shape>
|
||||
24
app/src/main/res/drawable/card_background.xml
Normal file
@@ -0,0 +1,24 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="rectangle">
|
||||
|
||||
<!-- 填充的颜色:这里设置背景透明 -->
|
||||
<solid android:color="#FFFFFF" />
|
||||
<!-- 边框的颜色 :不能和窗口背景色一样 -->
|
||||
|
||||
<!-- 设置按钮的四个角为弧形 -->
|
||||
<!-- android:radius 弧形的半径 -->
|
||||
<corners
|
||||
android:bottomLeftRadius="@dimen/dp_8"
|
||||
android:bottomRightRadius="@dimen/dp_8"
|
||||
android:topLeftRadius="@dimen/dp_8"
|
||||
android:topRightRadius="@dimen/dp_8" />
|
||||
|
||||
<!-- padding:Button里面的文字与Button边界的间隔 -->
|
||||
<!-- <padding-->
|
||||
<!-- android:bottom="10dp"-->
|
||||
<!-- android:left="10dp"-->
|
||||
<!-- android:right="10dp"-->
|
||||
<!-- android:top="10dp" />-->
|
||||
|
||||
</shape>
|
||||
13
app/src/main/res/drawable/join_background.xml
Normal file
@@ -0,0 +1,13 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<!-- 内部颜色 -->
|
||||
<solid android:color="@color/bt_join_background_color" />
|
||||
<!-- 圆角的幅度 -->
|
||||
<corners android:radius="@dimen/dp_16" />
|
||||
|
||||
<!-- <padding-->
|
||||
<!-- android:bottom="0dp"-->
|
||||
<!-- android:left="8dp"-->
|
||||
<!-- android:right="8dp"-->
|
||||
<!-- android:top="0dp" />-->
|
||||
</shape>
|
||||
13
app/src/main/res/drawable/joined_background.xml
Normal file
@@ -0,0 +1,13 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<!-- 内部颜色 -->
|
||||
<solid android:color="@color/bt_joined_background_color" />
|
||||
<!-- 圆角的幅度 -->
|
||||
<corners android:radius="@dimen/dp_16" />
|
||||
|
||||
<!-- <padding-->
|
||||
<!-- android:bottom="0dp"-->
|
||||
<!-- android:left="8dp"-->
|
||||
<!-- android:right="8dp"-->
|
||||
<!-- android:top="0dp" />-->
|
||||
</shape>
|
||||
@@ -8,434 +8,434 @@
|
||||
android:fitsSystemWindows="true"
|
||||
tools:context=".activity.main.MainActivity">
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/bannerLayout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/dp_32"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
<!-- <androidx.constraintlayout.widget.ConstraintLayout-->
|
||||
<!-- android:id="@+id/bannerLayout"-->
|
||||
<!-- android:layout_width="match_parent"-->
|
||||
<!-- android:layout_height="@dimen/dp_32"-->
|
||||
<!-- app:layout_constraintEnd_toEndOf="parent"-->
|
||||
<!-- app:layout_constraintStart_toStartOf="parent"-->
|
||||
<!-- app:layout_constraintTop_toTopOf="parent">-->
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_back"
|
||||
android:layout_width="@dimen/dp_16"
|
||||
android:layout_height="@dimen/dp_16"
|
||||
android:layout_marginLeft="@dimen/dp_16"
|
||||
android:adjustViewBounds="true"
|
||||
android:scaleType="centerCrop"
|
||||
android:src="@drawable/back"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
<!-- <ImageView-->
|
||||
<!-- android:id="@+id/iv_back"-->
|
||||
<!-- android:layout_width="@dimen/dp_16"-->
|
||||
<!-- android:layout_height="@dimen/dp_16"-->
|
||||
<!-- android:layout_marginLeft="@dimen/dp_16"-->
|
||||
<!-- android:adjustViewBounds="true"-->
|
||||
<!-- android:scaleType="centerCrop"-->
|
||||
<!-- android:src="@drawable/bt_return"-->
|
||||
<!-- app:layout_constraintBottom_toBottomOf="parent"-->
|
||||
<!-- app:layout_constraintStart_toStartOf="parent"-->
|
||||
<!-- app:layout_constraintTop_toTopOf="parent" />-->
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_title"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_horizontal"
|
||||
android:text="我的设备"
|
||||
android:textColor="@color/title_textcolor"
|
||||
android:textSize="@dimen/sp_14"
|
||||
android:textStyle="bold"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
<!-- <TextView-->
|
||||
<!-- android:id="@+id/tv_title"-->
|
||||
<!-- android:layout_width="wrap_content"-->
|
||||
<!-- android:layout_height="wrap_content"-->
|
||||
<!-- android:gravity="center_horizontal"-->
|
||||
<!-- android:text="我的设备"-->
|
||||
<!-- android:textColor="@color/title_textcolor"-->
|
||||
<!-- android:textSize="@dimen/sp_14"-->
|
||||
<!-- android:textStyle="bold"-->
|
||||
<!-- app:layout_constraintBottom_toBottomOf="parent"-->
|
||||
<!-- app:layout_constraintEnd_toEndOf="parent"-->
|
||||
<!-- app:layout_constraintStart_toStartOf="parent"-->
|
||||
<!-- app:layout_constraintTop_toTopOf="parent" />-->
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_locked"
|
||||
android:layout_width="@dimen/dp_12"
|
||||
android:layout_height="@dimen/dp_12"
|
||||
android:layout_marginStart="@dimen/dp_8"
|
||||
android:adjustViewBounds="true"
|
||||
android:scaleType="centerCrop"
|
||||
android:src="@drawable/locked"
|
||||
android:visibility="visible"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@+id/tv_title"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:orientation="horizontal"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/bannerLayout">
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_head"
|
||||
android:layout_width="@dimen/dp_100"
|
||||
android:layout_height="@dimen/dp_100"
|
||||
android:adjustViewBounds="true"
|
||||
android:scaleType="fitCenter"
|
||||
android:src="@drawable/head"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintHorizontal_bias="0.502"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintVertical_bias="0.357" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<ScrollView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:fadingEdge="none"
|
||||
android:overScrollMode="never"
|
||||
android:scrollbars="none"
|
||||
app:layout_constraintBottom_toTopOf="@id/tv_customversion"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/iv_head">
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/ll_info"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:layout_marginLeft="@dimen/dp_20"
|
||||
android:layout_marginRight="@dimen/dp_20"
|
||||
android:orientation="vertical"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/tv_batch">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_batch"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:layout_marginTop="8dp"
|
||||
android:layout_marginBottom="8dp"
|
||||
android:text="暂无信息"
|
||||
android:textColor="#000000"
|
||||
android:textSize="@dimen/sp_12"
|
||||
android:visibility="visible"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/iv_head" />
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/dp_30">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_sn"
|
||||
android:layout_width="30dp"
|
||||
android:layout_height="30dp"
|
||||
android:layout_marginStart="4dp"
|
||||
android:adjustViewBounds="true"
|
||||
android:scaleType="centerCrop"
|
||||
android:src="@drawable/main_device"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_sn"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="16dp"
|
||||
android:text="设备SN"
|
||||
android:textColor="#000000"
|
||||
android:textSize="@dimen/sp_12"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@+id/iv_sn"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_devsn"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="设备SN"
|
||||
android:textColor="#000000"
|
||||
android:textSize="@dimen/sp_12"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/tv_sn"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@+id/tv_sn" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/cl_imei"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/dp_30">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_imei"
|
||||
android:layout_width="30dp"
|
||||
android:layout_height="30dp"
|
||||
android:layout_marginStart="4dp"
|
||||
android:adjustViewBounds="true"
|
||||
android:scaleType="centerCrop"
|
||||
android:src="@drawable/main_device"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_imei"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="16dp"
|
||||
android:text="IMEI"
|
||||
android:textColor="#000000"
|
||||
android:textSize="@dimen/sp_12"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@+id/iv_imei"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_imei2"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="IMEI"
|
||||
android:textColor="#000000"
|
||||
android:textSize="@dimen/sp_12"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/tv_imei"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@+id/tv_imei" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/dp_30">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_mac"
|
||||
android:layout_width="30dp"
|
||||
android:layout_height="30dp"
|
||||
android:layout_marginStart="4dp"
|
||||
android:adjustViewBounds="true"
|
||||
android:scaleType="centerCrop"
|
||||
android:src="@drawable/main_mac"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_mac"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="16dp"
|
||||
android:text="MAC地址"
|
||||
android:textColor="#000000"
|
||||
android:textSize="@dimen/sp_12"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@+id/iv_mac"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_devmac"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="MAC地址"
|
||||
android:textColor="#000000"
|
||||
android:textSize="@dimen/sp_12"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/layout_class"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/dp_30"
|
||||
android:visibility="visible">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_class"
|
||||
android:layout_width="30dp"
|
||||
android:layout_height="30dp"
|
||||
android:layout_marginStart="4dp"
|
||||
android:adjustViewBounds="true"
|
||||
android:scaleType="centerCrop"
|
||||
android:src="@drawable/main_grade"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_class_name"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="16dp"
|
||||
android:text="组别"
|
||||
android:textColor="#000000"
|
||||
android:textSize="@dimen/sp_12"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@+id/iv_class"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_class"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="暂无信息"
|
||||
android:textColor="#000000"
|
||||
android:textSize="@dimen/sp_12"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/layout_number"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/dp_30"
|
||||
android:visibility="visible">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_number"
|
||||
android:layout_width="30dp"
|
||||
android:layout_height="30dp"
|
||||
android:layout_marginStart="4dp"
|
||||
android:adjustViewBounds="true"
|
||||
android:scaleType="centerCrop"
|
||||
android:src="@drawable/main_school"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_number_name"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="16dp"
|
||||
android:text="编号"
|
||||
android:textColor="#000000"
|
||||
android:textSize="@dimen/sp_12"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@+id/iv_number"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_number"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="暂无信息"
|
||||
android:textColor="#000000"
|
||||
android:textSize="@dimen/sp_12"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/layout_name"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/dp_30"
|
||||
android:visibility="visible">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_name"
|
||||
android:layout_width="30dp"
|
||||
android:layout_height="30dp"
|
||||
android:layout_marginStart="4dp"
|
||||
android:adjustViewBounds="true"
|
||||
android:scaleType="centerCrop"
|
||||
android:src="@drawable/main_nickname"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="16dp"
|
||||
android:text="姓名"
|
||||
android:textColor="#000000"
|
||||
android:textSize="@dimen/sp_12"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@+id/iv_name"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_name"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="暂无信息"
|
||||
android:textColor="#000000"
|
||||
android:textSize="@dimen/sp_12"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/checkupdate"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/dp_30">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_version"
|
||||
android:layout_width="30dp"
|
||||
android:layout_height="30dp"
|
||||
android:layout_marginStart="4dp"
|
||||
android:adjustViewBounds="true"
|
||||
android:scaleType="centerCrop"
|
||||
android:src="@drawable/main_version"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="16dp"
|
||||
android:text="版本"
|
||||
android:textColor="#000000"
|
||||
android:textSize="@dimen/sp_12"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@+id/iv_version"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/version"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="版本"
|
||||
android:textColor="#000000"
|
||||
android:textSize="@dimen/sp_12"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<Button
|
||||
android:id="@+id/chkupd"
|
||||
android:layout_width="@dimen/dp_200"
|
||||
android:layout_height="@dimen/dp_28"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:layout_marginTop="16dp"
|
||||
android:layout_marginBottom="24dp"
|
||||
android:background="@drawable/bt_checkupdate_selector"
|
||||
android:stateListAnimator="@null"
|
||||
android:text="检查更新"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="@dimen/sp_12"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/ll_info" />
|
||||
</LinearLayout>
|
||||
</ScrollView>
|
||||
</LinearLayout>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_customversion"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginRight="10dp"
|
||||
android:layout_marginBottom="4dp"
|
||||
android:textColor="@color/background_top"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent" />
|
||||
<!-- <ImageView-->
|
||||
<!-- android:id="@+id/iv_locked"-->
|
||||
<!-- android:layout_width="@dimen/dp_12"-->
|
||||
<!-- android:layout_height="@dimen/dp_12"-->
|
||||
<!-- android:layout_marginStart="@dimen/dp_8"-->
|
||||
<!-- android:adjustViewBounds="true"-->
|
||||
<!-- android:scaleType="centerCrop"-->
|
||||
<!-- android:src="@drawable/locked"-->
|
||||
<!-- android:visibility="visible"-->
|
||||
<!-- app:layout_constraintBottom_toBottomOf="parent"-->
|
||||
<!-- app:layout_constraintStart_toEndOf="@+id/tv_title"-->
|
||||
<!-- app:layout_constraintTop_toTopOf="parent" />-->
|
||||
<!-- </androidx.constraintlayout.widget.ConstraintLayout>-->
|
||||
|
||||
<!-- <LinearLayout-->
|
||||
<!-- android:layout_width="match_parent"-->
|
||||
<!-- android:layout_height="0dp"-->
|
||||
<!-- android:orientation="horizontal"-->
|
||||
<!-- app:layout_constraintBottom_toBottomOf="parent"-->
|
||||
<!-- app:layout_constraintEnd_toEndOf="parent"-->
|
||||
<!-- app:layout_constraintStart_toStartOf="parent"-->
|
||||
<!-- app:layout_constraintTop_toBottomOf="@+id/bannerLayout">-->
|
||||
|
||||
<!-- <androidx.constraintlayout.widget.ConstraintLayout-->
|
||||
<!-- android:layout_width="match_parent"-->
|
||||
<!-- android:layout_height="match_parent"-->
|
||||
<!-- android:layout_weight="1">-->
|
||||
|
||||
<!-- <ImageView-->
|
||||
<!-- android:id="@+id/iv_head"-->
|
||||
<!-- android:layout_width="@dimen/dp_100"-->
|
||||
<!-- android:layout_height="@dimen/dp_100"-->
|
||||
<!-- android:adjustViewBounds="true"-->
|
||||
<!-- android:scaleType="fitCenter"-->
|
||||
<!-- android:src="@drawable/default_head"-->
|
||||
<!-- app:layout_constraintBottom_toBottomOf="parent"-->
|
||||
<!-- app:layout_constraintEnd_toEndOf="parent"-->
|
||||
<!-- app:layout_constraintHorizontal_bias="0.502"-->
|
||||
<!-- app:layout_constraintStart_toStartOf="parent"-->
|
||||
<!-- app:layout_constraintTop_toTopOf="parent"-->
|
||||
<!-- app:layout_constraintVertical_bias="0.357" />-->
|
||||
<!-- </androidx.constraintlayout.widget.ConstraintLayout>-->
|
||||
|
||||
<!-- <ScrollView-->
|
||||
<!-- android:layout_width="match_parent"-->
|
||||
<!-- android:layout_height="match_parent"-->
|
||||
<!-- android:layout_weight="1"-->
|
||||
<!-- android:fadingEdge="none"-->
|
||||
<!-- android:overScrollMode="never"-->
|
||||
<!-- android:scrollbars="none"-->
|
||||
<!-- app:layout_constraintBottom_toTopOf="@id/tv_system_version"-->
|
||||
<!-- app:layout_constraintEnd_toEndOf="parent"-->
|
||||
<!-- app:layout_constraintStart_toStartOf="parent"-->
|
||||
<!-- app:layout_constraintTop_toBottomOf="@+id/iv_head">-->
|
||||
|
||||
<!-- <LinearLayout-->
|
||||
<!-- android:id="@+id/ll_info"-->
|
||||
<!-- android:layout_width="match_parent"-->
|
||||
<!-- android:layout_height="wrap_content"-->
|
||||
<!-- android:layout_gravity="center"-->
|
||||
<!-- android:layout_marginLeft="@dimen/dp_20"-->
|
||||
<!-- android:layout_marginRight="@dimen/dp_20"-->
|
||||
<!-- android:orientation="vertical"-->
|
||||
<!-- app:layout_constraintEnd_toEndOf="parent"-->
|
||||
<!-- app:layout_constraintStart_toStartOf="parent"-->
|
||||
<!-- app:layout_constraintTop_toBottomOf="@+id/tv_batch">-->
|
||||
|
||||
<!-- <TextView-->
|
||||
<!-- android:id="@+id/tv_batch"-->
|
||||
<!-- android:layout_width="wrap_content"-->
|
||||
<!-- android:layout_height="wrap_content"-->
|
||||
<!-- android:layout_gravity="center_horizontal"-->
|
||||
<!-- android:layout_marginTop="8dp"-->
|
||||
<!-- android:layout_marginBottom="8dp"-->
|
||||
<!-- android:text="暂无信息"-->
|
||||
<!-- android:textColor="#000000"-->
|
||||
<!-- android:textSize="@dimen/sp_12"-->
|
||||
<!-- android:visibility="visible"-->
|
||||
<!-- app:layout_constraintEnd_toEndOf="parent"-->
|
||||
<!-- app:layout_constraintStart_toStartOf="parent"-->
|
||||
<!-- app:layout_constraintTop_toBottomOf="@+id/iv_head" />-->
|
||||
|
||||
<!-- <androidx.constraintlayout.widget.ConstraintLayout-->
|
||||
<!-- android:layout_width="match_parent"-->
|
||||
<!-- android:layout_height="@dimen/dp_30">-->
|
||||
|
||||
<!-- <ImageView-->
|
||||
<!-- android:id="@+id/iv_sn"-->
|
||||
<!-- android:layout_width="30dp"-->
|
||||
<!-- android:layout_height="30dp"-->
|
||||
<!-- android:layout_marginStart="4dp"-->
|
||||
<!-- android:adjustViewBounds="true"-->
|
||||
<!-- android:scaleType="centerCrop"-->
|
||||
<!-- android:src="@drawable/main_device"-->
|
||||
<!-- app:layout_constraintBottom_toBottomOf="parent"-->
|
||||
<!-- app:layout_constraintStart_toStartOf="parent"-->
|
||||
<!-- app:layout_constraintTop_toTopOf="parent" />-->
|
||||
|
||||
<!-- <TextView-->
|
||||
<!-- android:id="@+id/tv_sn"-->
|
||||
<!-- android:layout_width="wrap_content"-->
|
||||
<!-- android:layout_height="wrap_content"-->
|
||||
<!-- android:layout_marginStart="16dp"-->
|
||||
<!-- android:text="设备SN"-->
|
||||
<!-- android:textColor="#000000"-->
|
||||
<!-- android:textSize="@dimen/sp_12"-->
|
||||
<!-- app:layout_constraintBottom_toBottomOf="parent"-->
|
||||
<!-- app:layout_constraintStart_toEndOf="@+id/iv_sn"-->
|
||||
<!-- app:layout_constraintTop_toTopOf="parent" />-->
|
||||
|
||||
<!-- <TextView-->
|
||||
<!-- android:id="@+id/tv_serial"-->
|
||||
<!-- android:layout_width="wrap_content"-->
|
||||
<!-- android:layout_height="wrap_content"-->
|
||||
<!-- android:text="设备SN"-->
|
||||
<!-- android:textColor="#000000"-->
|
||||
<!-- android:textSize="@dimen/sp_12"-->
|
||||
<!-- app:layout_constraintBottom_toBottomOf="@+id/tv_sn"-->
|
||||
<!-- app:layout_constraintEnd_toEndOf="parent"-->
|
||||
<!-- app:layout_constraintTop_toTopOf="@+id/tv_sn" />-->
|
||||
<!-- </androidx.constraintlayout.widget.ConstraintLayout>-->
|
||||
|
||||
<!-- <androidx.constraintlayout.widget.ConstraintLayout-->
|
||||
<!-- android:id="@+id/cl_imei"-->
|
||||
<!-- android:layout_width="match_parent"-->
|
||||
<!-- android:layout_height="@dimen/dp_30">-->
|
||||
|
||||
<!-- <ImageView-->
|
||||
<!-- android:id="@+id/iv_imei"-->
|
||||
<!-- android:layout_width="30dp"-->
|
||||
<!-- android:layout_height="30dp"-->
|
||||
<!-- android:layout_marginStart="4dp"-->
|
||||
<!-- android:adjustViewBounds="true"-->
|
||||
<!-- android:scaleType="centerCrop"-->
|
||||
<!-- android:src="@drawable/main_device"-->
|
||||
<!-- app:layout_constraintBottom_toBottomOf="parent"-->
|
||||
<!-- app:layout_constraintStart_toStartOf="parent"-->
|
||||
<!-- app:layout_constraintTop_toTopOf="parent" />-->
|
||||
|
||||
<!-- <TextView-->
|
||||
<!-- android:id="@+id/tv_imei1"-->
|
||||
<!-- android:layout_width="wrap_content"-->
|
||||
<!-- android:layout_height="wrap_content"-->
|
||||
<!-- android:layout_marginStart="16dp"-->
|
||||
<!-- android:text="IMEI"-->
|
||||
<!-- android:textColor="#000000"-->
|
||||
<!-- android:textSize="@dimen/sp_12"-->
|
||||
<!-- app:layout_constraintBottom_toBottomOf="parent"-->
|
||||
<!-- app:layout_constraintStart_toEndOf="@+id/iv_imei"-->
|
||||
<!-- app:layout_constraintTop_toTopOf="parent" />-->
|
||||
|
||||
<!-- <TextView-->
|
||||
<!-- android:id="@+id/tv_imei"-->
|
||||
<!-- android:layout_width="wrap_content"-->
|
||||
<!-- android:layout_height="wrap_content"-->
|
||||
<!-- android:text="IMEI"-->
|
||||
<!-- android:textColor="#000000"-->
|
||||
<!-- android:textSize="@dimen/sp_12"-->
|
||||
<!-- app:layout_constraintBottom_toBottomOf="@+id/tv_imei1"-->
|
||||
<!-- app:layout_constraintEnd_toEndOf="parent"-->
|
||||
<!-- app:layout_constraintTop_toTopOf="@+id/tv_imei1" />-->
|
||||
<!-- </androidx.constraintlayout.widget.ConstraintLayout>-->
|
||||
|
||||
<!-- <androidx.constraintlayout.widget.ConstraintLayout-->
|
||||
<!-- android:layout_width="match_parent"-->
|
||||
<!-- android:layout_height="@dimen/dp_30">-->
|
||||
|
||||
<!-- <ImageView-->
|
||||
<!-- android:id="@+id/iv_mac"-->
|
||||
<!-- android:layout_width="30dp"-->
|
||||
<!-- android:layout_height="30dp"-->
|
||||
<!-- android:layout_marginStart="4dp"-->
|
||||
<!-- android:adjustViewBounds="true"-->
|
||||
<!-- android:scaleType="centerCrop"-->
|
||||
<!-- android:src="@drawable/main_mac"-->
|
||||
<!-- app:layout_constraintBottom_toBottomOf="parent"-->
|
||||
<!-- app:layout_constraintStart_toStartOf="parent"-->
|
||||
<!-- app:layout_constraintTop_toTopOf="parent" />-->
|
||||
|
||||
<!-- <TextView-->
|
||||
<!-- android:id="@+id/tv_mac1"-->
|
||||
<!-- android:layout_width="wrap_content"-->
|
||||
<!-- android:layout_height="wrap_content"-->
|
||||
<!-- android:layout_marginStart="16dp"-->
|
||||
<!-- android:text="MAC地址"-->
|
||||
<!-- android:textColor="#000000"-->
|
||||
<!-- android:textSize="@dimen/sp_12"-->
|
||||
<!-- app:layout_constraintBottom_toBottomOf="parent"-->
|
||||
<!-- app:layout_constraintStart_toEndOf="@+id/iv_mac"-->
|
||||
<!-- app:layout_constraintTop_toTopOf="parent" />-->
|
||||
|
||||
<!-- <TextView-->
|
||||
<!-- android:id="@+id/tv_mac"-->
|
||||
<!-- android:layout_width="wrap_content"-->
|
||||
<!-- android:layout_height="wrap_content"-->
|
||||
<!-- android:text="MAC地址"-->
|
||||
<!-- android:textColor="#000000"-->
|
||||
<!-- android:textSize="@dimen/sp_12"-->
|
||||
<!-- app:layout_constraintBottom_toBottomOf="parent"-->
|
||||
<!-- app:layout_constraintEnd_toEndOf="parent"-->
|
||||
<!-- app:layout_constraintTop_toTopOf="parent" />-->
|
||||
<!-- </androidx.constraintlayout.widget.ConstraintLayout>-->
|
||||
|
||||
<!-- <androidx.constraintlayout.widget.ConstraintLayout-->
|
||||
<!-- android:id="@+id/layout_class"-->
|
||||
<!-- android:layout_width="match_parent"-->
|
||||
<!-- android:layout_height="@dimen/dp_30"-->
|
||||
<!-- android:visibility="visible">-->
|
||||
|
||||
<!-- <ImageView-->
|
||||
<!-- android:id="@+id/iv_class"-->
|
||||
<!-- android:layout_width="30dp"-->
|
||||
<!-- android:layout_height="30dp"-->
|
||||
<!-- android:layout_marginStart="4dp"-->
|
||||
<!-- android:adjustViewBounds="true"-->
|
||||
<!-- android:scaleType="centerCrop"-->
|
||||
<!-- android:src="@drawable/main_grade"-->
|
||||
<!-- app:layout_constraintBottom_toBottomOf="parent"-->
|
||||
<!-- app:layout_constraintStart_toStartOf="parent"-->
|
||||
<!-- app:layout_constraintTop_toTopOf="parent" />-->
|
||||
|
||||
<!-- <TextView-->
|
||||
<!-- android:id="@+id/tv_class_name"-->
|
||||
<!-- android:layout_width="wrap_content"-->
|
||||
<!-- android:layout_height="wrap_content"-->
|
||||
<!-- android:layout_marginStart="16dp"-->
|
||||
<!-- android:text="组别"-->
|
||||
<!-- android:textColor="#000000"-->
|
||||
<!-- android:textSize="@dimen/sp_12"-->
|
||||
<!-- app:layout_constraintBottom_toBottomOf="parent"-->
|
||||
<!-- app:layout_constraintStart_toEndOf="@+id/iv_class"-->
|
||||
<!-- app:layout_constraintTop_toTopOf="parent" />-->
|
||||
|
||||
<!-- <TextView-->
|
||||
<!-- android:id="@+id/tv_class"-->
|
||||
<!-- android:layout_width="wrap_content"-->
|
||||
<!-- android:layout_height="wrap_content"-->
|
||||
<!-- android:text="暂无信息"-->
|
||||
<!-- android:textColor="#000000"-->
|
||||
<!-- android:textSize="@dimen/sp_12"-->
|
||||
<!-- app:layout_constraintBottom_toBottomOf="parent"-->
|
||||
<!-- app:layout_constraintEnd_toEndOf="parent"-->
|
||||
<!-- app:layout_constraintTop_toTopOf="parent" />-->
|
||||
<!-- </androidx.constraintlayout.widget.ConstraintLayout>-->
|
||||
|
||||
<!-- <androidx.constraintlayout.widget.ConstraintLayout-->
|
||||
<!-- android:id="@+id/layout_number"-->
|
||||
<!-- android:layout_width="match_parent"-->
|
||||
<!-- android:layout_height="@dimen/dp_30"-->
|
||||
<!-- android:visibility="visible">-->
|
||||
|
||||
<!-- <ImageView-->
|
||||
<!-- android:id="@+id/iv_number"-->
|
||||
<!-- android:layout_width="30dp"-->
|
||||
<!-- android:layout_height="30dp"-->
|
||||
<!-- android:layout_marginStart="4dp"-->
|
||||
<!-- android:adjustViewBounds="true"-->
|
||||
<!-- android:scaleType="centerCrop"-->
|
||||
<!-- android:src="@drawable/main_school"-->
|
||||
<!-- app:layout_constraintBottom_toBottomOf="parent"-->
|
||||
<!-- app:layout_constraintStart_toStartOf="parent"-->
|
||||
<!-- app:layout_constraintTop_toTopOf="parent" />-->
|
||||
|
||||
<!-- <TextView-->
|
||||
<!-- android:id="@+id/tv_number_name"-->
|
||||
<!-- android:layout_width="wrap_content"-->
|
||||
<!-- android:layout_height="wrap_content"-->
|
||||
<!-- android:layout_marginStart="16dp"-->
|
||||
<!-- android:text="编号"-->
|
||||
<!-- android:textColor="#000000"-->
|
||||
<!-- android:textSize="@dimen/sp_12"-->
|
||||
<!-- app:layout_constraintBottom_toBottomOf="parent"-->
|
||||
<!-- app:layout_constraintStart_toEndOf="@+id/iv_number"-->
|
||||
<!-- app:layout_constraintTop_toTopOf="parent" />-->
|
||||
|
||||
<!-- <TextView-->
|
||||
<!-- android:id="@+id/tv_number"-->
|
||||
<!-- android:layout_width="wrap_content"-->
|
||||
<!-- android:layout_height="wrap_content"-->
|
||||
<!-- android:text="暂无信息"-->
|
||||
<!-- android:textColor="#000000"-->
|
||||
<!-- android:textSize="@dimen/sp_12"-->
|
||||
<!-- app:layout_constraintBottom_toBottomOf="parent"-->
|
||||
<!-- app:layout_constraintEnd_toEndOf="parent"-->
|
||||
<!-- app:layout_constraintTop_toTopOf="parent" />-->
|
||||
<!-- </androidx.constraintlayout.widget.ConstraintLayout>-->
|
||||
|
||||
<!-- <androidx.constraintlayout.widget.ConstraintLayout-->
|
||||
<!-- android:id="@+id/layout_name"-->
|
||||
<!-- android:layout_width="match_parent"-->
|
||||
<!-- android:layout_height="@dimen/dp_30"-->
|
||||
<!-- android:visibility="visible">-->
|
||||
|
||||
<!-- <ImageView-->
|
||||
<!-- android:id="@+id/iv_name"-->
|
||||
<!-- android:layout_width="30dp"-->
|
||||
<!-- android:layout_height="30dp"-->
|
||||
<!-- android:layout_marginStart="4dp"-->
|
||||
<!-- android:adjustViewBounds="true"-->
|
||||
<!-- android:scaleType="centerCrop"-->
|
||||
<!-- android:src="@drawable/main_nickname"-->
|
||||
<!-- app:layout_constraintBottom_toBottomOf="parent"-->
|
||||
<!-- app:layout_constraintStart_toStartOf="parent"-->
|
||||
<!-- app:layout_constraintTop_toTopOf="parent" />-->
|
||||
|
||||
<!-- <TextView-->
|
||||
<!-- android:layout_width="wrap_content"-->
|
||||
<!-- android:layout_height="wrap_content"-->
|
||||
<!-- android:layout_marginStart="16dp"-->
|
||||
<!-- android:text="姓名"-->
|
||||
<!-- android:textColor="#000000"-->
|
||||
<!-- android:textSize="@dimen/sp_12"-->
|
||||
<!-- app:layout_constraintBottom_toBottomOf="parent"-->
|
||||
<!-- app:layout_constraintStart_toEndOf="@+id/iv_name"-->
|
||||
<!-- app:layout_constraintTop_toTopOf="parent" />-->
|
||||
|
||||
<!-- <TextView-->
|
||||
<!-- android:id="@+id/tv_name"-->
|
||||
<!-- android:layout_width="wrap_content"-->
|
||||
<!-- android:layout_height="wrap_content"-->
|
||||
<!-- android:text="暂无信息"-->
|
||||
<!-- android:textColor="#000000"-->
|
||||
<!-- android:textSize="@dimen/sp_12"-->
|
||||
<!-- app:layout_constraintBottom_toBottomOf="parent"-->
|
||||
<!-- app:layout_constraintEnd_toEndOf="parent"-->
|
||||
<!-- app:layout_constraintTop_toTopOf="parent" />-->
|
||||
<!-- </androidx.constraintlayout.widget.ConstraintLayout>-->
|
||||
|
||||
<!-- <androidx.constraintlayout.widget.ConstraintLayout-->
|
||||
<!-- android:id="@+id/checkupdate"-->
|
||||
<!-- android:layout_width="match_parent"-->
|
||||
<!-- android:layout_height="@dimen/dp_30">-->
|
||||
|
||||
<!-- <ImageView-->
|
||||
<!-- android:id="@+id/iv_version"-->
|
||||
<!-- android:layout_width="30dp"-->
|
||||
<!-- android:layout_height="30dp"-->
|
||||
<!-- android:layout_marginStart="4dp"-->
|
||||
<!-- android:adjustViewBounds="true"-->
|
||||
<!-- android:scaleType="centerCrop"-->
|
||||
<!-- android:src="@drawable/main_version"-->
|
||||
<!-- app:layout_constraintBottom_toBottomOf="parent"-->
|
||||
<!-- app:layout_constraintStart_toStartOf="parent"-->
|
||||
<!-- app:layout_constraintTop_toTopOf="parent" />-->
|
||||
|
||||
<!-- <TextView-->
|
||||
<!-- android:layout_width="wrap_content"-->
|
||||
<!-- android:layout_height="wrap_content"-->
|
||||
<!-- android:layout_marginStart="16dp"-->
|
||||
<!-- android:text="版本"-->
|
||||
<!-- android:textColor="#000000"-->
|
||||
<!-- android:textSize="@dimen/sp_12"-->
|
||||
<!-- app:layout_constraintBottom_toBottomOf="parent"-->
|
||||
<!-- app:layout_constraintStart_toEndOf="@+id/iv_version"-->
|
||||
<!-- app:layout_constraintTop_toTopOf="parent" />-->
|
||||
|
||||
<!-- <TextView-->
|
||||
<!-- android:id="@+id/tv_version"-->
|
||||
<!-- android:layout_width="wrap_content"-->
|
||||
<!-- android:layout_height="wrap_content"-->
|
||||
<!-- android:text="版本"-->
|
||||
<!-- android:textColor="#000000"-->
|
||||
<!-- android:textSize="@dimen/sp_12"-->
|
||||
<!-- app:layout_constraintBottom_toBottomOf="parent"-->
|
||||
<!-- app:layout_constraintEnd_toEndOf="parent"-->
|
||||
<!-- app:layout_constraintTop_toTopOf="parent" />-->
|
||||
<!-- </androidx.constraintlayout.widget.ConstraintLayout>-->
|
||||
|
||||
<!-- <Button-->
|
||||
<!-- android:id="@+id/chkupd"-->
|
||||
<!-- android:layout_width="@dimen/dp_200"-->
|
||||
<!-- android:layout_height="@dimen/dp_28"-->
|
||||
<!-- android:layout_gravity="center_horizontal"-->
|
||||
<!-- android:layout_marginTop="16dp"-->
|
||||
<!-- android:layout_marginBottom="24dp"-->
|
||||
<!-- android:background="@drawable/bt_checkupdate_selector"-->
|
||||
<!-- android:stateListAnimator="@null"-->
|
||||
<!-- android:text="检查更新"-->
|
||||
<!-- android:textColor="@color/white"-->
|
||||
<!-- android:textSize="@dimen/sp_12"-->
|
||||
<!-- app:layout_constraintEnd_toEndOf="parent"-->
|
||||
<!-- app:layout_constraintStart_toStartOf="parent"-->
|
||||
<!-- app:layout_constraintTop_toBottomOf="@+id/ll_info" />-->
|
||||
<!-- </LinearLayout>-->
|
||||
<!-- </ScrollView>-->
|
||||
<!-- </LinearLayout>-->
|
||||
|
||||
<!-- <TextView-->
|
||||
<!-- android:id="@+id/tv_system_version"-->
|
||||
<!-- android:layout_width="wrap_content"-->
|
||||
<!-- android:layout_height="wrap_content"-->
|
||||
<!-- android:layout_marginRight="10dp"-->
|
||||
<!-- android:layout_marginBottom="4dp"-->
|
||||
<!-- android:textColor="@color/background_top"-->
|
||||
<!-- app:layout_constraintBottom_toBottomOf="parent"-->
|
||||
<!-- app:layout_constraintEnd_toEndOf="parent" />-->
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
@@ -21,7 +21,7 @@
|
||||
android:layout_marginStart="@dimen/dp_8"
|
||||
android:adjustViewBounds="true"
|
||||
android:scaleType="centerCrop"
|
||||
android:src="@drawable/back"
|
||||
android:src="@drawable/bt_return"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
@@ -4,14 +4,13 @@
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="#F4F5F7"
|
||||
android:fitsSystemWindows="true"
|
||||
tools:context=".activity.main.MainActivity">
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/bannerLayout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/dp_32"
|
||||
android:layout_height="@dimen/dp_36"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintHorizontal_bias="0.0"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
@@ -19,13 +18,12 @@
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_back"
|
||||
android:layout_width="@dimen/dp_16"
|
||||
android:layout_height="@dimen/dp_16"
|
||||
android:layout_marginLeft="@dimen/dp_16"
|
||||
android:layout_width="@dimen/dp_28"
|
||||
android:layout_height="@dimen/dp_28"
|
||||
android:layout_marginStart="@dimen/dp_8"
|
||||
android:adjustViewBounds="true"
|
||||
android:scaleType="centerCrop"
|
||||
android:src="@drawable/back"
|
||||
android:visibility="gone"
|
||||
android:src="@drawable/bt_return"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
@@ -34,259 +32,519 @@
|
||||
android:id="@+id/tv_title"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/dp_8"
|
||||
android:gravity="center_horizontal"
|
||||
android:text="我的设备"
|
||||
android:textColor="@color/title_textcolor"
|
||||
android:text="@string/my_device"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="@dimen/sp_14"
|
||||
android:textStyle="bold"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_locked"
|
||||
android:layout_width="@dimen/dp_12"
|
||||
android:layout_height="@dimen/dp_12"
|
||||
android:layout_marginStart="@dimen/dp_8"
|
||||
android:adjustViewBounds="true"
|
||||
android:scaleType="centerCrop"
|
||||
android:src="@drawable/locked"
|
||||
android:visibility="visible"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@+id/tv_title"
|
||||
app:layout_constraintStart_toEndOf="@+id/iv_back"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/version"
|
||||
android:id="@+id/tv_version"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="@dimen/dp_24"
|
||||
android:text="版本"
|
||||
android:textColor="#000000"
|
||||
android:layout_marginEnd="@dimen/dp_8"
|
||||
android:text="@string/unknown"
|
||||
android:textColor="@color/text_gray"
|
||||
android:textSize="@dimen/sp_12"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/ll_info"
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/dp_16"
|
||||
android:layout_marginTop="16dp"
|
||||
android:layout_marginEnd="@dimen/dp_16"
|
||||
android:background="@drawable/background_main"
|
||||
android:orientation="vertical"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintHorizontal_bias="0.5"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
android:layout_height="0dp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/bannerLayout">
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/layout_head"
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/dp_52"
|
||||
android:visibility="visible">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/dp_16"
|
||||
android:text="头像"
|
||||
android:textColor="#000000"
|
||||
android:textSize="@dimen/sp_12"
|
||||
android:layout_height="0dp"
|
||||
android:orientation="vertical"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_marginStart="@dimen/dp_8"
|
||||
android:layout_marginTop="@dimen/dp_8"
|
||||
android:layout_marginEnd="@dimen/dp_8"
|
||||
android:layout_weight="2"
|
||||
android:background="@drawable/card_background">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_head"
|
||||
android:layout_width="@dimen/dp_48"
|
||||
android:layout_height="@dimen/dp_48"
|
||||
android:layout_marginEnd="@dimen/dp_16"
|
||||
android:layout_width="@dimen/dp_40"
|
||||
android:layout_height="@dimen/dp_40"
|
||||
android:layout_marginStart="@dimen/dp_20"
|
||||
android:adjustViewBounds="true"
|
||||
android:scaleType="fitCenter"
|
||||
android:src="@drawable/head"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintVertical_bias="0.096" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<ImageView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="2px"
|
||||
android:layout_marginStart="@dimen/dp_16"
|
||||
android:layout_marginEnd="@dimen/dp_16"
|
||||
android:background="@color/background_top" />
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/layout_batch"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/dp_36"
|
||||
android:visibility="visible">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/dp_16"
|
||||
android:text="批次"
|
||||
android:textColor="#000000"
|
||||
android:textSize="@dimen/sp_12"
|
||||
android:scaleType="centerInside"
|
||||
android:src="@drawable/default_head"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_batch"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="@dimen/dp_16"
|
||||
android:text="暂无信息"
|
||||
android:textColor="#000000"
|
||||
android:textSize="@dimen/sp_12"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/layout_name"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/dp_36"
|
||||
android:visibility="visible">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/constraintLayout"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/dp_16"
|
||||
android:text="姓名"
|
||||
android:textColor="#000000"
|
||||
android:textSize="@dimen/sp_12"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
app:layout_constraintBottom_toBottomOf="@+id/iv_head"
|
||||
app:layout_constraintStart_toEndOf="@+id/iv_head"
|
||||
app:layout_constraintTop_toTopOf="@+id/iv_head">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_name"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="@dimen/dp_16"
|
||||
android:text="暂无信息"
|
||||
android:textColor="#000000"
|
||||
android:text="@string/not_set"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="@dimen/sp_12"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
android:textStyle="bold"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_phone"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="--"
|
||||
android:visibility="gone"
|
||||
android:textColor="@color/text_gray"
|
||||
android:textSize="@dimen/sp_10"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/tv_name" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/layout_number"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/dp_36"
|
||||
android:visibility="visible">
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:maxWidth="@dimen/dp_210"
|
||||
android:layout_marginEnd="@dimen/dp_16"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/constraintLayout5"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_number_name"
|
||||
android:id="@+id/tv_batch"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="批次"
|
||||
android:singleLine="true"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="@dimen/sp_10"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="设备批次"
|
||||
android:textColor="@color/text_gray"
|
||||
android:textSize="@dimen/sp_8"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/tv_batch" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<View
|
||||
android:id="@+id/view"
|
||||
android:layout_width="1px"
|
||||
android:layout_height="@dimen/dp_16"
|
||||
android:background="@color/text_gray"
|
||||
android:layout_marginStart="@dimen/dp_16"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@+id/constraintLayout5" />
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/constraintLayout6"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/dp_16"
|
||||
android:text="编号"
|
||||
android:textColor="#000000"
|
||||
android:textSize="@dimen/sp_12"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
app:layout_constraintStart_toEndOf="@+id/view"
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_number"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="@dimen/dp_16"
|
||||
android:text="暂无信息"
|
||||
android:textColor="#000000"
|
||||
android:textSize="@dimen/sp_12"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
android:text="学号"
|
||||
android:singleLine="true"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="@dimen/sp_10"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/layout_class"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/dp_36"
|
||||
android:visibility="visible">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_class_name"
|
||||
android:id="@+id/textView4"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="我的学号"
|
||||
android:textColor="@color/text_gray"
|
||||
android:textSize="@dimen/sp_8"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/tv_number" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<View
|
||||
android:id="@+id/view2"
|
||||
android:layout_width="1px"
|
||||
android:layout_marginStart="@dimen/dp_16"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
android:layout_height="@dimen/dp_16"
|
||||
android:background="@color/text_gray"
|
||||
app:layout_constraintStart_toEndOf="@+id/constraintLayout6" />
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/dp_16"
|
||||
android:text="组别"
|
||||
android:textColor="#000000"
|
||||
android:textSize="@dimen/sp_12"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
app:layout_constraintStart_toEndOf="@+id/view2"
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_class"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="@dimen/dp_16"
|
||||
android:text="暂无信息"
|
||||
android:textColor="#000000"
|
||||
android:textSize="@dimen/sp_12"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
android:text="班级"
|
||||
android:singleLine="true"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="@dimen/sp_10"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/textView6"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="我的班级"
|
||||
android:textColor="@color/text_gray"
|
||||
android:textSize="@dimen/sp_8"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/tv_class" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/dp_36">
|
||||
android:layout_height="0dp"
|
||||
android:layout_marginStart="@dimen/dp_8"
|
||||
android:layout_marginTop="@dimen/dp_8"
|
||||
android:layout_marginEnd="@dimen/dp_8"
|
||||
android:layout_weight="3"
|
||||
android:background="@drawable/card_background">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_sn"
|
||||
android:id="@+id/textView10"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/dp_16"
|
||||
android:layout_marginStart="@dimen/dp_8"
|
||||
android:layout_marginTop="@dimen/dp_8"
|
||||
android:text="@string/device_data"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="@dimen/sp_10"
|
||||
android:textStyle="bold"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_model"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/dp_8"
|
||||
android:ellipsize="end"
|
||||
android:maxLength="15"
|
||||
android:singleLine="true"
|
||||
android:text="@string/unknown"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="@dimen/sp_10"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/textView10"
|
||||
app:layout_constraintStart_toEndOf="@+id/textView10"
|
||||
app:layout_constraintTop_toTopOf="@+id/textView10" />
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/cl_ota"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="@dimen/dp_8"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/textView10"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@+id/textView10">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_system_version"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:ellipsize="end"
|
||||
android:maxLength="20"
|
||||
android:singleLine="true"
|
||||
android:text="@string/unknown"
|
||||
android:textColor="@color/text_gray"
|
||||
android:textSize="@dimen/sp_10"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toStartOf="@+id/imageView2"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/imageView2"
|
||||
android:layout_width="@dimen/dp_16"
|
||||
android:layout_height="@dimen/dp_16"
|
||||
android:adjustViewBounds="true"
|
||||
android:scaleType="centerInside"
|
||||
android:src="@drawable/more"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_marginTop="@dimen/dp_4"
|
||||
android:orientation="horizontal"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/textView10">
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/imageView3"
|
||||
android:layout_width="@dimen/dp_32"
|
||||
android:layout_height="@dimen/dp_32"
|
||||
android:adjustViewBounds="true"
|
||||
android:scaleType="centerInside"
|
||||
android:src="@drawable/icon_battery"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintHorizontal_bias="0.5"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintVertical_bias="0.3" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_battery"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="电池"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="@dimen/sp_10"
|
||||
app:layout_constraintEnd_toEndOf="@+id/imageView3"
|
||||
app:layout_constraintStart_toStartOf="@+id/imageView3"
|
||||
app:layout_constraintTop_toBottomOf="@+id/imageView3" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_voltage"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="电压"
|
||||
android:textColor="@color/text_gray"
|
||||
android:textSize="@dimen/sp_10"
|
||||
app:layout_constraintEnd_toEndOf="@+id/imageView3"
|
||||
app:layout_constraintStart_toStartOf="@+id/imageView3"
|
||||
app:layout_constraintTop_toBottomOf="@+id/tv_battery" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_wifi"
|
||||
android:layout_width="@dimen/dp_32"
|
||||
android:layout_height="@dimen/dp_32"
|
||||
android:adjustViewBounds="true"
|
||||
android:scaleType="centerInside"
|
||||
android:src="@drawable/icon_wifi"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintHorizontal_bias="0.5"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintVertical_bias="0.3" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_wifi"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="WiFi"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="@dimen/sp_10"
|
||||
app:layout_constraintEnd_toEndOf="@+id/iv_wifi"
|
||||
app:layout_constraintStart_toStartOf="@+id/iv_wifi"
|
||||
app:layout_constraintTop_toBottomOf="@+id/iv_wifi" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_signal"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="信号"
|
||||
android:textColor="@color/text_gray"
|
||||
android:textSize="@dimen/sp_10"
|
||||
app:layout_constraintEnd_toEndOf="@+id/iv_wifi"
|
||||
app:layout_constraintStart_toStartOf="@+id/iv_wifi"
|
||||
app:layout_constraintTop_toBottomOf="@+id/tv_wifi" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_ip"
|
||||
android:layout_width="@dimen/dp_32"
|
||||
android:layout_height="@dimen/dp_32"
|
||||
android:adjustViewBounds="true"
|
||||
android:scaleType="centerInside"
|
||||
android:src="@drawable/icon_ipaddress"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintHorizontal_bias="0.5"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintVertical_bias="0.3" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_ip"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="内网"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="@dimen/sp_10"
|
||||
app:layout_constraintEnd_toEndOf="@+id/iv_ip"
|
||||
app:layout_constraintStart_toStartOf="@+id/iv_ip"
|
||||
app:layout_constraintTop_toBottomOf="@+id/iv_ip" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_public_ip"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="外网"
|
||||
android:textColor="@color/text_gray"
|
||||
android:textSize="@dimen/sp_10"
|
||||
app:layout_constraintEnd_toEndOf="@+id/iv_ip"
|
||||
app:layout_constraintStart_toStartOf="@+id/iv_ip"
|
||||
app:layout_constraintTop_toBottomOf="@+id/tv_ip" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
</LinearLayout>
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_marginStart="@dimen/dp_8"
|
||||
android:layout_marginTop="@dimen/dp_8"
|
||||
android:layout_marginEnd="@dimen/dp_8"
|
||||
android:layout_weight="2"
|
||||
android:background="@drawable/card_background">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical">
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_serial1"
|
||||
android:layout_width="@dimen/dp_20"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/dp_8"
|
||||
android:maxLines="1"
|
||||
android:text="SN"
|
||||
android:textColor="#000000"
|
||||
android:textSize="@dimen/sp_12"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="@dimen/sp_10"
|
||||
android:textStyle="bold"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_devsn"
|
||||
android:id="@+id/tv_serial2"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/dp_8"
|
||||
android:text="序列号"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="@dimen/sp_10"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@+id/tv_serial1"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_serial"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="@dimen/dp_16"
|
||||
android:text="设备SN"
|
||||
android:textColor="#000000"
|
||||
android:textSize="@dimen/sp_12"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/tv_sn"
|
||||
android:ellipsize="end"
|
||||
android:maxLength="30"
|
||||
android:singleLine="true"
|
||||
android:text="@string/unknown"
|
||||
android:textColor="@color/text_gray"
|
||||
android:textSize="@dimen/sp_10"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@+id/tv_sn" />
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<View
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="1px"
|
||||
android:layout_marginEnd="@dimen/dp_8"
|
||||
android:background="@color/text_gray"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="@+id/tv_serial2" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/cl_imei"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/dp_36">
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_imei"
|
||||
android:layout_width="wrap_content"
|
||||
android:id="@+id/tv_imei1"
|
||||
android:layout_width="@dimen/dp_20"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/dp_16"
|
||||
android:layout_marginStart="@dimen/dp_8"
|
||||
android:maxLines="1"
|
||||
android:text="IMEI"
|
||||
android:textColor="#000000"
|
||||
android:textSize="@dimen/sp_12"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="@dimen/sp_10"
|
||||
android:textStyle="bold"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
@@ -295,106 +553,153 @@
|
||||
android:id="@+id/tv_imei2"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/dp_8"
|
||||
android:text="国际移动设备识别码"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="@dimen/sp_10"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@+id/tv_imei1"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_imei"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="@dimen/dp_16"
|
||||
android:text="IMEI"
|
||||
android:textColor="#000000"
|
||||
android:textSize="@dimen/sp_12"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/tv_imei"
|
||||
android:ellipsize="end"
|
||||
android:maxLength="30"
|
||||
android:singleLine="true"
|
||||
android:text="@string/unknown"
|
||||
android:textColor="@color/text_gray"
|
||||
android:textSize="@dimen/sp_10"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@+id/tv_imei" />
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<View
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="1px"
|
||||
android:layout_marginEnd="@dimen/dp_8"
|
||||
android:background="@color/text_gray"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="@+id/tv_imei2" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/dp_36">
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_mac1"
|
||||
android:layout_width="@dimen/dp_20"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/dp_8"
|
||||
android:maxLines="1"
|
||||
android:text="MAC"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="@dimen/sp_10"
|
||||
android:textStyle="bold"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_mac2"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/dp_8"
|
||||
android:text="局域网地址"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="@dimen/sp_10"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@+id/tv_mac1"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_mac"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/dp_16"
|
||||
android:text="MAC"
|
||||
android:textColor="#000000"
|
||||
android:textSize="@dimen/sp_12"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_devmac"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="@dimen/dp_16"
|
||||
android:text="MAC地址"
|
||||
android:textColor="#000000"
|
||||
android:textSize="@dimen/sp_12"
|
||||
android:ellipsize="end"
|
||||
android:maxLength="30"
|
||||
android:singleLine="true"
|
||||
android:text="@string/unknown"
|
||||
android:textColor="@color/text_gray"
|
||||
android:textSize="@dimen/sp_10"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<View
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="1px"
|
||||
android:layout_marginEnd="@dimen/dp_8"
|
||||
android:background="@color/text_gray"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="@+id/tv_mac2" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
</LinearLayout>
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/cl_wifi"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/dp_36">
|
||||
android:layout_height="0dp"
|
||||
android:layout_margin="@dimen/dp_8"
|
||||
android:layout_weight="4"
|
||||
android:background="@drawable/card_background">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_wifi_signal"
|
||||
android:id="@+id/tv_bind_statu"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/dp_16"
|
||||
android:text="WiFi信号"
|
||||
android:textColor="#000000"
|
||||
android:textSize="@dimen/sp_12"
|
||||
android:layout_marginStart="@dimen/dp_8"
|
||||
android:layout_marginTop="@dimen/dp_8"
|
||||
android:text="设备绑定"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="@dimen/sp_10"
|
||||
android:textStyle="bold"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/cl_bind"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/tv_bind_statu">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_qrcode"
|
||||
android:layout_width="@dimen/dp_88"
|
||||
android:layout_height="@dimen/dp_88"
|
||||
android:layout_gravity="center"
|
||||
android:adjustViewBounds="true"
|
||||
android:scaleType="centerCrop"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_wifi"
|
||||
android:id="@+id/tv_bind_time"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="@dimen/dp_16"
|
||||
android:text="WiFi"
|
||||
android:textColor="#000000"
|
||||
android:textSize="@dimen/sp_12"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/tv_wifi_signal"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@+id/tv_wifi_signal" />
|
||||
android:layout_marginTop="@dimen/dp_4"
|
||||
android:text="@string/binding_time"
|
||||
android:visibility="gone"
|
||||
android:textColor="@color/text_gray"
|
||||
android:textSize="@dimen/sp_10"
|
||||
app:layout_constraintEnd_toEndOf="@+id/iv_qrcode"
|
||||
app:layout_constraintStart_toStartOf="@+id/iv_qrcode"
|
||||
app:layout_constraintTop_toBottomOf="@+id/iv_qrcode" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_qrcode"
|
||||
android:layout_width="@dimen/dp_100"
|
||||
android:layout_height="@dimen/dp_100"
|
||||
android:layout_gravity="center" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/chkupd"
|
||||
android:layout_width="@dimen/dp_200"
|
||||
android:layout_height="@dimen/dp_28"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:layout_marginTop="20dp"
|
||||
android:background="@drawable/bt_checkupdate_selector"
|
||||
android:stateListAnimator="@null"
|
||||
android:text="检查更新"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="@dimen/sp_12"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/ll_info" />
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_customversion"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="10dp"
|
||||
android:layout_marginBottom="4dp"
|
||||
android:textColor="@color/background_top"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
@@ -21,7 +21,7 @@
|
||||
android:layout_marginStart="@dimen/dp_8"
|
||||
android:adjustViewBounds="true"
|
||||
android:scaleType="centerCrop"
|
||||
android:src="@drawable/back"
|
||||
android:src="@drawable/bt_return"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
90
app/src/main/res/layout/update_dialog.xml
Normal file
@@ -0,0 +1,90 @@
|
||||
<?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:orientation="vertical">
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="@dimen/dp_240"
|
||||
android:layout_height="@dimen/dp_160"
|
||||
android:layout_centerInParent="true"
|
||||
android:background="@drawable/bg_dialog"
|
||||
android:minWidth="@dimen/dp_240"
|
||||
android:orientation="vertical"
|
||||
android:paddingTop="8dp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/linearLayout2"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/dp_8"
|
||||
android:gravity="center"
|
||||
android:orientation="horizontal"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/title"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:gravity="center_vertical"
|
||||
android:textColor="@color/text_black"
|
||||
android:textSize="@dimen/sp_12"
|
||||
android:textStyle="bold"
|
||||
android:visibility="visible"
|
||||
tools:text="消息提示" />
|
||||
</LinearLayout>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/message"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="20dp"
|
||||
android:layout_marginEnd="20dp"
|
||||
android:gravity="center"
|
||||
android:lineSpacingExtra="3dp"
|
||||
android:lineSpacingMultiplier="1.2"
|
||||
android:minHeight="50dp"
|
||||
android:textColor="@color/text_hint_gray"
|
||||
android:textSize="@dimen/sp_10"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
tools:text="提示消息提示消息提示消息提示消息提示消息" />
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/linearLayout3"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="@dimen/dp_20"
|
||||
app:layout_constraintBottom_toBottomOf="parent">
|
||||
|
||||
|
||||
<TextView
|
||||
android:id="@+id/positive"
|
||||
android:layout_width="@dimen/dp_48"
|
||||
android:layout_height="@dimen/dp_20"
|
||||
android:layout_weight="1"
|
||||
android:background="@drawable/join_background"
|
||||
android:gravity="center"
|
||||
android:singleLine="true"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="@dimen/sp_8"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintVertical_bias="0.0"
|
||||
tools:text="确定" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
@@ -1,8 +1,8 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<color name="colorPrimary">#FFFFFF</color>
|
||||
<color name="colorPrimaryDark">#FFFFFF</color>
|
||||
<color name="colorAccent">#FFFFFF</color>
|
||||
<color name="colorPrimary">#efefef</color>
|
||||
<color name="colorPrimaryDark">#303F9F</color>
|
||||
<color name="colorAccent">#4880ff</color>
|
||||
<!-- <color name="colorPrimary">#3F51B5</color>-->
|
||||
<!-- <color name="colorPrimaryDark">#303F9F</color>-->
|
||||
<!-- <color name="colorAccent">#FF4081</color>-->
|
||||
@@ -53,5 +53,12 @@
|
||||
<color name="title_textcolor">#494949</color>
|
||||
|
||||
<color name="toast_color">#CD000000</color>
|
||||
<color name="activation_color">#4880ff</color>
|
||||
<color name="bt_join_background_color">#4880ff</color>
|
||||
<color name="bt_joined_background_color">#D1D1D1</color>
|
||||
<color name="bt_trial_color">#F19149</color>
|
||||
<color name="text_gray">#9a9a9a</color>
|
||||
<color name="text_black">#1f1f1f</color>
|
||||
<color name="text_hint_gray">#989898</color>
|
||||
|
||||
</resources>
|
||||
@@ -1,50 +1,51 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources xmlns:tools="http://schemas.android.com/tools" xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
|
||||
<string name="app_name">我的设备</string>
|
||||
|
||||
<string name="default_info">暂无信息</string>
|
||||
|
||||
<string name="unistall_error">卸载失败!</string>
|
||||
<string name="system_unistall_error">系统应用无法卸载!</string>
|
||||
|
||||
<string name="open_app_fail">打开失败!</string>
|
||||
<string name="download_btn_had">打开</string>
|
||||
<string name="txt_parent_10">退出系统</string>
|
||||
|
||||
|
||||
<string name="update_info_0">当前版本号:</string>
|
||||
|
||||
<string name="time_control_rest_long" tools:ignore="UnusedResources">each rest how long</string>
|
||||
|
||||
<string name="bb_love_game" tools:ignore="UnusedResources">宝宝爱游戏</string>
|
||||
<string name="total_time" tools:ignore="UnusedResources">使用总时长</string>
|
||||
<string name="use_times" tools:ignore="UnusedResources">使用次数</string>
|
||||
<string name="zh_account">未登录</string>
|
||||
<string name="zg_password" tools:ignore="UnusedResources">密\t码:</string>
|
||||
<string name="zg_name_note">宝宝昵称</string>
|
||||
<string name="image_null">null</string>
|
||||
<string name="download_delect_text">删除</string>
|
||||
<string name="app_update_time_text_format"><xliff:g id="date">%1$s</xliff:g> 次下载</string>
|
||||
<string name="app_detail_comments_text_format">评论<xliff:g id="num">%1$s</xliff:g></string>
|
||||
<string name="app_comment_time_format">"yyyy年MM月dd日"</string>
|
||||
<string name="comment_content_empty">请填写评论内容!</string>
|
||||
<string name="comment_star_empty">请填写星级!</string>
|
||||
<string name="cleaned">清理垃圾 (<xliff:g id="memory">%1$s</xliff:g>)</string>
|
||||
|
||||
<string name="sample_device_admin">为亲子互动提供锁屏功能,请务必激活</string>
|
||||
<string name="sample_device_admin_description">开启我吧</string>
|
||||
<string name="my_device">我的设备</string>
|
||||
<string name="download_btn_had">打开</string>
|
||||
<string name="open_app_fail">打开失败!</string>
|
||||
<string name="search_edit">请输入应用名称或关键字</string>
|
||||
|
||||
<string name="main_title">绑定关怀OS系统</string>
|
||||
|
||||
<string name="notifyTitle">提示</string>
|
||||
<string name="notifyMsg">当前应用缺少必要权限。\n\n请点击\"设置\"-\"权限\"-打开所需权限。</string>
|
||||
<string name="setting">设置</string>
|
||||
<string name="cancel">取消</string>
|
||||
|
||||
<string name="hello_blank_fragment">Hello blank fragment</string>
|
||||
<string name="hello"><u>查看操作指引</u></string>
|
||||
<string name="caption">尊敬的用户:\n非常感谢选用教管壹品牌云管控·AI学习机,您可按以下步骤激活家长管控账号并绑定AI学习机,以便获得相关管控功能,如应用安装黑白名单设置、浏览器上网网址黑白
|
||||
名单设置、系统功能及影音娱乐管控设置、学习机使用时间段管控等等;或您亦可选择暂不绑定家长管控账号,直接激活AI学习系统进行学习(请务必仔细核对并选择正确
|
||||
学龄段,激活后无法更改或退费)。请注意:若未绑定家长管控账号,学习机应用市场将无法启用应用下载,敬请注意!</string>
|
||||
<string name="hint">请务必仔细核对并选择正确学龄段,激活后无法更改或退费</string>
|
||||
<string name="privacy_policy"><u>隐私政策</u></string>
|
||||
<string name="user_agreement"><u>用户协议</u></string>
|
||||
<string name="scan_tips">第一步:微信扫描下方小程序注册账号</string>
|
||||
<string name="bind_tips">第二步:通过小程序扫码绑定设备</string>
|
||||
<string name="device_bind_succeed">设备已绑定</string>
|
||||
<string name="device_unbind">设备绑定(未绑定,请扫码绑定设备)</string>
|
||||
<string name="device_unauthorized">设备未经授权</string>
|
||||
<string name="binding_time">绑定时间:%s</string>
|
||||
<string name="activation_time">激活时间:%s</string>
|
||||
<string name="expire_time">到期时间:%s</string>
|
||||
<string name="trial_time">体验卡:剩余%d天 激活成为正式版</string>
|
||||
|
||||
<string name="enter_activation_code">输入激活码</string>
|
||||
<string name="device_data">设备数据</string>
|
||||
<string name="scan_code_to_register">扫码注册小程序</string>
|
||||
<string name="not_set">未设置</string>
|
||||
<string name="unknown">unknown</string>
|
||||
<string name="wifi_disconnected">wifi已断开</string>
|
||||
<string name="turn_off_wifi">系统关闭wifi</string>
|
||||
<string name="turn_on_wifi">系统开启wifi</string>
|
||||
<string name="scan_applet_qrcode">小程序扫码绑定设备</string>
|
||||
|
||||
<string name="msg_err_no_install">您没有安装该应用程序</string>
|
||||
<string name="mdm_colorfly_rom_launcher">\t\t教管易MDM云管控系统是七彩虹COLORFLY品牌(深圳市七彩宏云智能设备有限公司)
|
||||
所设计研发的,针对安卓教育设备的系统底层封闭管控平台,是一款基于系统ROM级的底层
|
||||
管控方案,而非普通Launcher桌面级系统管控方案,使管控更彻底、学习更高效!\n\n\n
|
||||
|
||||
\t\t我们旨在为各大教育机构及各大院校提供 专业的教育硬件(教育平板电脑或其他教学移
|
||||
动数字终端)+ 云管控平台解决方案,让每一个拥有自己教学内容的高等院校、职业院校、
|
||||
中小学及其他教育机构轻松实现教育数字化、移动化,助力教学质量的提升。</string>
|
||||
<string name="about_copyright">深圳市七彩宏云智能设备有限公司版权所有\n
|
||||
www.jiaoguanyi.com\n
|
||||
粤ICP备17133107号</string>
|
||||
|
||||
<string-array name="packageName">
|
||||
<item>http://p18.qhimg.com/dr/72__/t0111cb71dabfd83b21.png</item>
|
||||
@@ -111,4 +112,7 @@ www.jiaoguanyi.com\n
|
||||
<string name="battery_current_charging_voltage">当前充电电压: </string>
|
||||
<string name="battery_max_charging_voltage">最大充电电压: </string>
|
||||
<string name="adb_shell_help">发送命令: adb shell dumpsys battery \n</string>
|
||||
<string name="upgrade_app">新版本%s已经发布,请更新应用</string>
|
||||
|
||||
|
||||
</resources>
|
||||
@@ -49,6 +49,19 @@
|
||||
<item name="android:backgroundDimEnabled">true</item>
|
||||
</style>
|
||||
|
||||
<style name="CustomDialog" parent="Theme.AppCompat.Dialog.Alert">
|
||||
<!--背景颜色及和透明程度-->
|
||||
<item name="android:windowBackground">@android:color/transparent</item>
|
||||
<!--是否去除标题 -->
|
||||
<item name="android:windowNoTitle">true</item>
|
||||
<!--是否去除边框-->
|
||||
<item name="android:windowFrame">@null</item>
|
||||
<!--是否浮现在activity之上-->
|
||||
<item name="android:windowIsFloating">true</item>
|
||||
<!--是否模糊-->
|
||||
<item name="android:backgroundDimEnabled">true</item>
|
||||
</style>
|
||||
|
||||
<style name="dialog" parent="Theme.AppCompat.Light.Dialog.Alert">
|
||||
<item name="android:textColor">@color/black</item>
|
||||
<item name="android:windowFullscreen">false</item>
|
||||
|
||||