update:2020.06.12
fix:更换图标 add:增加连接上wifi之后启动管控功能
@@ -15,10 +15,10 @@ android {
|
|||||||
minSdkVersion 20
|
minSdkVersion 20
|
||||||
targetSdkVersion 29
|
targetSdkVersion 29
|
||||||
|
|
||||||
versionCode 142
|
versionCode 145
|
||||||
versionName "2.9.9"//测试jiaoguanyi.cn
|
versionName "3.0.2"//测试jiaoguanyi.cn
|
||||||
// versionCode 128
|
// versionCode 129
|
||||||
// versionName "2.0.0.8"// 正式jiaoguanyi.com 双数正式 单数测试
|
// versionName "2.0.0.9"// 正式jiaoguanyi.com 双数正式 单数测试
|
||||||
multiDexEnabled true
|
multiDexEnabled true
|
||||||
|
|
||||||
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
|
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
|
||||||
@@ -160,7 +160,7 @@ dependencies {
|
|||||||
implementation 'com.arialyy.aria:core:3.8.5'
|
implementation 'com.arialyy.aria:core:3.8.5'
|
||||||
annotationProcessor 'com.arialyy.aria:compiler:3.8.5'
|
annotationProcessor 'com.arialyy.aria:compiler:3.8.5'
|
||||||
|
|
||||||
implementation 'com.github.tianma8023:NetDetector:v0.2.0'
|
// implementation 'com.github.tianma8023:NetDetector:v0.2.0'
|
||||||
|
|
||||||
implementation "org.java-websocket:Java-WebSocket:1.4.1"
|
implementation "org.java-websocket:Java-WebSocket:1.4.1"
|
||||||
|
|
||||||
|
|||||||
@@ -12,6 +12,8 @@
|
|||||||
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
|
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
|
||||||
<uses-permission android:name="android.permission.READ_SYNC_SETTINGS" />
|
<uses-permission android:name="android.permission.READ_SYNC_SETTINGS" />
|
||||||
<uses-permission android:name="android.permission.WAKE_LOCK"/>
|
<uses-permission android:name="android.permission.WAKE_LOCK"/>
|
||||||
|
<uses-permission android:name="android.permission.CHANGE_NETWORK_STATE"/>
|
||||||
|
<uses-permission android:name="android.permission.CHANGE_WIFI_STATE"/>
|
||||||
<!--静默安装权限-->
|
<!--静默安装权限-->
|
||||||
<uses-permission
|
<uses-permission
|
||||||
android:name="android.permission.INSTALL_PACKAGES"
|
android:name="android.permission.INSTALL_PACKAGES"
|
||||||
|
|||||||
@@ -6,9 +6,16 @@ import android.content.Context;
|
|||||||
import android.content.Intent;
|
import android.content.Intent;
|
||||||
import android.content.IntentFilter;
|
import android.content.IntentFilter;
|
||||||
import android.content.res.Configuration;
|
import android.content.res.Configuration;
|
||||||
|
import android.net.ConnectivityManager;
|
||||||
|
import android.net.Network;
|
||||||
|
import android.net.NetworkInfo;
|
||||||
|
import android.net.Uri;
|
||||||
|
import android.net.wifi.WifiInfo;
|
||||||
|
import android.net.wifi.WifiManager;
|
||||||
import android.os.Build;
|
import android.os.Build;
|
||||||
import android.os.Handler;
|
import android.os.Handler;
|
||||||
import android.os.Looper;
|
import android.os.Looper;
|
||||||
|
import android.os.PowerManager;
|
||||||
import android.provider.Settings;
|
import android.provider.Settings;
|
||||||
import android.support.multidex.MultiDexApplication;
|
import android.support.multidex.MultiDexApplication;
|
||||||
import android.text.TextUtils;
|
import android.text.TextUtils;
|
||||||
@@ -33,12 +40,12 @@ import com.mjsheng.myappstore.jpush.TagAliasOperatorHelper;
|
|||||||
import com.mjsheng.myappstore.network.HTTPInterface;
|
import com.mjsheng.myappstore.network.HTTPInterface;
|
||||||
import com.mjsheng.myappstore.server.GuardService;
|
import com.mjsheng.myappstore.server.GuardService;
|
||||||
import com.mjsheng.myappstore.server.InitJpushServer;
|
import com.mjsheng.myappstore.server.InitJpushServer;
|
||||||
|
import com.mjsheng.myappstore.server.StepService;
|
||||||
import com.mjsheng.myappstore.utils.Configure;
|
import com.mjsheng.myappstore.utils.Configure;
|
||||||
import com.mjsheng.myappstore.utils.MySQLData;
|
import com.mjsheng.myappstore.utils.MySQLData;
|
||||||
import com.mjsheng.myappstore.utils.ToastUtil;
|
import com.mjsheng.myappstore.utils.ToastUtil;
|
||||||
import com.mjsheng.myappstore.utils.Utils;
|
import com.mjsheng.myappstore.utils.Utils;
|
||||||
import com.mjsheng.myappstore.utils.update.ToastTool;
|
import com.mjsheng.myappstore.utils.update.ToastTool;
|
||||||
import com.tianma.netdetector.lib.NetStateChangeReceiver;
|
|
||||||
|
|
||||||
import org.json.JSONArray;
|
import org.json.JSONArray;
|
||||||
import org.json.JSONObject;
|
import org.json.JSONObject;
|
||||||
@@ -48,7 +55,6 @@ import org.lzh.framework.updatepluginlib.model.CheckEntity;
|
|||||||
|
|
||||||
import java.text.SimpleDateFormat;
|
import java.text.SimpleDateFormat;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Arrays;
|
|
||||||
import java.util.Calendar;
|
import java.util.Calendar;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
@@ -137,7 +143,6 @@ public class MyApplication extends MultiDexApplication {
|
|||||||
Aria.get(this).getDownloadConfig().setMaxTaskNum(1);
|
Aria.get(this).getDownloadConfig().setMaxTaskNum(1);
|
||||||
Aria.get(this).getDownloadConfig().setConvertSpeed(true);
|
Aria.get(this).getDownloadConfig().setConvertSpeed(true);
|
||||||
|
|
||||||
NetStateChangeReceiver.registerReceiver(this);
|
|
||||||
|
|
||||||
ToastUtil.init(this);
|
ToastUtil.init(this);
|
||||||
if (!BuildConfig.DEBUG) {
|
if (!BuildConfig.DEBUG) {
|
||||||
@@ -147,6 +152,27 @@ public class MyApplication extends MultiDexApplication {
|
|||||||
//8.0之后需要在
|
//8.0之后需要在
|
||||||
registerTimeReceiver();
|
registerTimeReceiver();
|
||||||
}
|
}
|
||||||
|
ignoreBatteryOptimization(this);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 忽略电池优化
|
||||||
|
*/
|
||||||
|
private void ignoreBatteryOptimization(Context context) {
|
||||||
|
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
|
||||||
|
|
||||||
|
PowerManager powerManager = (PowerManager) getSystemService(POWER_SERVICE);
|
||||||
|
|
||||||
|
boolean hasIgnored = powerManager.isIgnoringBatteryOptimizations(context.getPackageName());
|
||||||
|
// 判断当前APP是否有加入电池优化的白名单,如果没有,弹出加入电池优化的白名单的设置对话框。
|
||||||
|
if (!hasIgnored) {
|
||||||
|
Intent intent = new Intent(Settings.ACTION_REQUEST_IGNORE_BATTERY_OPTIMIZATIONS);
|
||||||
|
intent.setData(Uri.parse("package:" + context.getPackageName()));
|
||||||
|
intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
|
||||||
|
startActivity(intent);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private receiver receiver;
|
private receiver receiver;
|
||||||
@@ -181,6 +207,7 @@ public class MyApplication extends MultiDexApplication {
|
|||||||
//可能会多次触发,1分钟之内不执行
|
//可能会多次触发,1分钟之内不执行
|
||||||
//application中启动服务,startcommand执行会两次
|
//application中启动服务,startcommand执行会两次
|
||||||
startService(new Intent(context, InitJpushServer.class));
|
startService(new Intent(context, InitJpushServer.class));
|
||||||
|
startService(new Intent(context, StepService.class));
|
||||||
startService(new Intent(context, GuardService.class));
|
startService(new Intent(context, GuardService.class));
|
||||||
time1 = time2;
|
time1 = time2;
|
||||||
Log.e("fht", "onReceive");
|
Log.e("fht", "onReceive");
|
||||||
@@ -192,6 +219,8 @@ public class MyApplication extends MultiDexApplication {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public void onTagOperatorResult(JPushMessage jPushMessage) {
|
public void onTagOperatorResult(JPushMessage jPushMessage) {
|
||||||
if (jPushMessage == null) {
|
if (jPushMessage == null) {
|
||||||
return;
|
return;
|
||||||
@@ -570,7 +599,7 @@ public class MyApplication extends MultiDexApplication {
|
|||||||
result = result + "," + store;
|
result = result + "," + store;
|
||||||
}
|
}
|
||||||
Settings.System.putString(context.getContentResolver(), "qch_app_forbid", result);
|
Settings.System.putString(context.getContentResolver(), "qch_app_forbid", result);
|
||||||
Log.e("mjsheng", "qch_app_forbid :"+result);
|
Log.e("mjsheng", "qch_app_forbid :" + result);
|
||||||
} else {
|
} else {
|
||||||
Log.e("mjsheng", "writeAppPackageList is null:");
|
Log.e("mjsheng", "writeAppPackageList is null:");
|
||||||
Settings.System.putString(context.getContentResolver(), "qch_app_forbid", appstore + "," + store);
|
Settings.System.putString(context.getContentResolver(), "qch_app_forbid", appstore + "," + store);
|
||||||
@@ -623,12 +652,6 @@ public class MyApplication extends MultiDexApplication {
|
|||||||
//
|
//
|
||||||
// }
|
// }
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onTerminate() {
|
|
||||||
super.onTerminate();
|
|
||||||
// 取消BroadcastReceiver注册
|
|
||||||
NetStateChangeReceiver.unregisterReceiver(this);
|
|
||||||
}
|
|
||||||
|
|
||||||
// static List<FileData> fileList = new ArrayList<>();
|
// static List<FileData> fileList = new ArrayList<>();
|
||||||
//
|
//
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
package com.mjsheng.myappstore.activity;
|
package com.mjsheng.myappstore.activity;
|
||||||
|
|
||||||
|
import android.app.Activity;
|
||||||
import android.content.BroadcastReceiver;
|
import android.content.BroadcastReceiver;
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.content.ContextWrapper;
|
import android.content.ContextWrapper;
|
||||||
@@ -11,6 +12,7 @@ import android.content.pm.PackageInfo;
|
|||||||
import android.content.pm.PackageManager;
|
import android.content.pm.PackageManager;
|
||||||
import android.content.res.Configuration;
|
import android.content.res.Configuration;
|
||||||
import android.graphics.Bitmap;
|
import android.graphics.Bitmap;
|
||||||
|
import android.net.Uri;
|
||||||
import android.os.BatteryManager;
|
import android.os.BatteryManager;
|
||||||
import android.os.Build;
|
import android.os.Build;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
@@ -18,12 +20,17 @@ import android.os.Environment;
|
|||||||
import android.os.Handler;
|
import android.os.Handler;
|
||||||
import android.os.Message;
|
import android.os.Message;
|
||||||
import android.os.PersistableBundle;
|
import android.os.PersistableBundle;
|
||||||
|
import android.os.PowerManager;
|
||||||
|
import android.os.SystemClock;
|
||||||
import android.provider.Settings;
|
import android.provider.Settings;
|
||||||
import android.support.v4.content.LocalBroadcastManager;
|
import android.support.v4.content.LocalBroadcastManager;
|
||||||
import android.support.v7.app.AppCompatActivity;
|
import android.support.v7.app.AppCompatActivity;
|
||||||
|
import android.text.Layout;
|
||||||
import android.text.TextUtils;
|
import android.text.TextUtils;
|
||||||
import android.util.Log;
|
import android.util.Log;
|
||||||
|
import android.view.View;
|
||||||
import android.widget.ImageView;
|
import android.widget.ImageView;
|
||||||
|
import android.widget.RelativeLayout;
|
||||||
import android.widget.TextView;
|
import android.widget.TextView;
|
||||||
|
|
||||||
import com.alibaba.fastjson.JSON;
|
import com.alibaba.fastjson.JSON;
|
||||||
@@ -54,6 +61,7 @@ import com.mjsheng.myappstore.bean.JsonCallback;
|
|||||||
import com.mjsheng.myappstore.bean.LzyResponse;
|
import com.mjsheng.myappstore.bean.LzyResponse;
|
||||||
import com.mjsheng.myappstore.bean.NetAndLaunchBean;
|
import com.mjsheng.myappstore.bean.NetAndLaunchBean;
|
||||||
import com.mjsheng.myappstore.bean.NetAndLaunchData;
|
import com.mjsheng.myappstore.bean.NetAndLaunchData;
|
||||||
|
import com.mjsheng.myappstore.bean.StudentsInfo;
|
||||||
import com.mjsheng.myappstore.bean.UploadAppInfo;
|
import com.mjsheng.myappstore.bean.UploadAppInfo;
|
||||||
import com.mjsheng.myappstore.bean.UserInfo;
|
import com.mjsheng.myappstore.bean.UserInfo;
|
||||||
import com.mjsheng.myappstore.comm.CommonDatas;
|
import com.mjsheng.myappstore.comm.CommonDatas;
|
||||||
@@ -83,8 +91,6 @@ import com.mjsheng.myappstore.utils.update.NotificationDownloadCreator;
|
|||||||
import com.mjsheng.myappstore.utils.update.OkhttpCheckWorker;
|
import com.mjsheng.myappstore.utils.update.OkhttpCheckWorker;
|
||||||
import com.mjsheng.myappstore.utils.update.ToastCallback;
|
import com.mjsheng.myappstore.utils.update.ToastCallback;
|
||||||
import com.mjsheng.myappstore.utils.update.ToastTool;
|
import com.mjsheng.myappstore.utils.update.ToastTool;
|
||||||
import com.tianma.netdetector.lib.NetStateChangeObserver;
|
|
||||||
import com.tianma.netdetector.lib.NetworkType;
|
|
||||||
|
|
||||||
import org.json.JSONObject;
|
import org.json.JSONObject;
|
||||||
import org.lzh.framework.updatepluginlib.UpdateBuilder;
|
import org.lzh.framework.updatepluginlib.UpdateBuilder;
|
||||||
@@ -122,7 +128,7 @@ import static com.mjsheng.myappstore.jpush.TagAliasOperatorHelper.ACTION_SET;
|
|||||||
import static com.mjsheng.myappstore.jpush.TagAliasOperatorHelper.TagAliasBean;
|
import static com.mjsheng.myappstore.jpush.TagAliasOperatorHelper.TagAliasBean;
|
||||||
import static com.mjsheng.myappstore.jpush.TagAliasOperatorHelper.sequence;
|
import static com.mjsheng.myappstore.jpush.TagAliasOperatorHelper.sequence;
|
||||||
|
|
||||||
public class MainActivity extends AppCompatActivity implements NetStateChangeObserver {
|
public class MainActivity extends AppCompatActivity {
|
||||||
|
|
||||||
private ToastCallback callback;
|
private ToastCallback callback;
|
||||||
private long mPreClickTime;
|
private long mPreClickTime;
|
||||||
@@ -132,8 +138,10 @@ public class MainActivity extends AppCompatActivity implements NetStateChangeObs
|
|||||||
private DownloadManager downloadManager;
|
private DownloadManager downloadManager;
|
||||||
private ImageView imageView;
|
private ImageView imageView;
|
||||||
private TextView tv_devsn, tv_devmac, tv_version;
|
private TextView tv_devsn, tv_devmac, tv_version;
|
||||||
|
private TextView tv_class, tv_number, tv_name;
|
||||||
private int DeviceInfo;
|
private int DeviceInfo;
|
||||||
|
private RelativeLayout checkupdate;
|
||||||
|
private ImageView back;
|
||||||
//jiguang
|
//jiguang
|
||||||
public static boolean isForeground = false;
|
public static boolean isForeground = false;
|
||||||
//for receive customer msg from jpush server
|
//for receive customer msg from jpush server
|
||||||
@@ -287,6 +295,7 @@ public class MainActivity extends AppCompatActivity implements NetStateChangeObs
|
|||||||
// setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT);
|
// setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT);
|
||||||
// }
|
// }
|
||||||
requestPermission();
|
requestPermission();
|
||||||
|
acquireWakeLock();
|
||||||
registerMessageReceiver(); // used for receive msg
|
registerMessageReceiver(); // used for receive msg
|
||||||
// HTTPInterface.checkDevicesInfo(handler);
|
// HTTPInterface.checkDevicesInfo(handler);
|
||||||
startService(new Intent(MainActivity.this, MyDownloadService.class));
|
startService(new Intent(MainActivity.this, MyDownloadService.class));
|
||||||
@@ -353,15 +362,49 @@ public class MainActivity extends AppCompatActivity implements NetStateChangeObs
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void initView() {
|
private void initView() {
|
||||||
|
checkupdate = findViewById(R.id.checkupdate);
|
||||||
|
checkupdate.setOnClickListener(new View.OnClickListener() {
|
||||||
|
@Override
|
||||||
|
public void onClick(View v) {
|
||||||
|
continuousClick(COUNTS, DURATION);
|
||||||
|
}
|
||||||
|
});
|
||||||
imageView = findViewById(R.id.imageView);
|
imageView = findViewById(R.id.imageView);
|
||||||
tv_devsn = findViewById(R.id.tv_devsn);
|
tv_devsn = findViewById(R.id.tv_devsn);
|
||||||
tv_devsn.setText("设备SN\t\t" + Utils.getSerial());
|
tv_devsn.setText(Utils.getSerial());
|
||||||
tv_devmac = findViewById(R.id.tv_devmac);
|
tv_devmac = findViewById(R.id.tv_devmac);
|
||||||
tv_devmac.setText("MAC地址\t\t" + com.blankj.utilcode.util.DeviceUtils.getMacAddress());
|
tv_devmac.setText(com.blankj.utilcode.util.DeviceUtils.getMacAddress());
|
||||||
tv_version = findViewById(R.id.version);
|
tv_version = findViewById(R.id.version);
|
||||||
tv_version.setText("版本:" + BuildConfig.VERSION_NAME);
|
tv_version.setText(BuildConfig.VERSION_NAME);
|
||||||
|
tv_class = findViewById(R.id.tv_class);
|
||||||
|
tv_number = findViewById(R.id.tv_number);
|
||||||
|
tv_name = findViewById(R.id.tv_name);
|
||||||
|
back = findViewById(R.id.back);
|
||||||
|
back.setOnClickListener(new View.OnClickListener() {
|
||||||
|
@Override
|
||||||
|
public void onClick(View v) {
|
||||||
|
lazyExit();
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
final static int COUNTS = 5;// 点击次数
|
||||||
|
final static long DURATION = 1000;// 规定有效时间
|
||||||
|
long[] mHits = new long[COUNTS];
|
||||||
|
|
||||||
|
private void continuousClick(int count, long time) {
|
||||||
|
//每次点击时,数组向前移动一位
|
||||||
|
System.arraycopy(mHits, 1, mHits, 0, mHits.length - 1);
|
||||||
|
//为数组最后一位赋值
|
||||||
|
mHits[mHits.length - 1] = SystemClock.uptimeMillis();
|
||||||
|
if (mHits[0] >= (SystemClock.uptimeMillis() - DURATION)) {
|
||||||
|
mHits = new long[COUNTS];//重新初始化数组
|
||||||
|
ToastUtil.show("正在检查更新");
|
||||||
|
HTTPInterface.checkUpdate(mHandler, BuildConfig.APPLICATION_ID);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
private void initData() {
|
private void initData() {
|
||||||
Log.e("mjhsneg", "gagagag--------------------------" + Utils.getSerial());
|
Log.e("mjhsneg", "gagagag--------------------------" + Utils.getSerial());
|
||||||
getLockedState();
|
getLockedState();
|
||||||
@@ -389,8 +432,8 @@ public class MainActivity extends AppCompatActivity implements NetStateChangeObs
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void setImageAndText(ImageView imageView, String text) {
|
private void setImageAndText(ImageView imageView, String text) {
|
||||||
Bitmap bitmap = Utils.createQRImage(Utils.getSn(), 250, 250);
|
// Bitmap bitmap = Utils.createQRImage(Utils.getSn(), 250, 250);
|
||||||
imageView.setImageBitmap(bitmap);
|
// imageView.setImageBitmap(bitmap);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -465,6 +508,37 @@ public class MainActivity extends AppCompatActivity implements NetStateChangeObs
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
private PowerManager.WakeLock wakeLock = null;
|
||||||
|
private static final String mWakeLockName = "BackupService";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取电源锁,保持该服务在屏幕熄灭时仍然获取CPU时,保持运行
|
||||||
|
*/
|
||||||
|
private synchronized void acquireWakeLock() {
|
||||||
|
if (null == wakeLock) {
|
||||||
|
PowerManager pm = (PowerManager) this.getSystemService(Context.POWER_SERVICE);
|
||||||
|
wakeLock = pm.newWakeLock(PowerManager.PARTIAL_WAKE_LOCK
|
||||||
|
| PowerManager.ON_AFTER_RELEASE, mWakeLockName);
|
||||||
|
if (null != wakeLock) {
|
||||||
|
Log.e("fht", "acquireWakeLock!");
|
||||||
|
wakeLock.acquire();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 释放设备电源锁
|
||||||
|
*/
|
||||||
|
private synchronized void releaseWakeLock() {
|
||||||
|
if (null != wakeLock) {
|
||||||
|
Log.e("fht", "releaseWakeLock!");
|
||||||
|
wakeLock.release();
|
||||||
|
wakeLock = null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
private boolean locked = false;
|
private boolean locked = false;
|
||||||
|
|
||||||
public void getLockedState() {
|
public void getLockedState() {
|
||||||
@@ -562,6 +636,33 @@ public class MainActivity extends AppCompatActivity implements NetStateChangeObs
|
|||||||
break;
|
break;
|
||||||
case -200:
|
case -200:
|
||||||
Log.e("fht", "no update");
|
Log.e("fht", "no update");
|
||||||
|
break;
|
||||||
|
case 2:
|
||||||
|
StudentsInfo info = com.alibaba.fastjson.JSONObject.parseObject(String.valueOf(msg.obj), StudentsInfo.class);
|
||||||
|
if (null != info) {
|
||||||
|
if (info.getBatch().equals("")) {
|
||||||
|
tv_class.setText("暂无信息");
|
||||||
|
} else {
|
||||||
|
tv_class.setText(info.getBatch());
|
||||||
|
}
|
||||||
|
if (info.getSno().equals("")) {
|
||||||
|
tv_number.setText("暂无信息");
|
||||||
|
} else {
|
||||||
|
tv_number.setText(info.getSno());
|
||||||
|
}
|
||||||
|
if (info.getRealname().equals("")) {
|
||||||
|
tv_name.setText("暂无信息");
|
||||||
|
} else {
|
||||||
|
tv_name.setText(info.getRealname());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case -2:
|
||||||
|
tv_class.setText("暂无信息");
|
||||||
|
tv_number.setText("暂无信息");
|
||||||
|
tv_name.setText("暂无信息");
|
||||||
|
break;
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -589,7 +690,8 @@ public class MainActivity extends AppCompatActivity implements NetStateChangeObs
|
|||||||
.setExtendField(object.toJSONString())
|
.setExtendField(object.toJSONString())
|
||||||
.create(); //启动下载}
|
.create(); //启动下载}
|
||||||
} else {
|
} else {
|
||||||
Log.e("fht", "无需更新");
|
// ToastUtil.show("已是最新版本");
|
||||||
|
Log.e("fht", "已是最新版本");
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -628,7 +730,37 @@ public class MainActivity extends AppCompatActivity implements NetStateChangeObs
|
|||||||
loadHeadImg(Configure.HTTP_TAG_HOME_PAGE_URL);
|
loadHeadImg(Configure.HTTP_TAG_HOME_PAGE_URL);
|
||||||
getLockedState();
|
getLockedState();
|
||||||
// MyApplication.getInstance().getWhitePackageList();
|
// MyApplication.getInstance().getWhitePackageList();
|
||||||
|
getInfo(mHandler);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void getInfo(final Handler handler) {
|
||||||
|
OkGo.post(Configure.GET_STUDENTS_INFO)
|
||||||
|
.params("sn", Utils.getSerial())
|
||||||
|
.execute(new StringCallback() {
|
||||||
|
@Override
|
||||||
|
public void onSuccess(String s, Call call, Response response) {
|
||||||
|
try {
|
||||||
|
LzyResponse<StudentsInfo> lzyResponse = (LzyResponse<StudentsInfo>) JSON.parseObject(s, LzyResponse.class);
|
||||||
|
Message message = new Message();
|
||||||
|
if (lzyResponse.code == 200) {
|
||||||
|
message.what = 2;
|
||||||
|
message.obj = lzyResponse.data;
|
||||||
|
handler.sendMessage(message);
|
||||||
|
} else {
|
||||||
|
handler.sendEmptyMessage(-2);
|
||||||
|
}
|
||||||
|
} catch (Exception e) {
|
||||||
|
Log.e("fht", "getInfo:" + e.getMessage());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onError(Call call, Response response, Exception e) {
|
||||||
|
super.onError(call, response, e);
|
||||||
|
Log.e("onError", "error");
|
||||||
|
}
|
||||||
|
|
||||||
|
});// 请求方式和请求url
|
||||||
}
|
}
|
||||||
|
|
||||||
private void loadHeadImg(String URL) {
|
private void loadHeadImg(String URL) {
|
||||||
@@ -1579,18 +1711,4 @@ public class MainActivity extends AppCompatActivity implements NetStateChangeObs
|
|||||||
}
|
}
|
||||||
return num;
|
return num;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onNetDisconnected() {
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onNetConnected(NetworkType networkType) {
|
|
||||||
initJpush();
|
|
||||||
Aria.download(this).resumeAllTask();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -19,6 +19,7 @@ import com.alibaba.fastjson.JSONArray;
|
|||||||
import com.alibaba.fastjson.JSONException;
|
import com.alibaba.fastjson.JSONException;
|
||||||
import com.alibaba.fastjson.JSONObject;
|
import com.alibaba.fastjson.JSONObject;
|
||||||
import com.blankj.utilcode.util.LogUtils;
|
import com.blankj.utilcode.util.LogUtils;
|
||||||
|
import com.blankj.utilcode.util.ToastUtils;
|
||||||
import com.lzy.okgo.OkGo;
|
import com.lzy.okgo.OkGo;
|
||||||
import com.lzy.okgo.callback.StringCallback;
|
import com.lzy.okgo.callback.StringCallback;
|
||||||
import com.mjsheng.myappstore.MyApplication;
|
import com.mjsheng.myappstore.MyApplication;
|
||||||
@@ -562,6 +563,7 @@ public class HTTPInterface {
|
|||||||
int code = jsonObject.getInteger("code");
|
int code = jsonObject.getInteger("code");
|
||||||
String msg = jsonObject.getString("msg");
|
String msg = jsonObject.getString("msg");
|
||||||
String data = jsonObject.getString("data");
|
String data = jsonObject.getString("data");
|
||||||
|
Log.e("setHideDesktopIcon", data);
|
||||||
ApkUtils.showAllAPP(context);
|
ApkUtils.showAllAPP(context);
|
||||||
if (code == 200) {
|
if (code == 200) {
|
||||||
if (data != null && !"".equals(data)) {
|
if (data != null && !"".equals(data)) {
|
||||||
@@ -584,7 +586,7 @@ public class HTTPInterface {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
synchronized public static void getNetAndLaunchSetting(final Context context) {
|
synchronized public static void getNetAndLaunchSetting(final Context context) {
|
||||||
OkGo.post(Configure.NET_AND_LAUNCH_API)
|
OkGo.post(Configure.NET_AND_LAUNCH_API)
|
||||||
.params("key", Configure.HTTP_KEY)
|
.params("key", Configure.HTTP_KEY)
|
||||||
.params("sn", Utils.getSerial())
|
.params("sn", Utils.getSerial())
|
||||||
@@ -593,7 +595,12 @@ public class HTTPInterface {
|
|||||||
public void onSuccess(String s, Call call, Response response) {
|
public void onSuccess(String s, Call call, Response response) {
|
||||||
NetAndLaunchBean netAndLaunchBeanList = JSON.parseObject(s, NetAndLaunchBean.class);
|
NetAndLaunchBean netAndLaunchBeanList = JSON.parseObject(s, NetAndLaunchBean.class);
|
||||||
LogUtils.e(s);
|
LogUtils.e(s);
|
||||||
setNetAndlaunch(netAndLaunchBeanList, context);
|
switch (netAndLaunchBeanList.getCode()) {
|
||||||
|
case 200:
|
||||||
|
setNetAndlaunch(netAndLaunchBeanList, context);
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -35,6 +35,8 @@ public class BootReceiver extends BroadcastReceiver {
|
|||||||
startService(context);
|
startService(context);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void startService(Context context) {
|
private void startService(Context context) {
|
||||||
|
|||||||
@@ -444,13 +444,16 @@ public class MyJPushReceiver extends BroadcastReceiver {
|
|||||||
.subscribeOn(Schedulers.io())
|
.subscribeOn(Schedulers.io())
|
||||||
.observeOn(AndroidSchedulers.mainThread())
|
.observeOn(AndroidSchedulers.mainThread())
|
||||||
.subscribe(new Observer<ResponseBody>() {
|
.subscribe(new Observer<ResponseBody>() {
|
||||||
|
@Override
|
||||||
public void onComplete() {
|
public void onComplete() {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void onError(Throwable param1Throwable) {
|
public void onError(Throwable param1Throwable) {
|
||||||
Log.e("mjsheng", "DeselectIDApi=onError:");
|
Log.e("mjsheng", "DeselectIDApi=onError:");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void onNext(ResponseBody param1ResponseBody) {
|
public void onNext(ResponseBody param1ResponseBody) {
|
||||||
try {
|
try {
|
||||||
String str1;
|
String str1;
|
||||||
|
|||||||
@@ -8,12 +8,18 @@ package com.mjsheng.myappstore.server;
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
import android.app.Service;
|
import android.app.Service;
|
||||||
|
import android.content.BroadcastReceiver;
|
||||||
import android.content.ComponentName;
|
import android.content.ComponentName;
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.content.Intent;
|
import android.content.Intent;
|
||||||
|
import android.content.IntentFilter;
|
||||||
import android.content.ServiceConnection;
|
import android.content.ServiceConnection;
|
||||||
|
import android.net.ConnectivityManager;
|
||||||
|
import android.net.Network;
|
||||||
|
import android.net.NetworkInfo;
|
||||||
|
import android.net.wifi.WifiInfo;
|
||||||
|
import android.net.wifi.WifiManager;
|
||||||
import android.os.IBinder;
|
import android.os.IBinder;
|
||||||
import android.provider.Settings;
|
|
||||||
import android.support.annotation.Nullable;
|
import android.support.annotation.Nullable;
|
||||||
import android.text.format.Formatter;
|
import android.text.format.Formatter;
|
||||||
import android.util.Log;
|
import android.util.Log;
|
||||||
@@ -25,16 +31,12 @@ import com.arialyy.aria.core.Aria;
|
|||||||
import com.arialyy.aria.core.download.DownloadEntity;
|
import com.arialyy.aria.core.download.DownloadEntity;
|
||||||
import com.arialyy.aria.core.task.DownloadTask;
|
import com.arialyy.aria.core.task.DownloadTask;
|
||||||
import com.blankj.utilcode.util.LogUtils;
|
import com.blankj.utilcode.util.LogUtils;
|
||||||
import com.blankj.utilcode.util.ToastUtils;
|
|
||||||
import com.mjsheng.myappstore.KeepAliveConnection;
|
import com.mjsheng.myappstore.KeepAliveConnection;
|
||||||
import com.mjsheng.myappstore.MyApplication;
|
import com.mjsheng.myappstore.MyApplication;
|
||||||
import com.mjsheng.myappstore.utils.ApkUtils;
|
import com.mjsheng.myappstore.utils.ApkUtils;
|
||||||
import com.mjsheng.myappstore.utils.ServiceAliveUtils;
|
import com.mjsheng.myappstore.utils.ServiceAliveUtils;
|
||||||
import com.mjsheng.myappstore.utils.ToastUtil;
|
import com.mjsheng.myappstore.utils.ToastUtil;
|
||||||
import com.tianma.netdetector.lib.NetStateChangeObserver;
|
|
||||||
import com.tianma.netdetector.lib.NetworkType;
|
|
||||||
|
|
||||||
import java.io.File;
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
|
||||||
@@ -44,7 +46,7 @@ import java.util.List;
|
|||||||
* @author LiGuangMin
|
* @author LiGuangMin
|
||||||
* @time Created by 2018/8/17 11:27
|
* @time Created by 2018/8/17 11:27
|
||||||
*/
|
*/
|
||||||
public class GuardService extends Service implements NetStateChangeObserver {
|
public class GuardService extends Service {
|
||||||
private final static String TAG = GuardService.class.getSimpleName();
|
private final static String TAG = GuardService.class.getSimpleName();
|
||||||
private ServiceConnection mServiceConnection = new ServiceConnection() {
|
private ServiceConnection mServiceConnection = new ServiceConnection() {
|
||||||
@Override
|
@Override
|
||||||
@@ -69,8 +71,10 @@ public class GuardService extends Service implements NetStateChangeObserver {
|
|||||||
@Nullable
|
@Nullable
|
||||||
@Override
|
@Override
|
||||||
public IBinder onBind(Intent intent) {
|
public IBinder onBind(Intent intent) {
|
||||||
|
registerNetworkReceiver();
|
||||||
return new KeepAliveConnection.Stub() {
|
return new KeepAliveConnection.Stub() {
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -80,16 +84,115 @@ public class GuardService extends Service implements NetStateChangeObserver {
|
|||||||
Aria.init(this);
|
Aria.init(this);
|
||||||
Aria.get(this).getDownloadConfig().setMaxTaskNum(1);
|
Aria.get(this).getDownloadConfig().setMaxTaskNum(1);
|
||||||
|
|
||||||
|
|
||||||
Aria.download(this).register();
|
Aria.download(this).register();
|
||||||
|
|
||||||
|
|
||||||
// startForeground(1, new Notification());
|
// startForeground(1, new Notification());
|
||||||
// 绑定建立链接
|
// 绑定建立链接
|
||||||
bindService(new Intent(this, StepService.class), mServiceConnection, Context.BIND_IMPORTANT);
|
bindService(new Intent(this, StepService.class), mServiceConnection, Context.BIND_IMPORTANT);
|
||||||
return START_STICKY;
|
return START_STICKY;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onDestroy() {
|
||||||
|
super.onDestroy();
|
||||||
|
if (null != mNetworkChangedRecceiver) {
|
||||||
|
unregisterReceiver(mNetworkChangedRecceiver);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private NetworkChangedRecceiver mNetworkChangedRecceiver;
|
||||||
|
|
||||||
|
public void registerNetworkReceiver() {
|
||||||
|
mNetworkChangedRecceiver = new NetworkChangedRecceiver();
|
||||||
|
IntentFilter filter = new IntentFilter();
|
||||||
|
filter.setPriority(IntentFilter.SYSTEM_HIGH_PRIORITY);
|
||||||
|
filter.addAction("android.net.ethernet.ETHERNET_STATE_CHANGED");
|
||||||
|
filter.addAction("android.net.ethernet.STATE_CHANGE");
|
||||||
|
filter.addAction("android.net.conn.CONNECTIVITY_CHANGE");
|
||||||
|
filter.addAction("android.net.wifi.WIFI_STATE_CHANGED");
|
||||||
|
filter.addAction("android.net.wifi.STATE_CHANGE");
|
||||||
|
filter.addAction(WifiManager.NETWORK_STATE_CHANGED_ACTION);
|
||||||
|
registerReceiver(mNetworkChangedRecceiver, filter);
|
||||||
|
}
|
||||||
|
|
||||||
|
Long time1 = 0L;
|
||||||
|
Long time2 = 0L;
|
||||||
|
|
||||||
|
public class NetworkChangedRecceiver extends BroadcastReceiver {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onReceive(Context context, Intent intent) {
|
||||||
|
if (android.os.Build.VERSION.SDK_INT < android.os.Build.VERSION_CODES.LOLLIPOP) {
|
||||||
|
//获得ConnectivityManager对象
|
||||||
|
ConnectivityManager connMgr = (ConnectivityManager) context.getSystemService(Context.CONNECTIVITY_SERVICE);
|
||||||
|
//获取ConnectivityManager对象对应的NetworkInfo对象
|
||||||
|
//获取WIFI连接的信息
|
||||||
|
NetworkInfo wifiNetworkInfo = connMgr.getNetworkInfo(ConnectivityManager.TYPE_WIFI);
|
||||||
|
//获取移动数据连接的信息
|
||||||
|
NetworkInfo dataNetworkInfo = connMgr.getNetworkInfo(ConnectivityManager.TYPE_MOBILE);
|
||||||
|
if (wifiNetworkInfo.isConnected() && dataNetworkInfo.isConnected()) {
|
||||||
|
Log.e("fht", "WIFI已连接,移动数据已连接");
|
||||||
|
} else if (wifiNetworkInfo.isConnected() && !dataNetworkInfo.isConnected()) {
|
||||||
|
Log.e("fht", "WIFI已连接,移动数据已断开");
|
||||||
|
} else if (!wifiNetworkInfo.isConnected() && dataNetworkInfo.isConnected()) {
|
||||||
|
Log.e("fht", "WIFI已连接,移动数据已连接");
|
||||||
|
} else {
|
||||||
|
Log.e("fht", "WIFI已连接,移动数据已断开");
|
||||||
|
}
|
||||||
|
//API大于23时使用下面的方式进行网络监听
|
||||||
|
} else {
|
||||||
|
//获得ConnectivityManager对象
|
||||||
|
ConnectivityManager connMgr = (ConnectivityManager) context.getSystemService(Context.CONNECTIVITY_SERVICE);
|
||||||
|
//获取所有网络连接的信息
|
||||||
|
Network[] networks = connMgr.getAllNetworks();
|
||||||
|
//用于存放网络连接信息
|
||||||
|
StringBuilder sb = new StringBuilder();
|
||||||
|
//通过循环将网络信息逐个取出来
|
||||||
|
for (int i = 0; i < networks.length; i++) {
|
||||||
|
//获取ConnectivityManager对象对应的NetworkInfo对象
|
||||||
|
NetworkInfo networkInfo = connMgr.getNetworkInfo(networks[i]);
|
||||||
|
if (null != networkInfo) {
|
||||||
|
sb.append(networkInfo.getTypeName() + " connect is " + networkInfo.isConnected());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Log.e("fht", sb.toString());
|
||||||
|
}
|
||||||
|
if (intent.getAction().equals(WifiManager.RSSI_CHANGED_ACTION)) {
|
||||||
|
Log.e("fht", "wifi信号强度变化");
|
||||||
|
}
|
||||||
|
//wifi连接上与否
|
||||||
|
if (intent.getAction().equals(WifiManager.NETWORK_STATE_CHANGED_ACTION)) {
|
||||||
|
|
||||||
|
NetworkInfo info = intent.getParcelableExtra(WifiManager.EXTRA_NETWORK_INFO);
|
||||||
|
if (info.getState().equals(NetworkInfo.State.DISCONNECTED)) {
|
||||||
|
Log.e("fht", "wifi断开");
|
||||||
|
} else if (info.getState().equals(NetworkInfo.State.CONNECTED)) {
|
||||||
|
WifiManager wifiManager = (WifiManager) context.getSystemService(Context.WIFI_SERVICE);
|
||||||
|
WifiInfo wifiInfo = wifiManager.getConnectionInfo();
|
||||||
|
//获取当前wifi名称
|
||||||
|
Log.e("fht", "连接到网络 " + wifiInfo.getSSID());
|
||||||
|
time2 = System.currentTimeMillis();
|
||||||
|
if ((time2 - time1) > 60 * 1000) {
|
||||||
|
//可能会多次触发,1分钟之内不执行
|
||||||
|
//application中启动服务,startcommand执行会两次
|
||||||
|
startService(new Intent(context, InitJpushServer.class));
|
||||||
|
Aria.download(this).resumeAllTask();
|
||||||
|
time1 = time2;
|
||||||
|
Log.e("fht", "onReceive");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
//wifi打开与否
|
||||||
|
if (intent.getAction().equals(WifiManager.WIFI_STATE_CHANGED_ACTION)) {
|
||||||
|
int wifistate = intent.getIntExtra(WifiManager.EXTRA_WIFI_STATE, WifiManager.WIFI_STATE_DISABLED);
|
||||||
|
if (wifistate == WifiManager.WIFI_STATE_DISABLED) {
|
||||||
|
Log.e("fht", "系统关闭wifi");
|
||||||
|
} else if (wifistate == WifiManager.WIFI_STATE_ENABLED) {
|
||||||
|
Log.e("fht", "系统开启wifi");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
//在这里处理任务执行中的状态,如进度进度条的刷新
|
//在这里处理任务执行中的状态,如进度进度条的刷新
|
||||||
@Download.onTaskRunning
|
@Download.onTaskRunning
|
||||||
@@ -147,15 +250,6 @@ public class GuardService extends Service implements NetStateChangeObserver {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onNetDisconnected() {
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onNetConnected(NetworkType networkType) {
|
|
||||||
Aria.download(this).resumeAllTask();
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -573,6 +573,7 @@ public class InitJpushServer extends Service {
|
|||||||
}
|
}
|
||||||
|
|
||||||
Utils.writeDisableUpdateList(this, upgrade_not.split(","), upgrade_ok.split(","));
|
Utils.writeDisableUpdateList(this, upgrade_not.split(","), upgrade_ok.split(","));
|
||||||
|
LogUtils.e("UpdateList:upgrade_not:" + upgrade_not + "-----------upgrade_ok:" + upgrade_ok);
|
||||||
|
|
||||||
LogUtils.e("launch:" + launch + "-----------net_ok:" + net_ok + "-----------net_not:" + net_not);
|
LogUtils.e("launch:" + launch + "-----------net_ok:" + net_ok + "-----------net_not:" + net_not);
|
||||||
boolean qch_app_power_on = Settings.System.putString(getApplicationContext().getContentResolver(), "qch_app_power_on", launch);
|
boolean qch_app_power_on = Settings.System.putString(getApplicationContext().getContentResolver(), "qch_app_power_on", launch);
|
||||||
|
|||||||
@@ -204,4 +204,6 @@ public class Configure {
|
|||||||
//获取隐藏桌面图标
|
//获取隐藏桌面图标
|
||||||
public final static String NET_AND_LAUNCH_API = HTTP_TAG_HEAD_NEW + "automatic/get";
|
public final static String NET_AND_LAUNCH_API = HTTP_TAG_HEAD_NEW + "automatic/get";
|
||||||
//获取应用升级自启
|
//获取应用升级自启
|
||||||
|
public static final String GET_STUDENTS_INFO = HTTP_TAG_HEAD_NEW + "Sn/getStudent";
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -919,8 +919,14 @@ public class Utils {
|
|||||||
|
|
||||||
static synchronized public boolean writeDisableUpdateList(Context context, String[] banList, String[] notList) {
|
static synchronized public boolean writeDisableUpdateList(Context context, String[] banList, String[] notList) {
|
||||||
String now = Settings.System.getString(context.getContentResolver(), "qch_app_forbid");
|
String now = Settings.System.getString(context.getContentResolver(), "qch_app_forbid");
|
||||||
String[] nowList = now.split(",");
|
String[] nowList;
|
||||||
List<String> allList = new ArrayList<>(Arrays.asList(nowList));//已经写入的列表
|
List<String> allList;
|
||||||
|
if (now == null || now.equalsIgnoreCase("")) {
|
||||||
|
allList = new ArrayList<>();
|
||||||
|
} else {
|
||||||
|
nowList = now.split(",");
|
||||||
|
allList = new ArrayList<>(Arrays.asList(nowList));//已经写入的列表
|
||||||
|
}
|
||||||
boolean writeSucceed = false;
|
boolean writeSucceed = false;
|
||||||
if (banList != null && banList.length > 0) {
|
if (banList != null && banList.length > 0) {
|
||||||
for (String s : banList) {
|
for (String s : banList) {
|
||||||
@@ -944,7 +950,7 @@ public class Utils {
|
|||||||
list = list.substring(0, list.length() - 1);
|
list = list.substring(0, list.length() - 1);
|
||||||
Log.e("fht", list);
|
Log.e("fht", list);
|
||||||
writeSucceed = Settings.System.putString(context.getContentResolver(), "qch_app_forbid", list);
|
writeSucceed = Settings.System.putString(context.getContentResolver(), "qch_app_forbid", list);
|
||||||
Log.e("fht","qch_app_forbid:"+list);
|
Log.e("fht", "qch_app_forbid:" + list);
|
||||||
} else {
|
} else {
|
||||||
writeSucceed = Settings.System.putString(context.getContentResolver(), "qch_app_forbid", "Invalid");
|
writeSucceed = Settings.System.putString(context.getContentResolver(), "qch_app_forbid", "Invalid");
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -7,51 +7,77 @@
|
|||||||
android:background="#ffffff"
|
android:background="#ffffff"
|
||||||
tools:context=".activity.MainActivity">
|
tools:context=".activity.MainActivity">
|
||||||
|
|
||||||
|
<android.support.constraint.ConstraintLayout
|
||||||
|
android:id="@+id/bannerLayout"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="@dimen/dp_32"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintHorizontal_bias="0.0"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/textView3"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:gravity="center_horizontal"
|
||||||
|
android:text="我的设备"
|
||||||
|
android:textColor="#000000"
|
||||||
|
android:textSize="@dimen/sp_16"
|
||||||
|
android:textStyle="bold"
|
||||||
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent" />
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/back"
|
||||||
|
android:layout_width="@dimen/dp_16"
|
||||||
|
android:layout_height="@dimen/dp_16"
|
||||||
|
android:layout_marginStart="@dimen/dp_8"
|
||||||
|
android:adjustViewBounds="true"
|
||||||
|
android:scaleType="centerCrop"
|
||||||
|
android:src="@drawable/back"
|
||||||
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="@+id/textView3"
|
||||||
|
app:layout_constraintTop_toTopOf="@+id/textView3" />
|
||||||
|
</android.support.constraint.ConstraintLayout>
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:id="@+id/imageView"
|
android:id="@+id/imageView"
|
||||||
android:layout_width="@dimen/dp_140"
|
android:layout_width="@dimen/dp_120"
|
||||||
android:layout_height="@dimen/dp_140"
|
android:layout_height="@dimen/dp_120"
|
||||||
android:adjustViewBounds="true"
|
android:adjustViewBounds="true"
|
||||||
android:scaleType="fitCenter"
|
android:scaleType="fitCenter"
|
||||||
|
android:src="@drawable/logo"
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintHorizontal_bias="0.5"
|
app:layout_constraintHorizontal_bias="0.5"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toTopOf="parent"
|
app:layout_constraintTop_toBottomOf="@+id/bannerLayout"
|
||||||
app:layout_constraintVertical_bias="0.078">
|
app:layout_constraintVertical_bias="0.05">
|
||||||
|
|
||||||
</ImageView>
|
</ImageView>
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:id="@+id/linearLayout"
|
android:id="@+id/linearLayout"
|
||||||
android:layout_width="@dimen/dp_170"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginTop="12dp"
|
android:layout_marginTop="12dp"
|
||||||
|
android:layout_marginLeft="@dimen/dp_150"
|
||||||
|
android:layout_marginRight="@dimen/dp_150"
|
||||||
android:orientation="vertical"
|
android:orientation="vertical"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toBottomOf="@+id/imageView">
|
app:layout_constraintTop_toBottomOf="@+id/imageView">
|
||||||
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/textView3"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginBottom="@dimen/dp_10"
|
|
||||||
android:gravity="center_horizontal"
|
|
||||||
android:text="设备信息"
|
|
||||||
android:textSize="@dimen/sp_16"
|
|
||||||
android:textStyle="bold" />
|
|
||||||
|
|
||||||
<RelativeLayout
|
<RelativeLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="@dimen/dp_20"
|
||||||
android:layout_marginTop="@dimen/dp_30">
|
>
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/tv_devsn"
|
android:layout_width="wrap_content"
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginStart="@dimen/dp_5"
|
android:layout_marginStart="@dimen/dp_5"
|
||||||
android:layout_marginLeft="@dimen/dp_5"
|
android:layout_marginLeft="@dimen/dp_5"
|
||||||
@@ -59,7 +85,20 @@
|
|||||||
android:layout_marginRight="@dimen/dp_5"
|
android:layout_marginRight="@dimen/dp_5"
|
||||||
android:layout_marginBottom="@dimen/dp_5"
|
android:layout_marginBottom="@dimen/dp_5"
|
||||||
android:text="设备SN"
|
android:text="设备SN"
|
||||||
android:textColor="#7b7b7b"
|
android:textColor="#000000"
|
||||||
|
android:textSize="@dimen/sp_12" />
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tv_devsn"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_alignParentRight="true"
|
||||||
|
android:layout_marginStart="@dimen/dp_5"
|
||||||
|
android:layout_marginLeft="@dimen/dp_5"
|
||||||
|
android:layout_marginEnd="@dimen/dp_5"
|
||||||
|
android:layout_marginRight="@dimen/dp_5"
|
||||||
|
android:layout_marginBottom="@dimen/dp_5"
|
||||||
|
android:text="设备SN"
|
||||||
|
android:textColor="#000000"
|
||||||
android:textSize="@dimen/sp_12" />
|
android:textSize="@dimen/sp_12" />
|
||||||
|
|
||||||
|
|
||||||
@@ -67,12 +106,11 @@
|
|||||||
|
|
||||||
<RelativeLayout
|
<RelativeLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="@dimen/dp_20"
|
||||||
android:layout_marginTop="@dimen/dp_10">
|
>
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/tv_devmac"
|
android:layout_width="wrap_content"
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginStart="@dimen/dp_5"
|
android:layout_marginStart="@dimen/dp_5"
|
||||||
android:layout_marginLeft="@dimen/dp_5"
|
android:layout_marginLeft="@dimen/dp_5"
|
||||||
@@ -80,24 +118,170 @@
|
|||||||
android:layout_marginRight="@dimen/dp_5"
|
android:layout_marginRight="@dimen/dp_5"
|
||||||
android:layout_marginBottom="@dimen/dp_5"
|
android:layout_marginBottom="@dimen/dp_5"
|
||||||
android:text="MAC地址"
|
android:text="MAC地址"
|
||||||
android:textColor="#7b7b7b"
|
android:textColor="#000000"
|
||||||
|
android:textSize="@dimen/sp_12" />
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tv_devmac"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_alignParentRight="true"
|
||||||
|
android:layout_marginStart="@dimen/dp_5"
|
||||||
|
android:layout_marginLeft="@dimen/dp_5"
|
||||||
|
android:layout_marginEnd="@dimen/dp_5"
|
||||||
|
android:layout_marginRight="@dimen/dp_5"
|
||||||
|
android:layout_marginBottom="@dimen/dp_5"
|
||||||
|
android:text="MAC地址"
|
||||||
|
android:textColor="#000000"
|
||||||
|
android:textSize="@dimen/sp_12" />
|
||||||
|
|
||||||
|
|
||||||
|
</RelativeLayout>
|
||||||
|
|
||||||
|
<RelativeLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="@dimen/dp_20"
|
||||||
|
>
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginStart="@dimen/dp_5"
|
||||||
|
android:layout_marginLeft="@dimen/dp_5"
|
||||||
|
android:layout_marginEnd="@dimen/dp_5"
|
||||||
|
android:layout_marginRight="@dimen/dp_5"
|
||||||
|
android:layout_marginBottom="@dimen/dp_5"
|
||||||
|
android:text="班级"
|
||||||
|
android:textColor="#000000"
|
||||||
|
android:textSize="@dimen/sp_12" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tv_class"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_alignParentRight="true"
|
||||||
|
android:layout_marginStart="@dimen/dp_5"
|
||||||
|
android:layout_marginLeft="@dimen/dp_5"
|
||||||
|
android:layout_marginEnd="@dimen/dp_5"
|
||||||
|
android:layout_marginRight="@dimen/dp_5"
|
||||||
|
android:layout_marginBottom="@dimen/dp_5"
|
||||||
|
android:text="暂无信息"
|
||||||
|
android:textColor="#000000"
|
||||||
|
android:textSize="@dimen/sp_12" />
|
||||||
|
|
||||||
|
|
||||||
|
</RelativeLayout>
|
||||||
|
|
||||||
|
<RelativeLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="@dimen/dp_20"
|
||||||
|
>
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginStart="@dimen/dp_5"
|
||||||
|
android:layout_marginLeft="@dimen/dp_5"
|
||||||
|
android:layout_marginEnd="@dimen/dp_5"
|
||||||
|
android:layout_marginRight="@dimen/dp_5"
|
||||||
|
android:layout_marginBottom="@dimen/dp_5"
|
||||||
|
android:text="学号"
|
||||||
|
android:textColor="#000000"
|
||||||
|
android:textSize="@dimen/sp_12" />
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tv_number"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_alignParentRight="true"
|
||||||
|
android:layout_marginStart="@dimen/dp_5"
|
||||||
|
android:layout_marginLeft="@dimen/dp_5"
|
||||||
|
android:layout_marginEnd="@dimen/dp_5"
|
||||||
|
android:layout_marginRight="@dimen/dp_5"
|
||||||
|
android:layout_marginBottom="@dimen/dp_5"
|
||||||
|
android:text="暂无信息"
|
||||||
|
android:textColor="#000000"
|
||||||
|
android:textSize="@dimen/sp_12" />
|
||||||
|
|
||||||
|
|
||||||
|
</RelativeLayout>
|
||||||
|
|
||||||
|
<RelativeLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="@dimen/dp_20"
|
||||||
|
>
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginStart="@dimen/dp_5"
|
||||||
|
android:layout_marginLeft="@dimen/dp_5"
|
||||||
|
android:layout_marginEnd="@dimen/dp_5"
|
||||||
|
android:layout_marginRight="@dimen/dp_5"
|
||||||
|
android:layout_marginBottom="@dimen/dp_5"
|
||||||
|
android:text="姓名"
|
||||||
|
android:textColor="#000000"
|
||||||
|
android:textSize="@dimen/sp_12" />
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tv_name"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_alignParentRight="true"
|
||||||
|
android:layout_marginStart="@dimen/dp_5"
|
||||||
|
android:layout_marginLeft="@dimen/dp_5"
|
||||||
|
android:layout_marginEnd="@dimen/dp_5"
|
||||||
|
android:layout_marginRight="@dimen/dp_5"
|
||||||
|
android:layout_marginBottom="@dimen/dp_5"
|
||||||
|
android:text="暂无信息"
|
||||||
|
android:textColor="#000000"
|
||||||
|
android:textSize="@dimen/sp_12" />
|
||||||
|
|
||||||
|
|
||||||
|
</RelativeLayout>
|
||||||
|
|
||||||
|
<RelativeLayout
|
||||||
|
android:id="@+id/checkupdate"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="@dimen/dp_20"
|
||||||
|
>
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginStart="@dimen/dp_5"
|
||||||
|
android:layout_marginLeft="@dimen/dp_5"
|
||||||
|
android:layout_marginEnd="@dimen/dp_5"
|
||||||
|
android:layout_marginRight="@dimen/dp_5"
|
||||||
|
android:layout_marginBottom="@dimen/dp_5"
|
||||||
|
android:text="版本"
|
||||||
|
android:textColor="#000000"
|
||||||
|
android:textSize="@dimen/sp_12" />
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/version"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_alignParentRight="true"
|
||||||
|
android:layout_marginStart="@dimen/dp_5"
|
||||||
|
android:layout_marginLeft="@dimen/dp_5"
|
||||||
|
android:layout_marginEnd="@dimen/dp_5"
|
||||||
|
android:layout_marginRight="@dimen/dp_5"
|
||||||
|
android:layout_marginBottom="@dimen/dp_5"
|
||||||
|
android:text="版本"
|
||||||
|
android:textColor="#000000"
|
||||||
android:textSize="@dimen/sp_12" />
|
android:textSize="@dimen/sp_12" />
|
||||||
|
|
||||||
|
|
||||||
</RelativeLayout>
|
</RelativeLayout>
|
||||||
|
|
||||||
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/version"
|
android:id="@+id/textView"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginBottom="48dp"
|
android:layout_marginTop="@dimen/dp_8"
|
||||||
android:text="版本:"
|
android:text="连续点击版本号,自动下载新版本"
|
||||||
|
android:textSize="@dimen/sp_12"
|
||||||
android:textColor="#8c8b8b"
|
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintStart_toStartOf="parent" />
|
app:layout_constraintHorizontal_bias="0.5"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toBottomOf="@+id/linearLayout" />
|
||||||
</android.support.constraint.ConstraintLayout>
|
</android.support.constraint.ConstraintLayout>
|
||||||
@@ -8,26 +8,63 @@
|
|||||||
tools:context=".activity.MainActivity">
|
tools:context=".activity.MainActivity">
|
||||||
|
|
||||||
|
|
||||||
|
<android.support.constraint.ConstraintLayout
|
||||||
|
android:id="@+id/bannerLayout"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="@dimen/dp_32"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintHorizontal_bias="0.0"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/textView3"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:gravity="center_horizontal"
|
||||||
|
android:text="我的设备"
|
||||||
|
android:textColor="#000000"
|
||||||
|
android:textSize="@dimen/sp_16"
|
||||||
|
android:textStyle="bold"
|
||||||
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent" />
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/back"
|
||||||
|
android:layout_width="@dimen/dp_16"
|
||||||
|
android:layout_height="@dimen/dp_16"
|
||||||
|
android:layout_marginStart="@dimen/dp_8"
|
||||||
|
android:adjustViewBounds="true"
|
||||||
|
android:scaleType="centerCrop"
|
||||||
|
android:src="@drawable/back"
|
||||||
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="@+id/textView3"
|
||||||
|
app:layout_constraintTop_toTopOf="@+id/textView3" />
|
||||||
|
</android.support.constraint.ConstraintLayout>
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:id="@+id/imageView"
|
android:id="@+id/imageView"
|
||||||
android:layout_width="@dimen/dp_160"
|
android:layout_width="@dimen/dp_160"
|
||||||
android:layout_height="@dimen/dp_160"
|
android:layout_height="@dimen/dp_160"
|
||||||
android:adjustViewBounds="true"
|
android:adjustViewBounds="true"
|
||||||
android:scaleType="fitCenter"
|
android:scaleType="fitCenter"
|
||||||
|
android:src="@drawable/logo"
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toTopOf="parent"
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
app:layout_constraintVertical_bias="0.187"
|
app:layout_constraintVertical_bias="0.15">
|
||||||
>
|
|
||||||
|
|
||||||
</ImageView>
|
</ImageView>
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:id="@+id/linearLayout"
|
android:id="@+id/linearLayout"
|
||||||
android:layout_width="@dimen/dp_170"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginLeft="@dimen/dp_64"
|
||||||
android:layout_marginTop="56dp"
|
android:layout_marginTop="56dp"
|
||||||
|
android:layout_marginRight="@dimen/dp_64"
|
||||||
android:orientation="vertical"
|
android:orientation="vertical"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintHorizontal_bias="0.5"
|
app:layout_constraintHorizontal_bias="0.5"
|
||||||
@@ -35,23 +72,12 @@
|
|||||||
app:layout_constraintTop_toBottomOf="@+id/imageView">
|
app:layout_constraintTop_toBottomOf="@+id/imageView">
|
||||||
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/textView3"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:gravity="center_horizontal"
|
|
||||||
android:text="设备信息"
|
|
||||||
android:textSize="@dimen/sp_16"
|
|
||||||
android:textStyle="bold" />
|
|
||||||
|
|
||||||
<RelativeLayout
|
<RelativeLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="@dimen/dp_30"
|
android:layout_height="@dimen/dp_30">
|
||||||
android:layout_marginTop="@dimen/dp_50">
|
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/tv_devsn"
|
android:layout_width="wrap_content"
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginStart="@dimen/dp_5"
|
android:layout_marginStart="@dimen/dp_5"
|
||||||
android:layout_marginLeft="@dimen/dp_5"
|
android:layout_marginLeft="@dimen/dp_5"
|
||||||
@@ -59,7 +85,21 @@
|
|||||||
android:layout_marginRight="@dimen/dp_5"
|
android:layout_marginRight="@dimen/dp_5"
|
||||||
android:layout_marginBottom="@dimen/dp_5"
|
android:layout_marginBottom="@dimen/dp_5"
|
||||||
android:text="设备SN"
|
android:text="设备SN"
|
||||||
android:textColor="#7b7b7b"
|
android:textColor="#000000"
|
||||||
|
android:textSize="@dimen/sp_12" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tv_devsn"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_alignParentRight="true"
|
||||||
|
android:layout_marginStart="@dimen/dp_5"
|
||||||
|
android:layout_marginLeft="@dimen/dp_5"
|
||||||
|
android:layout_marginEnd="@dimen/dp_5"
|
||||||
|
android:layout_marginRight="@dimen/dp_5"
|
||||||
|
android:layout_marginBottom="@dimen/dp_5"
|
||||||
|
android:text="设备SN"
|
||||||
|
android:textColor="#000000"
|
||||||
android:textSize="@dimen/sp_12" />
|
android:textSize="@dimen/sp_12" />
|
||||||
|
|
||||||
|
|
||||||
@@ -71,8 +111,7 @@
|
|||||||
android:layout_marginTop="@dimen/dp_10">
|
android:layout_marginTop="@dimen/dp_10">
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/tv_devmac"
|
android:layout_width="wrap_content"
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginStart="@dimen/dp_5"
|
android:layout_marginStart="@dimen/dp_5"
|
||||||
android:layout_marginLeft="@dimen/dp_5"
|
android:layout_marginLeft="@dimen/dp_5"
|
||||||
@@ -80,7 +119,158 @@
|
|||||||
android:layout_marginRight="@dimen/dp_5"
|
android:layout_marginRight="@dimen/dp_5"
|
||||||
android:layout_marginBottom="@dimen/dp_5"
|
android:layout_marginBottom="@dimen/dp_5"
|
||||||
android:text="MAC地址"
|
android:text="MAC地址"
|
||||||
android:textColor="#7b7b7b"
|
android:textColor="#000000"
|
||||||
|
android:textSize="@dimen/sp_12" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tv_devmac"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_alignParentRight="true"
|
||||||
|
android:layout_marginStart="@dimen/dp_5"
|
||||||
|
android:layout_marginLeft="@dimen/dp_5"
|
||||||
|
android:layout_marginEnd="@dimen/dp_5"
|
||||||
|
android:layout_marginRight="@dimen/dp_5"
|
||||||
|
android:layout_marginBottom="@dimen/dp_5"
|
||||||
|
android:text="MAC地址"
|
||||||
|
android:textColor="#000000"
|
||||||
|
android:textSize="@dimen/sp_12" />
|
||||||
|
|
||||||
|
|
||||||
|
</RelativeLayout>
|
||||||
|
|
||||||
|
<RelativeLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="@dimen/dp_30"
|
||||||
|
android:layout_marginTop="@dimen/dp_10">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginStart="@dimen/dp_5"
|
||||||
|
android:layout_marginLeft="@dimen/dp_5"
|
||||||
|
android:layout_marginEnd="@dimen/dp_5"
|
||||||
|
android:layout_marginRight="@dimen/dp_5"
|
||||||
|
android:layout_marginBottom="@dimen/dp_5"
|
||||||
|
android:text="班级"
|
||||||
|
android:textColor="#000000"
|
||||||
|
android:textSize="@dimen/sp_12" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tv_class"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_alignParentRight="true"
|
||||||
|
android:layout_marginStart="@dimen/dp_5"
|
||||||
|
android:layout_marginLeft="@dimen/dp_5"
|
||||||
|
android:layout_marginEnd="@dimen/dp_5"
|
||||||
|
android:layout_marginRight="@dimen/dp_5"
|
||||||
|
android:layout_marginBottom="@dimen/dp_5"
|
||||||
|
android:text="暂无信息"
|
||||||
|
android:textColor="#000000"
|
||||||
|
android:textSize="@dimen/sp_12" />
|
||||||
|
|
||||||
|
|
||||||
|
</RelativeLayout>
|
||||||
|
|
||||||
|
<RelativeLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="@dimen/dp_30"
|
||||||
|
android:layout_marginTop="@dimen/dp_10">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginStart="@dimen/dp_5"
|
||||||
|
android:layout_marginLeft="@dimen/dp_5"
|
||||||
|
android:layout_marginEnd="@dimen/dp_5"
|
||||||
|
android:layout_marginRight="@dimen/dp_5"
|
||||||
|
android:layout_marginBottom="@dimen/dp_5"
|
||||||
|
android:text="暂无信息"
|
||||||
|
android:textColor="#000000"
|
||||||
|
android:textSize="@dimen/sp_12" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tv_number"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_alignParentRight="true"
|
||||||
|
android:layout_marginStart="@dimen/dp_5"
|
||||||
|
android:layout_marginLeft="@dimen/dp_5"
|
||||||
|
android:layout_marginEnd="@dimen/dp_5"
|
||||||
|
android:layout_marginRight="@dimen/dp_5"
|
||||||
|
android:layout_marginBottom="@dimen/dp_5"
|
||||||
|
android:text="暂无信息"
|
||||||
|
android:textColor="#000000"
|
||||||
|
android:textSize="@dimen/sp_12" />
|
||||||
|
|
||||||
|
|
||||||
|
</RelativeLayout>
|
||||||
|
|
||||||
|
<RelativeLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="@dimen/dp_30"
|
||||||
|
android:layout_marginTop="@dimen/dp_10">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginStart="@dimen/dp_5"
|
||||||
|
android:layout_marginLeft="@dimen/dp_5"
|
||||||
|
android:layout_marginEnd="@dimen/dp_5"
|
||||||
|
android:layout_marginRight="@dimen/dp_5"
|
||||||
|
android:layout_marginBottom="@dimen/dp_5"
|
||||||
|
android:text="姓名"
|
||||||
|
android:textColor="#000000"
|
||||||
|
android:textSize="@dimen/sp_12" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tv_name"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_alignParentRight="true"
|
||||||
|
android:layout_marginStart="@dimen/dp_5"
|
||||||
|
android:layout_marginLeft="@dimen/dp_5"
|
||||||
|
android:layout_marginEnd="@dimen/dp_5"
|
||||||
|
android:layout_marginRight="@dimen/dp_5"
|
||||||
|
android:layout_marginBottom="@dimen/dp_5"
|
||||||
|
android:text="暂无信息"
|
||||||
|
android:textColor="#000000"
|
||||||
|
android:textSize="@dimen/sp_12" />
|
||||||
|
|
||||||
|
|
||||||
|
</RelativeLayout>
|
||||||
|
|
||||||
|
<RelativeLayout
|
||||||
|
android:id="@+id/checkupdate"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="@dimen/dp_30"
|
||||||
|
android:layout_marginTop="@dimen/dp_10">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginStart="@dimen/dp_5"
|
||||||
|
android:layout_marginLeft="@dimen/dp_5"
|
||||||
|
android:layout_marginEnd="@dimen/dp_5"
|
||||||
|
android:layout_marginRight="@dimen/dp_5"
|
||||||
|
android:layout_marginBottom="@dimen/dp_5"
|
||||||
|
android:text="版本"
|
||||||
|
android:textColor="#000000"
|
||||||
|
android:textSize="@dimen/sp_12" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/version"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_alignParentRight="true"
|
||||||
|
android:layout_marginStart="@dimen/dp_5"
|
||||||
|
android:layout_marginLeft="@dimen/dp_5"
|
||||||
|
android:layout_marginEnd="@dimen/dp_5"
|
||||||
|
android:layout_marginRight="@dimen/dp_5"
|
||||||
|
android:layout_marginBottom="@dimen/dp_5"
|
||||||
|
android:text="版本"
|
||||||
|
android:textColor="#000000"
|
||||||
android:textSize="@dimen/sp_12" />
|
android:textSize="@dimen/sp_12" />
|
||||||
|
|
||||||
|
|
||||||
@@ -89,15 +279,15 @@
|
|||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/version"
|
android:id="@+id/textView"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginTop="80dp"
|
android:layout_marginTop="@dimen/dp_8"
|
||||||
|
android:text="连续点击版本号,自动下载新版本"
|
||||||
android:text="版本:"
|
android:textSize="@dimen/sp_12"
|
||||||
android:textColor="#8c8b8b"
|
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintHorizontal_bias="0.498"
|
app:layout_constraintHorizontal_bias="0.5"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toBottomOf="@+id/linearLayout" />
|
app:layout_constraintTop_toBottomOf="@+id/linearLayout" />
|
||||||
|
|
||||||
</android.support.constraint.ConstraintLayout>
|
</android.support.constraint.ConstraintLayout>
|
||||||
|
Before Width: | Height: | Size: 4.6 KiB After Width: | Height: | Size: 5.0 KiB |
|
Before Width: | Height: | Size: 4.6 KiB After Width: | Height: | Size: 5.0 KiB |
|
Before Width: | Height: | Size: 4.6 KiB After Width: | Height: | Size: 5.0 KiB |
|
Before Width: | Height: | Size: 4.6 KiB After Width: | Height: | Size: 5.0 KiB |
|
Before Width: | Height: | Size: 4.6 KiB After Width: | Height: | Size: 5.0 KiB |