version:4.3
fix:安装应用时不清除桌面缓存,锁定状态改变时不恢复出厂设置 update:在获取sn没有刷写的状态时,获取IMEI作为别名
This commit is contained in:
@@ -61,8 +61,8 @@ android {
|
|||||||
//新平台正式
|
//新平台正式
|
||||||
cube {
|
cube {
|
||||||
flavorDimensions "default"
|
flavorDimensions "default"
|
||||||
versionCode 33
|
versionCode 34
|
||||||
versionName "4.2"
|
versionName "4.3"
|
||||||
/*********************************极光推送************************************/
|
/*********************************极光推送************************************/
|
||||||
manifestPlaceholders = [
|
manifestPlaceholders = [
|
||||||
XG_ACCESS_ID : "1500026372",
|
XG_ACCESS_ID : "1500026372",
|
||||||
|
|||||||
@@ -51,6 +51,8 @@ import java.nio.file.Files;
|
|||||||
import java.nio.file.Path;
|
import java.nio.file.Path;
|
||||||
import java.nio.file.Paths;
|
import java.nio.file.Paths;
|
||||||
|
|
||||||
|
import okhttp3.internal.Util;
|
||||||
|
|
||||||
|
|
||||||
public class SplashActivity extends AppCompatActivity {
|
public class SplashActivity extends AppCompatActivity {
|
||||||
private static String TAG = SplashActivity.class.getSimpleName();
|
private static String TAG = SplashActivity.class.getSimpleName();
|
||||||
@@ -86,6 +88,10 @@ public class SplashActivity extends AppCompatActivity {
|
|||||||
|
|
||||||
private void initView() {
|
private void initView() {
|
||||||
if (BuildConfig.DEBUG) {
|
if (BuildConfig.DEBUG) {
|
||||||
|
Log.e(TAG, "initView: " + Utils.getIMEI(this));
|
||||||
|
Log.e(TAG, "initView: " + Utils.getIMEI(this, 0));
|
||||||
|
Log.e(TAG, "initView: " + Utils.getIMEI(this, 1));
|
||||||
|
|
||||||
// String jsonString = ApkUtils.getRunningAppInfo(this);
|
// String jsonString = ApkUtils.getRunningAppInfo(this);
|
||||||
// Log.e(TAG, "initView: " + jsonString);
|
// Log.e(TAG, "initView: " + jsonString);
|
||||||
ApkUtils.showAllAPP(this);
|
ApkUtils.showAllAPP(this);
|
||||||
|
|||||||
@@ -216,6 +216,9 @@ public class CheckNetActivity extends BaseActivity implements CheckNetContact.Ma
|
|||||||
mCheckNetPresenter.setPushTags();
|
mCheckNetPresenter.setPushTags();
|
||||||
} else {
|
} else {
|
||||||
SysSettingUtils.setEnableSetting(this);
|
SysSettingUtils.setEnableSetting(this);
|
||||||
|
giv_2.setBackgroundResource(R.drawable.successful);
|
||||||
|
giv_3.setBackgroundResource(R.drawable.successful);
|
||||||
|
finish();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -105,7 +105,7 @@ public class CheckNetPresenter implements CheckNetContact.Presenter {
|
|||||||
if (JGYUtils.isOfficialVersion()) {
|
if (JGYUtils.isOfficialVersion()) {
|
||||||
mView.updateDeviceInfoFinish();
|
mView.updateDeviceInfoFinish();
|
||||||
} else {
|
} else {
|
||||||
mNetInterfaceManager.updateDeviceInfo(new NetInterfaceManager.onCompleteCallback() {
|
mNetInterfaceManager.updateDeviceInfo(true, getLifecycle(), new NetInterfaceManager.onCompleteCallback() {
|
||||||
@Override
|
@Override
|
||||||
public void onComplete() {
|
public void onComplete() {
|
||||||
mView.updateDeviceInfoFinish();
|
mView.updateDeviceInfoFinish();
|
||||||
|
|||||||
@@ -9,7 +9,6 @@ import android.content.DialogInterface;
|
|||||||
import android.content.Intent;
|
import android.content.Intent;
|
||||||
import android.content.IntentFilter;
|
import android.content.IntentFilter;
|
||||||
import android.content.ServiceConnection;
|
import android.content.ServiceConnection;
|
||||||
import android.graphics.Bitmap;
|
|
||||||
import android.os.IBinder;
|
import android.os.IBinder;
|
||||||
import android.os.SystemClock;
|
import android.os.SystemClock;
|
||||||
import android.provider.Settings;
|
import android.provider.Settings;
|
||||||
@@ -39,7 +38,6 @@ import com.aoleyun.sn.utils.Utils;
|
|||||||
import com.blankj.utilcode.util.NetworkUtils;
|
import com.blankj.utilcode.util.NetworkUtils;
|
||||||
import com.bumptech.glide.Glide;
|
import com.bumptech.glide.Glide;
|
||||||
import com.google.gson.JsonObject;
|
import com.google.gson.JsonObject;
|
||||||
import com.tencent.mmkv.MMKV;
|
|
||||||
|
|
||||||
import java.util.concurrent.TimeUnit;
|
import java.util.concurrent.TimeUnit;
|
||||||
|
|
||||||
@@ -59,10 +57,12 @@ public class MainActivity extends BaseActivity implements MainAContact.MainView,
|
|||||||
|
|
||||||
public static final String UPDATE_LOCKED_STATUS = "UPDATE_LOCKED_STATUS";
|
public static final String UPDATE_LOCKED_STATUS = "UPDATE_LOCKED_STATUS";
|
||||||
|
|
||||||
@BindView(R.id.imageView)
|
@BindView(R.id.iv_head)
|
||||||
ImageView head;
|
ImageView head;
|
||||||
@BindView(R.id.tv_devsn)
|
@BindView(R.id.tv_devsn)
|
||||||
TextView tv_devsn;
|
TextView tv_devsn;
|
||||||
|
@BindView(R.id.tv_imei2)
|
||||||
|
TextView tv_imei2;
|
||||||
@BindView(R.id.tv_devmac)
|
@BindView(R.id.tv_devmac)
|
||||||
TextView tv_devmac;
|
TextView tv_devmac;
|
||||||
@BindView(R.id.version)
|
@BindView(R.id.version)
|
||||||
@@ -83,9 +83,9 @@ public class MainActivity extends BaseActivity implements MainAContact.MainView,
|
|||||||
Button bt_checkupdate;
|
Button bt_checkupdate;
|
||||||
@BindView(R.id.checkupdate)
|
@BindView(R.id.checkupdate)
|
||||||
ConstraintLayout checkupdate;
|
ConstraintLayout checkupdate;
|
||||||
@BindView(R.id.back)
|
@BindView(R.id.iv_back)
|
||||||
ImageView back;
|
ImageView back;
|
||||||
@BindView(R.id.locked)
|
@BindView(R.id.iv_locked)
|
||||||
ImageView iv_locked;
|
ImageView iv_locked;
|
||||||
@BindView(R.id.layout_class)
|
@BindView(R.id.layout_class)
|
||||||
ConstraintLayout layout_class;
|
ConstraintLayout layout_class;
|
||||||
@@ -93,13 +93,15 @@ public class MainActivity extends BaseActivity implements MainAContact.MainView,
|
|||||||
ConstraintLayout layout_number;
|
ConstraintLayout layout_number;
|
||||||
@BindView(R.id.layout_name)
|
@BindView(R.id.layout_name)
|
||||||
ConstraintLayout layout_name;
|
ConstraintLayout layout_name;
|
||||||
|
@BindView(R.id.cl_imei)
|
||||||
|
ConstraintLayout cl_imei;
|
||||||
@BindView(R.id.tv_customversion)
|
@BindView(R.id.tv_customversion)
|
||||||
TextView tv_customversion;
|
TextView tv_customversion;
|
||||||
|
|
||||||
@OnClick({R.id.back, R.id.tv_title, R.id.chkupd})
|
@OnClick({R.id.iv_back, R.id.tv_title, R.id.chkupd})
|
||||||
public void onClick(View view) {
|
public void onClick(View view) {
|
||||||
switch (view.getId()) {
|
switch (view.getId()) {
|
||||||
case R.id.back:
|
case R.id.iv_back:
|
||||||
lazyExit();
|
lazyExit();
|
||||||
break;
|
break;
|
||||||
case R.id.tv_title:
|
case R.id.tv_title:
|
||||||
@@ -206,8 +208,9 @@ public class MainActivity extends BaseActivity implements MainAContact.MainView,
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void getDevicesInfo() {
|
private void getDevicesInfo() {
|
||||||
String sn = Utils.getSerial();
|
String sn = Utils.getSerial(this);
|
||||||
tv_devsn.setText(sn);
|
tv_devsn.setText(sn);
|
||||||
|
getIMEI();
|
||||||
checkSNError(sn);
|
checkSNError(sn);
|
||||||
String macaddr = Utils.getAndroid10MAC(this);
|
String macaddr = Utils.getAndroid10MAC(this);
|
||||||
if (TextUtils.isEmpty(macaddr)) {
|
if (TextUtils.isEmpty(macaddr)) {
|
||||||
@@ -222,6 +225,16 @@ public class MainActivity extends BaseActivity implements MainAContact.MainView,
|
|||||||
tv_customversion.setText(Utils.getCustomVersion());
|
tv_customversion.setText(Utils.getCustomVersion());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void getIMEI() {
|
||||||
|
if (!Utils.NOSN.equalsIgnoreCase(Utils.getSerial())) {
|
||||||
|
tv_imei2.setText(Utils.getIMEI(this, 1));
|
||||||
|
} else {
|
||||||
|
if (!TextUtils.isEmpty(Utils.getIMEI(this, 1))) {
|
||||||
|
tv_imei2.setText(Utils.getIMEI(this, 1));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private void checkSNError(String sn) {
|
private void checkSNError(String sn) {
|
||||||
//sn长度最长30位
|
//sn长度最长30位
|
||||||
if (sn.length() > 30) {
|
if (sn.length() > 30) {
|
||||||
@@ -430,12 +443,14 @@ public class MainActivity extends BaseActivity implements MainAContact.MainView,
|
|||||||
@Override
|
@Override
|
||||||
protected void onDestroy() {
|
protected void onDestroy() {
|
||||||
super.onDestroy();
|
super.onDestroy();
|
||||||
if (mUpdateReceiver != null) {
|
|
||||||
unregisterReceiver(mUpdateReceiver);
|
|
||||||
}
|
|
||||||
JGYUtils.startServices(MainActivity.this);
|
|
||||||
NetworkUtils.unregisterNetworkStatusChangedListener(this);
|
NetworkUtils.unregisterNetworkStatusChangedListener(this);
|
||||||
mMainAPresenter.detachView();
|
mMainAPresenter.detachView();
|
||||||
|
mMainAPresenter = null;
|
||||||
|
if (mUpdateReceiver != null) {
|
||||||
|
unregisterReceiver(mUpdateReceiver);
|
||||||
|
mUpdateReceiver = null;
|
||||||
|
}
|
||||||
|
JGYUtils.startServices(MainActivity.this);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -27,13 +27,13 @@ public class RequestLogActivity extends BaseActivity implements RequestLogContac
|
|||||||
ImageView iv_delete;
|
ImageView iv_delete;
|
||||||
@BindView(R.id.iv_refresh)
|
@BindView(R.id.iv_refresh)
|
||||||
ImageView iv_refresh;
|
ImageView iv_refresh;
|
||||||
@BindView(R.id.back)
|
@BindView(R.id.iv_back)
|
||||||
ImageView back;
|
ImageView back;
|
||||||
|
|
||||||
@OnClick({R.id.back, R.id.iv_refresh, R.id.iv_delete})
|
@OnClick({R.id.iv_back, R.id.iv_refresh, R.id.iv_delete})
|
||||||
public void onClick(View view) {
|
public void onClick(View view) {
|
||||||
switch (view.getId()) {
|
switch (view.getId()) {
|
||||||
case R.id.back:
|
case R.id.iv_back:
|
||||||
finish();
|
finish();
|
||||||
break;
|
break;
|
||||||
case R.id.iv_refresh:
|
case R.id.iv_refresh:
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ import android.content.Context;
|
|||||||
import android.os.Handler;
|
import android.os.Handler;
|
||||||
import android.os.Looper;
|
import android.os.Looper;
|
||||||
import android.os.Process;
|
import android.os.Process;
|
||||||
|
import android.text.TextUtils;
|
||||||
import android.util.Log;
|
import android.util.Log;
|
||||||
|
|
||||||
import androidx.multidex.MultiDexApplication;
|
import androidx.multidex.MultiDexApplication;
|
||||||
@@ -60,21 +61,11 @@ public class BaseApplication extends MultiDexApplication {
|
|||||||
|
|
||||||
@SuppressLint("StaticFieldLeak")
|
@SuppressLint("StaticFieldLeak")
|
||||||
public static Context context;
|
public static Context context;
|
||||||
@SuppressLint("StaticFieldLeak")
|
|
||||||
private static BaseApplication instance;
|
|
||||||
|
|
||||||
public static Context getAppContext() {
|
public static Context getAppContext() {
|
||||||
return context;
|
return context;
|
||||||
}
|
}
|
||||||
|
|
||||||
// 单例模式中获取唯一的ExitApplication实例
|
|
||||||
public static BaseApplication getInstance() {
|
|
||||||
if (null == instance) {
|
|
||||||
instance = new BaseApplication();
|
|
||||||
}
|
|
||||||
return instance;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onCreate() {
|
public void onCreate() {
|
||||||
super.onCreate();
|
super.onCreate();
|
||||||
@@ -163,7 +154,11 @@ public class BaseApplication extends MultiDexApplication {
|
|||||||
//token在设备卸载重装的时候有可能会变
|
//token在设备卸载重装的时候有可能会变
|
||||||
Log.e("TPush", "注册成功,设备token为:" + data);
|
Log.e("TPush", "注册成功,设备token为:" + data);
|
||||||
List<XGPushManager.AccountInfo> accountInfoList = new ArrayList<>();
|
List<XGPushManager.AccountInfo> accountInfoList = new ArrayList<>();
|
||||||
accountInfoList.add(new XGPushManager.AccountInfo(XGPushManager.AccountType.CUSTOM.getValue(), Utils.getSerial()));
|
accountInfoList.add(new XGPushManager.AccountInfo(XGPushManager.AccountType.CUSTOM.getValue(), Utils.getSerial(getApplicationContext())));
|
||||||
|
if (Utils.NOSN.equalsIgnoreCase(Utils.getSerial())) {
|
||||||
|
accountInfoList.add(new XGPushManager.AccountInfo(XGPushManager.AccountType.CUSTOM.getValue(), Utils.getIMEI(getAppContext(), 0)));
|
||||||
|
accountInfoList.add(new XGPushManager.AccountInfo(XGPushManager.AccountType.CUSTOM.getValue(), Utils.getIMEI(getAppContext(), 1)));
|
||||||
|
}
|
||||||
XGPushManager.upsertAccounts(getAppContext(), accountInfoList, new XGIOperateCallback() {
|
XGPushManager.upsertAccounts(getAppContext(), accountInfoList, new XGIOperateCallback() {
|
||||||
@Override
|
@Override
|
||||||
public void onSuccess(Object data, int flag) {
|
public void onSuccess(Object data, int flag) {
|
||||||
@@ -396,7 +391,7 @@ public class BaseApplication extends MultiDexApplication {
|
|||||||
//https://docs.jiguang.cn/jpush/server/push/rest_api_v3_device/#_5
|
//https://docs.jiguang.cn/jpush/server/push/rest_api_v3_device/#_5
|
||||||
OkHttpClient client = new OkHttpClient();
|
OkHttpClient client = new OkHttpClient();
|
||||||
Request request = new Request.Builder()
|
Request request = new Request.Builder()
|
||||||
.url(UrlAddress.DELETE_JPUSH_ALIAS + Utils.getSerial())
|
.url(UrlAddress.DELETE_JPUSH_ALIAS + Utils.getSerial(getAppContext()))
|
||||||
.header("Authorization", JGYUtils.getAuthorization())
|
.header("Authorization", JGYUtils.getAuthorization())
|
||||||
.delete()
|
.delete()
|
||||||
.build();
|
.build();
|
||||||
@@ -418,7 +413,7 @@ public class BaseApplication extends MultiDexApplication {
|
|||||||
synchronized public static void cleanJpushTag() {
|
synchronized public static void cleanJpushTag() {
|
||||||
OkHttpClient client = new OkHttpClient();
|
OkHttpClient client = new OkHttpClient();
|
||||||
Request request = new Request.Builder()
|
Request request = new Request.Builder()
|
||||||
.url(UrlAddress.DELETE_JPUSH_TAG + Utils.getSerial())
|
.url(UrlAddress.DELETE_JPUSH_TAG + Utils.getSerial(getAppContext()))
|
||||||
.header("Authorization", JGYUtils.getAuthorization())
|
.header("Authorization", JGYUtils.getAuthorization())
|
||||||
.delete()
|
.delete()
|
||||||
.build();
|
.build();
|
||||||
@@ -437,16 +432,6 @@ public class BaseApplication extends MultiDexApplication {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
private boolean finished = false;
|
|
||||||
|
|
||||||
public boolean isFinished() {
|
|
||||||
return finished;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setFinished(boolean b) {
|
|
||||||
this.finished = b;
|
|
||||||
}
|
|
||||||
|
|
||||||
public static void sendAppUsedTime(String random, String type) {
|
public static void sendAppUsedTime(String random, String type) {
|
||||||
StatisticsInfo statisticsInfo = null;
|
StatisticsInfo statisticsInfo = null;
|
||||||
if (type.equals("0")) {
|
if (type.equals("0")) {
|
||||||
@@ -491,7 +476,7 @@ public class BaseApplication extends MultiDexApplication {
|
|||||||
|
|
||||||
NetInterfaceManager.getInstance()
|
NetInterfaceManager.getInstance()
|
||||||
.getAppLogApi()
|
.getAppLogApi()
|
||||||
.getAppLog(Utils.getSerial(), random, data.toJSONString())
|
.getAppLog(Utils.getSerial(getAppContext()), random, data.toJSONString())
|
||||||
.subscribeOn(Schedulers.io())
|
.subscribeOn(Schedulers.io())
|
||||||
.observeOn(AndroidSchedulers.mainThread())
|
.observeOn(AndroidSchedulers.mainThread())
|
||||||
.subscribe(new Observer<BaseResponse>() {
|
.subscribe(new Observer<BaseResponse>() {
|
||||||
|
|||||||
@@ -156,8 +156,6 @@ public class CacheHelper {
|
|||||||
Log.e(TAG, "getAsString: " + sb.toString());
|
Log.e(TAG, "getAsString: " + sb.toString());
|
||||||
}
|
}
|
||||||
return sb.toString();
|
return sb.toString();
|
||||||
|
|
||||||
|
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
if (inputStream != null) {
|
if (inputStream != null) {
|
||||||
|
|||||||
@@ -267,7 +267,7 @@ public class NetInterfaceManager {
|
|||||||
*/
|
*/
|
||||||
public Observable<BaseResponse<StudentsInfo>> getStudesInfoObservable() {
|
public Observable<BaseResponse<StudentsInfo>> getStudesInfoObservable() {
|
||||||
return mRetrofit.create(StudentsInfoApi.class)
|
return mRetrofit.create(StudentsInfoApi.class)
|
||||||
.getStudentsInfo(Utils.getSerial())
|
.getStudentsInfo(Utils.getSerial(mContext))
|
||||||
.subscribeOn(Schedulers.io())
|
.subscribeOn(Schedulers.io())
|
||||||
.observeOn(AndroidSchedulers.mainThread());
|
.observeOn(AndroidSchedulers.mainThread());
|
||||||
}
|
}
|
||||||
@@ -279,7 +279,7 @@ public class NetInterfaceManager {
|
|||||||
*/
|
*/
|
||||||
public Observable<BaseResponse> getDevicesLockedStateObservable() {
|
public Observable<BaseResponse> getDevicesLockedStateObservable() {
|
||||||
return mRetrofit.create(DevicesLockedStateApi.class)
|
return mRetrofit.create(DevicesLockedStateApi.class)
|
||||||
.getLockedState(Utils.getSerial())
|
.getLockedState(Utils.getSerial(mContext))
|
||||||
.subscribeOn(Schedulers.io())
|
.subscribeOn(Schedulers.io())
|
||||||
.observeOn(AndroidSchedulers.mainThread());
|
.observeOn(AndroidSchedulers.mainThread());
|
||||||
}
|
}
|
||||||
@@ -291,7 +291,7 @@ public class NetInterfaceManager {
|
|||||||
*/
|
*/
|
||||||
public Observable<BaseResponse> sendMACAddressObservable() {
|
public Observable<BaseResponse> sendMACAddressObservable() {
|
||||||
return mRetrofit.create(MACAddressApi.class)
|
return mRetrofit.create(MACAddressApi.class)
|
||||||
.sendMACaddress(Utils.getSerial(),
|
.sendMACaddress(Utils.getSerial(mContext),
|
||||||
Utils.getAndroid10MAC(mContext),
|
Utils.getAndroid10MAC(mContext),
|
||||||
"0000",
|
"0000",
|
||||||
// JPushInterface.getRegistrationID(mContext),
|
// JPushInterface.getRegistrationID(mContext),
|
||||||
@@ -320,175 +320,175 @@ public class NetInterfaceManager {
|
|||||||
*/
|
*/
|
||||||
public Observable<BaseResponse<Batch>> getPushTagsObservable() {
|
public Observable<BaseResponse<Batch>> getPushTagsObservable() {
|
||||||
return mRetrofit.create(GetJpushTagsApi.class)
|
return mRetrofit.create(GetJpushTagsApi.class)
|
||||||
.getJpushTags(Utils.getSerial())
|
.getJpushTags(Utils.getSerial(mContext))
|
||||||
.subscribeOn(Schedulers.io())
|
.subscribeOn(Schedulers.io())
|
||||||
.observeOn(AndroidSchedulers.mainThread());
|
.observeOn(AndroidSchedulers.mainThread());
|
||||||
}
|
}
|
||||||
|
|
||||||
public Observable<BaseResponse<BrowserData>> getBrowserListSettingObservable() {
|
public Observable<BaseResponse<BrowserData>> getBrowserListSettingObservable() {
|
||||||
return mRetrofit.create(BrowserListApi.class)
|
return mRetrofit.create(BrowserListApi.class)
|
||||||
.getBrowserList(NetInterfaceManager.HTTP_KEY, Utils.getSerial())
|
.getBrowserList(NetInterfaceManager.HTTP_KEY, Utils.getSerial(mContext))
|
||||||
.subscribeOn(Schedulers.io())
|
.subscribeOn(Schedulers.io())
|
||||||
.observeOn(AndroidSchedulers.mainThread());
|
.observeOn(AndroidSchedulers.mainThread());
|
||||||
}
|
}
|
||||||
|
|
||||||
public Observable<BaseResponse<BrowserBookmarks>> getBrowserBookmarksObservable() {
|
public Observable<BaseResponse<BrowserBookmarks>> getBrowserBookmarksObservable() {
|
||||||
return mRetrofit.create(BrowserBookmarksApi.class)
|
return mRetrofit.create(BrowserBookmarksApi.class)
|
||||||
.getBrowserBookmarks(NetInterfaceManager.HTTP_KEY, Utils.getSerial())
|
.getBrowserBookmarks(NetInterfaceManager.HTTP_KEY, Utils.getSerial(mContext))
|
||||||
.subscribeOn(Schedulers.io())
|
.subscribeOn(Schedulers.io())
|
||||||
.observeOn(AndroidSchedulers.mainThread());
|
.observeOn(AndroidSchedulers.mainThread());
|
||||||
}
|
}
|
||||||
|
|
||||||
public Observable<BaseResponse> getDesktopIconObservable() {
|
public Observable<BaseResponse> getDesktopIconObservable() {
|
||||||
return mRetrofit.create(DesktopIconApi.class)
|
return mRetrofit.create(DesktopIconApi.class)
|
||||||
.getDesktopIcon(NetInterfaceManager.HTTP_KEY, Utils.getSerial())
|
.getDesktopIcon(NetInterfaceManager.HTTP_KEY, Utils.getSerial(mContext))
|
||||||
.subscribeOn(Schedulers.io())
|
.subscribeOn(Schedulers.io())
|
||||||
.observeOn(AndroidSchedulers.mainThread());
|
.observeOn(AndroidSchedulers.mainThread());
|
||||||
}
|
}
|
||||||
|
|
||||||
public Observable<NetAndLaunchBean> getAppAutoStartUpdateAndNetObservable() {
|
public Observable<NetAndLaunchBean> getAppAutoStartUpdateAndNetObservable() {
|
||||||
return mRetrofit.create(NetAndLaunchApi.class)
|
return mRetrofit.create(NetAndLaunchApi.class)
|
||||||
.getNetAndLaunchApi(NetInterfaceManager.HTTP_KEY, Utils.getSerial())
|
.getNetAndLaunchApi(NetInterfaceManager.HTTP_KEY, Utils.getSerial(mContext))
|
||||||
.subscribeOn(Schedulers.io())
|
.subscribeOn(Schedulers.io())
|
||||||
.observeOn(AndroidSchedulers.mainThread());
|
.observeOn(AndroidSchedulers.mainThread());
|
||||||
}
|
}
|
||||||
|
|
||||||
public Observable<BaseResponse<AppID>> getAppIDControlObservable() {
|
public Observable<BaseResponse<AppID>> getAppIDControlObservable() {
|
||||||
return mRetrofit.create(DeselectIDApi.class)
|
return mRetrofit.create(DeselectIDApi.class)
|
||||||
.getDeselectIDApi(NetInterfaceManager.HTTP_KEY, Utils.getSerial())
|
.getDeselectIDApi(NetInterfaceManager.HTTP_KEY, Utils.getSerial(mContext))
|
||||||
.subscribeOn(Schedulers.io())
|
.subscribeOn(Schedulers.io())
|
||||||
.observeOn(AndroidSchedulers.mainThread());
|
.observeOn(AndroidSchedulers.mainThread());
|
||||||
}
|
}
|
||||||
|
|
||||||
public Observable<BaseResponse<List<Appground>>> getAppinsideWebObservable() {
|
public Observable<BaseResponse<List<Appground>>> getAppinsideWebObservable() {
|
||||||
return mRetrofit.create(AppinsideWebApi.class)
|
return mRetrofit.create(AppinsideWebApi.class)
|
||||||
.getAppinsideWeb(NetInterfaceManager.HTTP_KEY, Utils.getSerial())
|
.getAppinsideWeb(NetInterfaceManager.HTTP_KEY, Utils.getSerial(mContext))
|
||||||
.subscribeOn(Schedulers.io())
|
.subscribeOn(Schedulers.io())
|
||||||
.observeOn(AndroidSchedulers.mainThread());
|
.observeOn(AndroidSchedulers.mainThread());
|
||||||
}
|
}
|
||||||
|
|
||||||
public Observable<BaseResponse> getNewAppinsideWebObservable() {
|
public Observable<BaseResponse> getNewAppinsideWebObservable() {
|
||||||
return mRetrofit.create(NewAppinsideWebApi.class)
|
return mRetrofit.create(NewAppinsideWebApi.class)
|
||||||
.getAppinsideWeb(NetInterfaceManager.HTTP_KEY, Utils.getSerial())
|
.getAppinsideWeb(NetInterfaceManager.HTTP_KEY, Utils.getSerial(mContext))
|
||||||
.subscribeOn(Schedulers.io())
|
.subscribeOn(Schedulers.io())
|
||||||
.observeOn(AndroidSchedulers.mainThread());
|
.observeOn(AndroidSchedulers.mainThread());
|
||||||
}
|
}
|
||||||
|
|
||||||
public Observable<BaseResponse> getSystemSettingObservable() {
|
public Observable<BaseResponse> getSystemSettingObservable() {
|
||||||
return mRetrofit.create(SystemSettingApi.class)
|
return mRetrofit.create(SystemSettingApi.class)
|
||||||
.getSystemSettingApi(NetInterfaceManager.HTTP_KEY, Utils.getSerial())
|
.getSystemSettingApi(NetInterfaceManager.HTTP_KEY, Utils.getSerial(mContext))
|
||||||
.subscribeOn(Schedulers.io())
|
.subscribeOn(Schedulers.io())
|
||||||
.observeOn(AndroidSchedulers.mainThread());
|
.observeOn(AndroidSchedulers.mainThread());
|
||||||
}
|
}
|
||||||
|
|
||||||
public Observable<BaseResponse<AppLimit>> getAppLimitObservable() {
|
public Observable<BaseResponse<AppLimit>> getAppLimitObservable() {
|
||||||
return mRetrofit.create(AppLimitApi.class)
|
return mRetrofit.create(AppLimitApi.class)
|
||||||
.getAppLimitApi(NetInterfaceManager.HTTP_KEY, Utils.getSerial())
|
.getAppLimitApi(NetInterfaceManager.HTTP_KEY, Utils.getSerial(mContext))
|
||||||
.subscribeOn(Schedulers.io())
|
.subscribeOn(Schedulers.io())
|
||||||
.observeOn(AndroidSchedulers.mainThread());
|
.observeOn(AndroidSchedulers.mainThread());
|
||||||
}
|
}
|
||||||
|
|
||||||
public Observable<BaseResponse<List<ForceDownloadData>>> getForceDownloadObservable() {
|
public Observable<BaseResponse<List<ForceDownloadData>>> getForceDownloadObservable() {
|
||||||
return mRetrofit.create(ForceDownloadApi.class)
|
return mRetrofit.create(ForceDownloadApi.class)
|
||||||
.getForceDownloadApi(NetInterfaceManager.HTTP_KEY, Utils.getSerial())
|
.getForceDownloadApi(NetInterfaceManager.HTTP_KEY, Utils.getSerial(mContext))
|
||||||
.subscribeOn(Schedulers.io())
|
.subscribeOn(Schedulers.io())
|
||||||
.observeOn(AndroidSchedulers.mainThread());
|
.observeOn(AndroidSchedulers.mainThread());
|
||||||
}
|
}
|
||||||
|
|
||||||
public Observable<BaseResponse<List<ForceDownloadData>>> getTestUpdateObservable() {
|
public Observable<BaseResponse<List<ForceDownloadData>>> getTestUpdateObservable() {
|
||||||
return mRetrofit.create(CheckTestUpdateApi.class)
|
return mRetrofit.create(CheckTestUpdateApi.class)
|
||||||
.getTestUpdate(Utils.getSerial())
|
.getTestUpdate(Utils.getSerial(mContext))
|
||||||
.subscribeOn(Schedulers.io())
|
.subscribeOn(Schedulers.io())
|
||||||
.observeOn(AndroidSchedulers.mainThread());
|
.observeOn(AndroidSchedulers.mainThread());
|
||||||
}
|
}
|
||||||
|
|
||||||
public Observable<BaseResponse<SnTimeControl>> getSnTimeObservable() {
|
public Observable<BaseResponse<SnTimeControl>> getSnTimeObservable() {
|
||||||
return mRetrofit.create(SnTimeControlApi.class)
|
return mRetrofit.create(SnTimeControlApi.class)
|
||||||
.getSnTimeControl(Utils.getSerial())
|
.getSnTimeControl(Utils.getSerial(mContext))
|
||||||
.subscribeOn(Schedulers.io())
|
.subscribeOn(Schedulers.io())
|
||||||
.observeOn(AndroidSchedulers.mainThread());
|
.observeOn(AndroidSchedulers.mainThread());
|
||||||
}
|
}
|
||||||
|
|
||||||
public Observable<BaseResponse<ScreenLockState>> getScreenLockObservable() {
|
public Observable<BaseResponse<ScreenLockState>> getScreenLockObservable() {
|
||||||
return mRetrofit.create(ScreenLockStateApi.class)
|
return mRetrofit.create(ScreenLockStateApi.class)
|
||||||
.getScreenLockState(Utils.getSerial())
|
.getScreenLockState(Utils.getSerial(mContext))
|
||||||
.subscribeOn(Schedulers.io())
|
.subscribeOn(Schedulers.io())
|
||||||
.observeOn(AndroidSchedulers.mainThread());
|
.observeOn(AndroidSchedulers.mainThread());
|
||||||
}
|
}
|
||||||
|
|
||||||
public Observable<BaseResponse> getDesktopObservable() {
|
public Observable<BaseResponse> getDesktopObservable() {
|
||||||
return mRetrofit.create(GetDesktopApi.class)
|
return mRetrofit.create(GetDesktopApi.class)
|
||||||
.getDesktop(Utils.getSerial())
|
.getDesktop(Utils.getSerial(mContext))
|
||||||
.subscribeOn(Schedulers.io())
|
.subscribeOn(Schedulers.io())
|
||||||
.observeOn(AndroidSchedulers.mainThread());
|
.observeOn(AndroidSchedulers.mainThread());
|
||||||
}
|
}
|
||||||
|
|
||||||
public Observable<ResponseBody> getBatchObservable() {
|
public Observable<ResponseBody> getBatchObservable() {
|
||||||
return mRetrofit.create(GetBatchApi.class)
|
return mRetrofit.create(GetBatchApi.class)
|
||||||
.getBatch(Utils.getSerial())
|
.getBatch(Utils.getSerial(mContext))
|
||||||
.subscribeOn(Schedulers.io())
|
.subscribeOn(Schedulers.io())
|
||||||
.observeOn(AndroidSchedulers.mainThread());
|
.observeOn(AndroidSchedulers.mainThread());
|
||||||
}
|
}
|
||||||
|
|
||||||
public Observable<BaseResponse<LogoImg>> getLogoImgObservable() {
|
public Observable<BaseResponse<LogoImg>> getLogoImgObservable() {
|
||||||
return mRetrofit.create(LogoImgApi.class)
|
return mRetrofit.create(LogoImgApi.class)
|
||||||
.getLogoImg(Utils.getSerial())
|
.getLogoImg(Utils.getSerial(mContext))
|
||||||
.subscribeOn(Schedulers.io())
|
.subscribeOn(Schedulers.io())
|
||||||
.observeOn(AndroidSchedulers.mainThread());
|
.observeOn(AndroidSchedulers.mainThread());
|
||||||
}
|
}
|
||||||
|
|
||||||
public Observable<BaseResponse<TopApp>> getTopAppControl() {
|
public Observable<BaseResponse<TopApp>> getTopAppControl() {
|
||||||
return mRetrofit.create(TopAppControlApi.class)
|
return mRetrofit.create(TopAppControlApi.class)
|
||||||
.getSnAppControl(Utils.getSerial())
|
.getSnAppControl(Utils.getSerial(mContext))
|
||||||
.subscribeOn(Schedulers.io())
|
.subscribeOn(Schedulers.io())
|
||||||
.observeOn(AndroidSchedulers.mainThread());
|
.observeOn(AndroidSchedulers.mainThread());
|
||||||
}
|
}
|
||||||
|
|
||||||
public Observable<BaseResponse<DeveloperBean>> getDeveloperControl() {
|
public Observable<BaseResponse<DeveloperBean>> getDeveloperControl() {
|
||||||
return mRetrofit.create(GetDeveloperApi.class)
|
return mRetrofit.create(GetDeveloperApi.class)
|
||||||
.getDeveloperState(Utils.getSerial())
|
.getDeveloperState(Utils.getSerial(mContext))
|
||||||
.subscribeOn(Schedulers.io())
|
.subscribeOn(Schedulers.io())
|
||||||
.observeOn(AndroidSchedulers.mainThread());
|
.observeOn(AndroidSchedulers.mainThread());
|
||||||
}
|
}
|
||||||
|
|
||||||
public Observable<BaseResponse<EBagCode>> getEBagCodeControl() {
|
public Observable<BaseResponse<EBagCode>> getEBagCodeControl() {
|
||||||
return mRetrofit.create(GetEBagCodeApi.class)
|
return mRetrofit.create(GetEBagCodeApi.class)
|
||||||
.getEBagCode(NetInterfaceManager.HTTP_KEY, Utils.getSerial())
|
.getEBagCode(NetInterfaceManager.HTTP_KEY, Utils.getSerial(mContext))
|
||||||
.subscribeOn(Schedulers.io())
|
.subscribeOn(Schedulers.io())
|
||||||
.observeOn(AndroidSchedulers.mainThread());
|
.observeOn(AndroidSchedulers.mainThread());
|
||||||
}
|
}
|
||||||
|
|
||||||
public Observable<BaseResponse<DefaultApp>> getDefaultAppApi() {
|
public Observable<BaseResponse<DefaultApp>> getDefaultAppApi() {
|
||||||
return mRetrofit.create(DefaultAppApi.class)
|
return mRetrofit.create(DefaultAppApi.class)
|
||||||
.getDefaultApp(Utils.getSerial())
|
.getDefaultApp(Utils.getSerial(mContext))
|
||||||
.subscribeOn(Schedulers.io())
|
.subscribeOn(Schedulers.io())
|
||||||
.observeOn(AndroidSchedulers.mainThread());
|
.observeOn(AndroidSchedulers.mainThread());
|
||||||
}
|
}
|
||||||
|
|
||||||
public Observable<BaseResponse> getRestoreTimesApi() {
|
public Observable<BaseResponse> getRestoreTimesApi() {
|
||||||
return mRetrofit.create(SendRestoreTimesApi.class)
|
return mRetrofit.create(SendRestoreTimesApi.class)
|
||||||
.sendRestoreTimes(Utils.getSerial())
|
.sendRestoreTimes(Utils.getSerial(mContext))
|
||||||
.subscribeOn(Schedulers.io())
|
.subscribeOn(Schedulers.io())
|
||||||
.observeOn(AndroidSchedulers.mainThread());
|
.observeOn(AndroidSchedulers.mainThread());
|
||||||
}
|
}
|
||||||
|
|
||||||
public Observable<BaseResponse<List<WiFiAlias>>> getWiFiControl() {
|
public Observable<BaseResponse<List<WiFiAlias>>> getWiFiControl() {
|
||||||
return mRetrofit.create(GetWiFiAliasApi.class)
|
return mRetrofit.create(GetWiFiAliasApi.class)
|
||||||
.getWiFiAlias(Utils.getSerial())
|
.getWiFiAlias(Utils.getSerial(mContext))
|
||||||
.subscribeOn(Schedulers.io())
|
.subscribeOn(Schedulers.io())
|
||||||
.observeOn(AndroidSchedulers.mainThread());
|
.observeOn(AndroidSchedulers.mainThread());
|
||||||
}
|
}
|
||||||
|
|
||||||
public Observable<BaseResponse<List<PoweroffBean>>> getPoweroffTimeControl() {
|
public Observable<BaseResponse<List<PoweroffBean>>> getPoweroffTimeControl() {
|
||||||
return mRetrofit.create(GetPoweroffApi.class)
|
return mRetrofit.create(GetPoweroffApi.class)
|
||||||
.getPoweroffTime(Utils.getSerial())
|
.getPoweroffTime(Utils.getSerial(mContext))
|
||||||
.subscribeOn(Schedulers.io())
|
.subscribeOn(Schedulers.io())
|
||||||
.observeOn(AndroidSchedulers.mainThread());
|
.observeOn(AndroidSchedulers.mainThread());
|
||||||
}
|
}
|
||||||
|
|
||||||
public Observable<BaseResponse<SnRunLog>> getSnRunLogControl() {
|
public Observable<BaseResponse<SnRunLog>> getSnRunLogControl() {
|
||||||
return mRetrofit.create(GetSnRunLogApi.class)
|
return mRetrofit.create(GetSnRunLogApi.class)
|
||||||
.GetSnRunLog(Utils.getSerial())
|
.GetSnRunLog(Utils.getSerial(mContext))
|
||||||
.subscribeOn(Schedulers.io())
|
.subscribeOn(Schedulers.io())
|
||||||
.observeOn(AndroidSchedulers.mainThread());
|
.observeOn(AndroidSchedulers.mainThread());
|
||||||
}
|
}
|
||||||
@@ -502,7 +502,7 @@ public class NetInterfaceManager {
|
|||||||
|
|
||||||
public Observable<BaseResponse<List<AppListInfo>>> GetAllAppApiControl() {
|
public Observable<BaseResponse<List<AppListInfo>>> GetAllAppApiControl() {
|
||||||
return mRetrofit.create(GetAllAppApi.class)
|
return mRetrofit.create(GetAllAppApi.class)
|
||||||
.getAllAppList(NetInterfaceManager.HTTP_KEY, Utils.getSerial())
|
.getAllAppList(NetInterfaceManager.HTTP_KEY, Utils.getSerial(mContext))
|
||||||
.subscribeOn(Schedulers.io())
|
.subscribeOn(Schedulers.io())
|
||||||
.observeOn(AndroidSchedulers.mainThread());
|
.observeOn(AndroidSchedulers.mainThread());
|
||||||
}
|
}
|
||||||
@@ -1314,7 +1314,7 @@ public class NetInterfaceManager {
|
|||||||
getAppIDControl(lifecycle, callback);
|
getAppIDControl(lifecycle, callback);
|
||||||
} else {
|
} else {
|
||||||
Gson gson = new Gson();
|
Gson gson = new Gson();
|
||||||
Type type = new TypeToken<String>() {
|
Type type = new TypeToken<AppID>() {
|
||||||
}.getType();
|
}.getType();
|
||||||
AppID appID = gson.fromJson(jsonString, type);
|
AppID appID = gson.fromJson(jsonString, type);
|
||||||
if (appID == null) {
|
if (appID == null) {
|
||||||
@@ -1665,6 +1665,7 @@ public class NetInterfaceManager {
|
|||||||
/**
|
/**
|
||||||
* 获取设备锁定状态
|
* 获取设备锁定状态
|
||||||
* 不需要缓存
|
* 不需要缓存
|
||||||
|
*
|
||||||
* @param lifecycle
|
* @param lifecycle
|
||||||
* @param callback
|
* @param callback
|
||||||
*/
|
*/
|
||||||
@@ -1684,15 +1685,15 @@ public class NetInterfaceManager {
|
|||||||
JsonObject jsonObject = JsonParser.parseString(new Gson().toJson(response.data)).getAsJsonObject();
|
JsonObject jsonObject = JsonParser.parseString(new Gson().toJson(response.data)).getAsJsonObject();
|
||||||
int locked = jsonObject.get("lock").getAsInt();
|
int locked = jsonObject.get("lock").getAsInt();
|
||||||
Log.e(TAG + ":" + "getLockedState", "locked: " + locked);
|
Log.e(TAG + ":" + "getLockedState", "locked: " + locked);
|
||||||
int oldState = Settings.System.getInt(mContext.getContentResolver(), JGYActions.ACTION_QCH_UNLOCK_IPAD, JGYActions.FRAME_CODE_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(TAG + ":" + "getLockedState", "qch_unlock_ipad: " + oldState);
|
||||||
//后台1是锁定,底层0是锁定
|
//后台1是锁定,底层0是锁定
|
||||||
SPUtils.put(mContext, CommonConfig.JGY_FIRST_CONNECT, 1);
|
SPUtils.put(mContext, CommonConfig.JGY_FIRST_CONNECT, 1);
|
||||||
if (locked == JGYActions.NET_CODE_LOCKED) {
|
if (locked == JGYActions.NET_CODE_LOCKED) {
|
||||||
if (oldState == JGYActions.FRAME_CODE_UNLOCKED) {
|
// if (oldState == JGYActions.FRAME_CODE_UNLOCKED) {
|
||||||
Log.e(TAG + ":" + "getLockedState", "onNext: " + "state changed , reset devices");
|
// Log.e(TAG + ":" + "getLockedState", "onNext: " + "state changed , reset devices");
|
||||||
Utils.doMasterClear(mContext);
|
// Utils.doMasterClear(mContext);
|
||||||
}
|
// }
|
||||||
Settings.System.putInt(mContext.getContentResolver(), JGYActions.ACTION_QCH_UNLOCK_IPAD, JGYActions.FRAME_CODE_LOCKED);
|
Settings.System.putInt(mContext.getContentResolver(), JGYActions.ACTION_QCH_UNLOCK_IPAD, JGYActions.FRAME_CODE_LOCKED);
|
||||||
} else if (locked == JGYActions.NET_CODE_UNLOCKED) {
|
} else if (locked == JGYActions.NET_CODE_UNLOCKED) {
|
||||||
// SysSettingUtils.setEnableSetting(mContext);
|
// SysSettingUtils.setEnableSetting(mContext);
|
||||||
@@ -1726,10 +1727,11 @@ public class NetInterfaceManager {
|
|||||||
*/
|
*/
|
||||||
public void sendMACAddress(BehaviorSubject<ActivityEvent> lifecycle, onCompleteCallback callback) {
|
public void sendMACAddress(BehaviorSubject<ActivityEvent> lifecycle, onCompleteCallback callback) {
|
||||||
String macJson = (String) SPUtils.get(mContext, "macJson", "");
|
String macJson = (String) SPUtils.get(mContext, "macJson", "");
|
||||||
String jsonString = JGYUtils.getInstance().getMacJson();
|
String jsonString = JGYUtils.getInstance().getMacJson(mContext);
|
||||||
// Log.e(TAG, "sendMACAddress: macJson = " + macJson);
|
// Log.e(TAG, "sendMACAddress: macJson = " + macJson);
|
||||||
// Log.e(TAG, "sendMACAddress: jsonString = " + jsonString);
|
// Log.e(TAG, "sendMACAddress: jsonString = " + jsonString);
|
||||||
if (macJson.equals(jsonString)) {
|
if (macJson.equals(jsonString)) {
|
||||||
|
callback.onComplete();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
sendMACAddressObservable()
|
sendMACAddressObservable()
|
||||||
@@ -1745,7 +1747,7 @@ public class NetInterfaceManager {
|
|||||||
public void onNext(@NonNull BaseResponse response) {
|
public void onNext(@NonNull BaseResponse response) {
|
||||||
if (response.code == OK) {
|
if (response.code == OK) {
|
||||||
Log.e("sendMACAddress", response.msg);
|
Log.e("sendMACAddress", response.msg);
|
||||||
SPUtils.put(mContext, "macJson", JGYUtils.getInstance().getMacJson());
|
SPUtils.put(mContext, "macJson", JGYUtils.getInstance().getMacJson(mContext));
|
||||||
} else {
|
} else {
|
||||||
Log.e("sendMACAddress", response.toString());
|
Log.e("sendMACAddress", response.toString());
|
||||||
}
|
}
|
||||||
@@ -1760,7 +1762,9 @@ public class NetInterfaceManager {
|
|||||||
@Override
|
@Override
|
||||||
public void onComplete() {
|
public void onComplete() {
|
||||||
Log.e("sendMACAddress", "onComplete: ");
|
Log.e("sendMACAddress", "onComplete: ");
|
||||||
callback.onComplete();
|
if (callback != null) {
|
||||||
|
callback.onComplete();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@@ -1860,59 +1864,86 @@ public class NetInterfaceManager {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@SuppressLint("NewApi")
|
|
||||||
public void updateDeviceInfo(onCompleteCallback callback) {
|
public void updateDeviceInfo(boolean refresh, BehaviorSubject<ActivityEvent> lifecycle, onCompleteCallback callback) {
|
||||||
String address = String.valueOf(SPUtils.get(mContext, "AmapAddress", "-"));
|
ConnectMode connectMode = ConnectMode.SIX_HOUR;
|
||||||
if ("-".equals(address)) {
|
if (refresh) {
|
||||||
address = "定位失败";
|
connectMode = ConnectMode.DEFAULT;
|
||||||
// address = (String) SPUtils.get(mContext, "AmapError", "-");
|
|
||||||
}
|
}
|
||||||
String longitude = String.valueOf(SPUtils.get(mContext, "longitude", "0"));
|
if (ConnectManager.getInstance().isNeedConnect(UrlAddress.UPDATE_DEVICEINFO, connectMode)) {
|
||||||
String latitude = String.valueOf(SPUtils.get(mContext, "latitude", "0"));
|
updateDeviceInfo(lifecycle, callback);
|
||||||
JSONObject jsonObject = new JSONObject();
|
} else {
|
||||||
jsonObject.put("address", address);
|
String jsonString = cacheHelper.getAsString(UrlAddress.UPDATE_DEVICEINFO);
|
||||||
jsonObject.put("longitude", longitude);
|
//为 "" 是已经请求成功的
|
||||||
jsonObject.put("latitude", latitude);
|
if (jsonString == null) {
|
||||||
String add = jsonObject.toJSONString();
|
updateDeviceInfo(lifecycle, callback);
|
||||||
getUpdateDeviceInfo().updateDeviceInfo(
|
} else {
|
||||||
Utils.getSerial(),
|
|
||||||
|
callback.onComplete();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public void updateDeviceInfo(BehaviorSubject<ActivityEvent> lifecycle, onCompleteCallback callback) {
|
||||||
|
getUpdateDeviceInfoObservable()
|
||||||
|
.compose(RxLifecycle.bindUntilEvent(lifecycle, ActivityEvent.DESTROY))
|
||||||
|
.subscribeOn(Schedulers.io())
|
||||||
|
.observeOn(AndroidSchedulers.mainThread())
|
||||||
|
.subscribe(getUpdateDeviceObserver(callback));
|
||||||
|
}
|
||||||
|
|
||||||
|
public void updateDeviceInfo(onCompleteCallback callback) {
|
||||||
|
getUpdateDeviceInfoObservable()
|
||||||
|
.subscribeOn(Schedulers.io())
|
||||||
|
.observeOn(AndroidSchedulers.mainThread())
|
||||||
|
.subscribe(getUpdateDeviceObserver(callback));
|
||||||
|
}
|
||||||
|
|
||||||
|
private Observable<BaseResponse> getUpdateDeviceInfoObservable() {
|
||||||
|
String add = Utils.getAddressJsonString(mContext);
|
||||||
|
cacheHelper.put(UrlAddress.UPDATE_DEVICEINFO, add);
|
||||||
|
return getUpdateDeviceInfo().updateDeviceInfo(
|
||||||
|
Utils.getSerial(mContext),
|
||||||
NetInterfaceManager.HTTP_KEY,
|
NetInterfaceManager.HTTP_KEY,
|
||||||
Utils.getMachine(mContext),
|
Utils.getMachine(mContext),
|
||||||
Utils.getHardware(mContext),
|
Utils.getHardware(mContext),
|
||||||
add
|
add
|
||||||
)
|
);
|
||||||
.subscribeOn(Schedulers.io())
|
}
|
||||||
.observeOn(AndroidSchedulers.mainThread())
|
|
||||||
.subscribe(new Observer<BaseResponse>() {
|
|
||||||
@Override
|
|
||||||
public void onSubscribe(Disposable d) {
|
|
||||||
Log.e("updateDeviceInfo", "onSubscribe: ");
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
private Observer getUpdateDeviceObserver(onCompleteCallback callback) {
|
||||||
public void onNext(BaseResponse baseResponse) {
|
return new Observer<BaseResponse>() {
|
||||||
Log.e("updateDeviceInfo", "onNext: " + baseResponse.toString());
|
@Override
|
||||||
}
|
public void onSubscribe(Disposable d) {
|
||||||
|
Log.e("updateDeviceInfo", "onSubscribe: ");
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onError(Throwable e) {
|
public void onNext(BaseResponse baseResponse) {
|
||||||
Log.e("updateDeviceInfo", "onSubscribe: " + e.getMessage());
|
Log.e("updateDeviceInfo", "onNext: " + baseResponse.toString());
|
||||||
onComplete();
|
}
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onComplete() {
|
public void onError(Throwable e) {
|
||||||
Log.e("updateDeviceInfo", "onComplete: ");
|
Log.e("updateDeviceInfo", "onSubscribe: " + e.getMessage());
|
||||||
callback.onComplete();
|
onComplete();
|
||||||
}
|
}
|
||||||
});
|
|
||||||
|
@Override
|
||||||
|
public void onComplete() {
|
||||||
|
Log.e("updateDeviceInfo", "onComplete: ");
|
||||||
|
if (callback != null) {
|
||||||
|
callback.onComplete();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
public void sendInstalledAppInfo(onCompleteCallback callback) {
|
public void sendInstalledAppInfo(onCompleteCallback callback) {
|
||||||
String jsonString = ApkUtils.getRunningAppInfo(mContext);
|
String jsonString = ApkUtils.getRunningAppInfo(mContext);
|
||||||
getUploadAppInfoApi()
|
getUploadAppInfoApi()
|
||||||
.getUploadAppInfoApi(NetInterfaceManager.HTTP_KEY,
|
.getUploadAppInfoApi(NetInterfaceManager.HTTP_KEY,
|
||||||
Utils.getSerial(),
|
Utils.getSerial(mContext),
|
||||||
jsonString)
|
jsonString)
|
||||||
.subscribeOn(Schedulers.io())
|
.subscribeOn(Schedulers.io())
|
||||||
.observeOn(AndroidSchedulers.mainThread())
|
.observeOn(AndroidSchedulers.mainThread())
|
||||||
@@ -1949,7 +1980,7 @@ public class NetInterfaceManager {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
Map<String, String> params = new HashMap<>();
|
Map<String, String> params = new HashMap<>();
|
||||||
params.put("sn", Utils.getSerial());
|
params.put("sn", Utils.getSerial(mContext));
|
||||||
MediaType mediaType = MediaType.Companion.parse("text/plain");
|
MediaType mediaType = MediaType.Companion.parse("text/plain");
|
||||||
RequestBody fileBody = RequestBody.Companion.create(logFile, mediaType);
|
RequestBody fileBody = RequestBody.Companion.create(logFile, mediaType);
|
||||||
//设置一个file文件
|
//设置一个file文件
|
||||||
@@ -2317,7 +2348,9 @@ public class NetInterfaceManager {
|
|||||||
Type Type = new TypeToken<ScreenLockState>() {
|
Type Type = new TypeToken<ScreenLockState>() {
|
||||||
}.getType();
|
}.getType();
|
||||||
ScreenLockState screenLockState = gson.fromJson(jsonString, Type);
|
ScreenLockState screenLockState = gson.fromJson(jsonString, Type);
|
||||||
listener.setScreenLockState(screenLockState.getIs_screen_lock() == 1, screenLockState.getName());
|
if (screenLockState != null) {
|
||||||
|
listener.setScreenLockState(screenLockState.getIs_screen_lock() == 1, screenLockState.getName());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -2377,7 +2410,9 @@ public class NetInterfaceManager {
|
|||||||
Type type = new TypeToken<AppLimit>() {
|
Type type = new TypeToken<AppLimit>() {
|
||||||
}.getType();
|
}.getType();
|
||||||
AppLimit appLimit = gson.fromJson(jsonString, type);
|
AppLimit appLimit = gson.fromJson(jsonString, type);
|
||||||
Settings.System.putString(mContext.getContentResolver(), JGYActions.ACTION_JGY_SHORTCUTLIST, appLimit.getResult());
|
if (appLimit != null) {
|
||||||
|
Settings.System.putString(mContext.getContentResolver(), JGYActions.ACTION_JGY_SHORTCUTLIST, appLimit.getResult());
|
||||||
|
}
|
||||||
callback.onComplete();
|
callback.onComplete();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -52,7 +52,7 @@ public class NewAppReceiver extends BroadcastReceiver {
|
|||||||
state = "安装了:";
|
state = "安装了:";
|
||||||
break;
|
break;
|
||||||
case Intent.ACTION_PACKAGE_REPLACED:
|
case Intent.ACTION_PACKAGE_REPLACED:
|
||||||
JGYUtils.getInstance().cleanLauncher3Cache();
|
// JGYUtils.getInstance().cleanLauncher3Cache();
|
||||||
state = "重装了:";
|
state = "重装了:";
|
||||||
break;
|
break;
|
||||||
case Intent.ACTION_PACKAGE_REMOVED:
|
case Intent.ACTION_PACKAGE_REMOVED:
|
||||||
@@ -69,8 +69,7 @@ public class NewAppReceiver extends BroadcastReceiver {
|
|||||||
ApkUtils.addShortcut(context);
|
ApkUtils.addShortcut(context);
|
||||||
ApkUtils.RemoveTask(context, packageName);
|
ApkUtils.RemoveTask(context, packageName);
|
||||||
}
|
}
|
||||||
JGYUtils.getInstance().wakeUpAppstore();
|
JGYUtils.getInstance().wakeUpAoleyunAPP();
|
||||||
|
|
||||||
//启动教官壹
|
//启动教官壹
|
||||||
}
|
}
|
||||||
newAppListener.setNewAppListener(packageName);
|
newAppListener.setNewAppListener(packageName);
|
||||||
|
|||||||
@@ -252,7 +252,7 @@ public class GuardService extends Service {
|
|||||||
long time = System.currentTimeMillis();
|
long time = System.currentTimeMillis();
|
||||||
getLockState("1", String.valueOf(time));
|
getLockState("1", String.valueOf(time));
|
||||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
|
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
|
||||||
JGYUtils.getInstance().wakeUpAppstore();
|
JGYUtils.getInstance().wakeUpAoleyunAPP();
|
||||||
JGYUtils.getInstance().deleteScreenshots();
|
JGYUtils.getInstance().deleteScreenshots();
|
||||||
}
|
}
|
||||||
sendScreenStatus(2);
|
sendScreenStatus(2);
|
||||||
@@ -310,7 +310,7 @@ public class GuardService extends Service {
|
|||||||
.addCallAdapterFactory(RxJava3CallAdapterFactory.create())
|
.addCallAdapterFactory(RxJava3CallAdapterFactory.create())
|
||||||
.build();
|
.build();
|
||||||
SendScreenStatusApi sendScreenStatusApi = retrofit.create(SendScreenStatusApi.class);
|
SendScreenStatusApi sendScreenStatusApi = retrofit.create(SendScreenStatusApi.class);
|
||||||
sendScreenStatusApi.sendScreenStatus(NetInterfaceManager.HTTP_KEY, Utils.getSerial(), status)
|
sendScreenStatusApi.sendScreenStatus(NetInterfaceManager.HTTP_KEY, Utils.getSerial(this), status)
|
||||||
.subscribeOn(Schedulers.io())
|
.subscribeOn(Schedulers.io())
|
||||||
.observeOn(AndroidSchedulers.mainThread())
|
.observeOn(AndroidSchedulers.mainThread())
|
||||||
.subscribe(new Observer<BaseResponse>() {
|
.subscribe(new Observer<BaseResponse>() {
|
||||||
@@ -347,7 +347,7 @@ public class GuardService extends Service {
|
|||||||
}
|
}
|
||||||
NetInterfaceManager.getInstance()
|
NetInterfaceManager.getInstance()
|
||||||
.getLockState()
|
.getLockState()
|
||||||
.getLockState(Utils.getSerial(), status, time)
|
.getLockState(Utils.getSerial(this), status, time)
|
||||||
.subscribeOn(Schedulers.io())
|
.subscribeOn(Schedulers.io())
|
||||||
.observeOn(AndroidSchedulers.mainThread())
|
.observeOn(AndroidSchedulers.mainThread())
|
||||||
.subscribe(new Observer<ResponseBody>() {
|
.subscribe(new Observer<ResponseBody>() {
|
||||||
@@ -494,7 +494,7 @@ public class GuardService extends Service {
|
|||||||
}
|
}
|
||||||
NetInterfaceManager.getInstance()
|
NetInterfaceManager.getInstance()
|
||||||
.getSendTimesApi()
|
.getSendTimesApi()
|
||||||
.sendDownloadTimes(NetInterfaceManager.HTTP_KEY, Utils.getSerial(), app_package, app_id)
|
.sendDownloadTimes(NetInterfaceManager.HTTP_KEY, Utils.getSerial(this), app_package, app_id)
|
||||||
.subscribeOn(Schedulers.io())
|
.subscribeOn(Schedulers.io())
|
||||||
.observeOn(AndroidSchedulers.mainThread())
|
.observeOn(AndroidSchedulers.mainThread())
|
||||||
.subscribe(new Observer<BaseResponse>() {
|
.subscribe(new Observer<BaseResponse>() {
|
||||||
|
|||||||
@@ -219,9 +219,9 @@ public class LogcatService extends Service {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (clear_file) {
|
if (clear_file) {
|
||||||
logFileName = Utils.getSerial() + ".log";
|
logFileName = Utils.getSerial(this) + ".log";
|
||||||
} else {
|
} else {
|
||||||
logFileName = Utils.getSerial() + "-" + getTime() + ".log";
|
logFileName = Utils.getSerial(this) + "-" + getTime() + ".log";
|
||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
@@ -262,7 +262,7 @@ public class LogcatService extends Service {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
Map<String, String> params = new HashMap<>();
|
Map<String, String> params = new HashMap<>();
|
||||||
params.put("sn", Utils.getSerial());
|
params.put("sn", Utils.getSerial(this));
|
||||||
MediaType mediaType = MediaType.Companion.parse("text/html");
|
MediaType mediaType = MediaType.Companion.parse("text/html");
|
||||||
RequestBody fileBody = RequestBody.Companion.create(file, mediaType);
|
RequestBody fileBody = RequestBody.Companion.create(file, mediaType);
|
||||||
//设置一个file文件
|
//设置一个file文件
|
||||||
|
|||||||
@@ -227,7 +227,7 @@ public class StepService extends Service implements NetworkUtils.OnNetworkStatus
|
|||||||
*/
|
*/
|
||||||
public void sendMsg() {
|
public void sendMsg() {
|
||||||
JSONObject jsonObject = new JSONObject();
|
JSONObject jsonObject = new JSONObject();
|
||||||
jsonObject.put("sn", Utils.getSerial());
|
jsonObject.put("sn", Utils.getSerial(this));
|
||||||
PowerManager pm = (PowerManager) getSystemService(Context.POWER_SERVICE);
|
PowerManager pm = (PowerManager) getSystemService(Context.POWER_SERVICE);
|
||||||
if (!pm.isScreenOn()) {
|
if (!pm.isScreenOn()) {
|
||||||
jsonObject.put("online", 2);
|
jsonObject.put("online", 2);
|
||||||
@@ -243,7 +243,7 @@ public class StepService extends Service implements NetworkUtils.OnNetworkStatus
|
|||||||
|
|
||||||
public void sendMsg(int state) {
|
public void sendMsg(int state) {
|
||||||
JSONObject jsonObject = new JSONObject();
|
JSONObject jsonObject = new JSONObject();
|
||||||
jsonObject.put("sn", Utils.getSerial());
|
jsonObject.put("sn", Utils.getSerial(this));
|
||||||
jsonObject.put("online", state);
|
jsonObject.put("online", state);
|
||||||
try {
|
try {
|
||||||
if (null != client) {
|
if (null != client) {
|
||||||
|
|||||||
@@ -72,7 +72,7 @@ public class MainSPresenter implements MainSContact.Presenter {
|
|||||||
this.requesting = requesting;
|
this.requesting = requesting;
|
||||||
}
|
}
|
||||||
|
|
||||||
public long responseTime;
|
public long responseTime;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 1
|
* 1
|
||||||
@@ -169,7 +169,7 @@ public class MainSPresenter implements MainSContact.Presenter {
|
|||||||
if (JGYUtils.isOfficialVersion()) {
|
if (JGYUtils.isOfficialVersion()) {
|
||||||
mView.updateDeviceInfoFinish();
|
mView.updateDeviceInfoFinish();
|
||||||
}
|
}
|
||||||
NetInterfaceManager.getInstance().updateDeviceInfo(new NetInterfaceManager.onCompleteCallback() {
|
NetInterfaceManager.getInstance().updateDeviceInfo(true, getLifecycle(), new NetInterfaceManager.onCompleteCallback() {
|
||||||
@Override
|
@Override
|
||||||
public void onComplete() {
|
public void onComplete() {
|
||||||
mView.updateDeviceInfoFinish();
|
mView.updateDeviceInfoFinish();
|
||||||
|
|||||||
@@ -158,7 +158,7 @@ public class MainService extends Service implements MainSContact.MainView, Netwo
|
|||||||
//token在设备卸载重装的时候有可能会变
|
//token在设备卸载重装的时候有可能会变
|
||||||
Log.e("TPush", "注册成功,设备token为:" + data);
|
Log.e("TPush", "注册成功,设备token为:" + data);
|
||||||
List<XGPushManager.AccountInfo> accountInfoList = new ArrayList<>();
|
List<XGPushManager.AccountInfo> accountInfoList = new ArrayList<>();
|
||||||
accountInfoList.add(new XGPushManager.AccountInfo(XGPushManager.AccountType.CUSTOM.getValue(), Utils.getSerial()));
|
accountInfoList.add(new XGPushManager.AccountInfo(XGPushManager.AccountType.CUSTOM.getValue(), Utils.getSerial(MainService.this)));
|
||||||
XGPushManager.upsertAccounts(MainService.this, accountInfoList, new XGIOperateCallback() {
|
XGPushManager.upsertAccounts(MainService.this, accountInfoList, new XGIOperateCallback() {
|
||||||
@Override
|
@Override
|
||||||
public void onSuccess(Object data, int flag) {
|
public void onSuccess(Object data, int flag) {
|
||||||
@@ -402,7 +402,7 @@ public class MainService extends Service implements MainSContact.MainView, Netwo
|
|||||||
@Override
|
@Override
|
||||||
public int onStartCommand(Intent intent, int flags, int startId) {
|
public int onStartCommand(Intent intent, int flags, int startId) {
|
||||||
Log.e(TAG, "onStartCommand: ");
|
Log.e(TAG, "onStartCommand: ");
|
||||||
JGYUtils.getInstance().wakeUpAppstore();
|
JGYUtils.getInstance().wakeUpAoleyunAPP();
|
||||||
if (mMMKV.decodeInt(CommonConfig.DEVICES_FRIST_START, 1) == 0) {
|
if (mMMKV.decodeInt(CommonConfig.DEVICES_FRIST_START, 1) == 0) {
|
||||||
if (!checkAoleyunApp()) {
|
if (!checkAoleyunApp()) {
|
||||||
Log.e(TAG, "onStartCommand: " + "checkAoleyunApp");
|
Log.e(TAG, "onStartCommand: " + "checkAoleyunApp");
|
||||||
|
|||||||
@@ -82,12 +82,12 @@ import okhttp3.RequestBody;
|
|||||||
import okhttp3.ResponseBody;
|
import okhttp3.ResponseBody;
|
||||||
|
|
||||||
public class MessageReceiver extends XGPushBaseReceiver {
|
public class MessageReceiver extends XGPushBaseReceiver {
|
||||||
|
private static final String TAG = MessageReceiver.class.getSimpleName();
|
||||||
|
|
||||||
public static final String UPDATE_LISTVIEW_ACTION = "com.qq.xgdemo.activity.UPDATE_LISTVIEW";
|
public static final String UPDATE_LISTVIEW_ACTION = "com.qq.xgdemo.activity.UPDATE_LISTVIEW";
|
||||||
public static final String TEST_ACTION = "com.qq.xgdemo.activity.TEST_ACTION";
|
public static final String TEST_ACTION = "com.qq.xgdemo.activity.TEST_ACTION";
|
||||||
public static final String LogTag = "xg.test";
|
public static final String LogTag = "xg.test";
|
||||||
|
|
||||||
private static final String TAG = MessageReceiver.class.getSimpleName();
|
|
||||||
|
|
||||||
/*删除应用*/
|
/*删除应用*/
|
||||||
private final String MSG_DELETE = "1";
|
private final String MSG_DELETE = "1";
|
||||||
/*系统设置管控*/
|
/*系统设置管控*/
|
||||||
@@ -488,6 +488,8 @@ public class MessageReceiver extends XGPushBaseReceiver {
|
|||||||
ToastUtil.betaShow("收到管控:设备重置");
|
ToastUtil.betaShow("收到管控:设备重置");
|
||||||
JGYUtils.getInstance().cleanAoleLauncher3Cache();
|
JGYUtils.getInstance().cleanAoleLauncher3Cache();
|
||||||
Utils.doMasterClear(mContext);
|
Utils.doMasterClear(mContext);
|
||||||
|
JGYUtils.getInstance().cleanAoleAppCache();
|
||||||
|
JGYUtils.getInstance().wakeUpAoleyunAPP();
|
||||||
MainService.mPresenter.getLockedState("MSG_PUSH_RESET");
|
MainService.mPresenter.getLockedState("MSG_PUSH_RESET");
|
||||||
break;
|
break;
|
||||||
case MSG_INSTALL:
|
case MSG_INSTALL:
|
||||||
@@ -505,9 +507,7 @@ public class MessageReceiver extends XGPushBaseReceiver {
|
|||||||
break;
|
break;
|
||||||
case MSG_ONEPACKAGES:
|
case MSG_ONEPACKAGES:
|
||||||
ToastUtil.betaShow("收到管控:");
|
ToastUtil.betaShow("收到管控:");
|
||||||
if (BaseApplication.getInstance().isFinished()) {
|
|
||||||
settingOneNet(extras);
|
settingOneNet(extras);
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
case GET_APP_USEDTIME:
|
case GET_APP_USEDTIME:
|
||||||
ToastUtil.betaShow("收到管控:获取应用使用时间");
|
ToastUtil.betaShow("收到管控:获取应用使用时间");
|
||||||
@@ -689,6 +689,7 @@ public class MessageReceiver extends XGPushBaseReceiver {
|
|||||||
case UPDATE_BATCH:
|
case UPDATE_BATCH:
|
||||||
ToastUtil.betaShow("收到管控:更换批次不恢复出厂设置");
|
ToastUtil.betaShow("收到管控:更换批次不恢复出厂设置");
|
||||||
Aria.download(this).removeAllTask(true);
|
Aria.download(this).removeAllTask(true);
|
||||||
|
JGYUtils.getInstance().cleanAoleAppCache();
|
||||||
try {
|
try {
|
||||||
new CacheUtils().cleanApplicationUserData(mContext, "com.android.browser");
|
new CacheUtils().cleanApplicationUserData(mContext, "com.android.browser");
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
@@ -772,7 +773,7 @@ public class MessageReceiver extends XGPushBaseReceiver {
|
|||||||
}
|
}
|
||||||
if (packageInfo == null) {
|
if (packageInfo == null) {
|
||||||
Log.e(TAG, "doDownloadAndInstall: " + app_package + "未安装");
|
Log.e(TAG, "doDownloadAndInstall: " + app_package + "未安装");
|
||||||
Utils.ariaDownload(mContext, app_url, packageObj);
|
Utils.ariaDownload(mContext, app_url, packageObj);
|
||||||
} else {
|
} else {
|
||||||
long appVersionCode;
|
long appVersionCode;
|
||||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.P) {
|
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.P) {
|
||||||
@@ -781,7 +782,7 @@ public class MessageReceiver extends XGPushBaseReceiver {
|
|||||||
appVersionCode = packageInfo.versionCode;
|
appVersionCode = packageInfo.versionCode;
|
||||||
}
|
}
|
||||||
if (app_version_code > appVersionCode) {
|
if (app_version_code > appVersionCode) {
|
||||||
Utils.ariaDownload(mContext, app_url, packageObj);
|
Utils.ariaDownload(mContext, app_url, packageObj);
|
||||||
} else {
|
} else {
|
||||||
Log.e(TAG, "doDownloadAndInstall: " + app_package + "已安装最新版");
|
Log.e(TAG, "doDownloadAndInstall: " + app_package + "已安装最新版");
|
||||||
}
|
}
|
||||||
@@ -1005,7 +1006,7 @@ public class MessageReceiver extends XGPushBaseReceiver {
|
|||||||
//设置一个file文件
|
//设置一个file文件
|
||||||
MultipartBody.Part body = MultipartBody.Part.createFormData("file", file.getName(), fileBody);
|
MultipartBody.Part body = MultipartBody.Part.createFormData("file", file.getName(), fileBody);
|
||||||
Map<String, String> params = new HashMap<>();
|
Map<String, String> params = new HashMap<>();
|
||||||
params.put("sn", Utils.getSerial());
|
params.put("sn", Utils.getSerial(mContext));
|
||||||
params.put("createtime", String.valueOf(time));
|
params.put("createtime", String.valueOf(time));
|
||||||
NetInterfaceManager.getInstance().getScreenshotApi()
|
NetInterfaceManager.getInstance().getScreenshotApi()
|
||||||
.sendScreenshot(params, body)
|
.sendScreenshot(params, body)
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ import android.app.ActivityManager;
|
|||||||
import android.app.ActivityManagerNative;
|
import android.app.ActivityManagerNative;
|
||||||
import android.app.ActivityTaskManager;
|
import android.app.ActivityTaskManager;
|
||||||
import android.content.ComponentName;
|
import android.content.ComponentName;
|
||||||
|
import android.content.ContentResolver;
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.content.ContextWrapper;
|
import android.content.ContextWrapper;
|
||||||
import android.content.Intent;
|
import android.content.Intent;
|
||||||
@@ -102,6 +103,8 @@ public class JGYUtils {
|
|||||||
@SuppressLint("StaticFieldLeak")
|
@SuppressLint("StaticFieldLeak")
|
||||||
private static JGYUtils sInstance;
|
private static JGYUtils sInstance;
|
||||||
private Context mContext;
|
private Context mContext;
|
||||||
|
private ContentResolver crv;
|
||||||
|
|
||||||
public static int MTKPlatform = 1;
|
public static int MTKPlatform = 1;
|
||||||
public static int ZhanruiPlatform = 2;
|
public static int ZhanruiPlatform = 2;
|
||||||
public static int UnknowPlatform = 0;
|
public static int UnknowPlatform = 0;
|
||||||
@@ -121,6 +124,7 @@ public class JGYUtils {
|
|||||||
throw new RuntimeException("Context is NULL");
|
throw new RuntimeException("Context is NULL");
|
||||||
}
|
}
|
||||||
this.mContext = context;
|
this.mContext = context;
|
||||||
|
this.crv = context.getContentResolver();
|
||||||
this.cacheHelper = new CacheHelper(context);
|
this.cacheHelper = new CacheHelper(context);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -180,7 +184,7 @@ public class JGYUtils {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public boolean getDeviceIsLocked() {
|
public boolean getDeviceIsLocked() {
|
||||||
int locked = Settings.System.getInt(mContext.getContentResolver(), JGYActions.ACTION_QCH_UNLOCK_IPAD, JGYActions.FRAME_CODE_LOCKED);
|
int locked = Settings.System.getInt(crv, JGYActions.ACTION_QCH_UNLOCK_IPAD, JGYActions.FRAME_CODE_LOCKED);
|
||||||
return locked == JGYActions.FRAME_CODE_LOCKED;
|
return locked == JGYActions.FRAME_CODE_LOCKED;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -265,11 +269,11 @@ public class JGYUtils {
|
|||||||
|
|
||||||
if (disallowSlide.size() != 0) {
|
if (disallowSlide.size() != 0) {
|
||||||
String slide_not = String.join(",", disallowSlide);
|
String slide_not = String.join(",", disallowSlide);
|
||||||
boolean writeSucceed = Settings.System.putString(mContext.getContentResolver(), "qch_disable_slide", slide_not);
|
boolean writeSucceed = Settings.System.putString(crv, "qch_disable_slide", slide_not);
|
||||||
Log.e("fht", "qch_disable_slide=" + writeSucceed + ":" + slide_not);
|
Log.e("fht", "qch_disable_slide=" + writeSucceed + ":" + slide_not);
|
||||||
} else {
|
} else {
|
||||||
String slide_ok = String.join(",", allowSlide);
|
String slide_ok = String.join(",", allowSlide);
|
||||||
boolean writeSucceed = Settings.System.putString(mContext.getContentResolver(), "qch_disable_slide", "Invalid");
|
boolean writeSucceed = Settings.System.putString(crv, "qch_disable_slide", "Invalid");
|
||||||
Log.e("fht", "qch_disable_slide ok=" + writeSucceed + ":" + slide_ok);
|
Log.e("fht", "qch_disable_slide ok=" + writeSucceed + ":" + slide_ok);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -283,19 +287,18 @@ public class JGYUtils {
|
|||||||
Log.e(TAG, "setNetAndlaunch: qch_app_power_on: " + qch_app_power_on);
|
Log.e(TAG, "setNetAndlaunch: qch_app_power_on: " + qch_app_power_on);
|
||||||
if (TextUtils.isEmpty(qch_app_power_on)) {
|
if (TextUtils.isEmpty(qch_app_power_on)) {
|
||||||
//当 qch_app_power_on 的值为空时,会造成系统所有应用断网
|
//当 qch_app_power_on 的值为空时,会造成系统所有应用断网
|
||||||
Settings.System.putString(mContext.getContentResolver(), "qch_app_power_on", "Invalid");
|
Settings.System.putString(crv, "qch_app_power_on", "Invalid");
|
||||||
Log.e(TAG, "setNetAndlaunch: qch_app_power_on: " + "Invalid");
|
Log.e(TAG, "setNetAndlaunch: qch_app_power_on: " + "Invalid");
|
||||||
} else {
|
} else {
|
||||||
Settings.System.putString(mContext.getContentResolver(), "qch_app_power_on", qch_app_power_on);
|
Settings.System.putString(crv, "qch_app_power_on", qch_app_power_on);
|
||||||
Log.e(TAG, "setNetAndlaunch: qch_app_power_on: " + qch_app_power_on);
|
Log.e(TAG, "setNetAndlaunch: qch_app_power_on: " + qch_app_power_on);
|
||||||
}
|
}
|
||||||
// if (BuildConfig.DEBUG) {
|
// if (BuildConfig.DEBUG) {
|
||||||
// TODO: 2021/7/2 测试写入为空是否断网
|
// TODO: 2021/7/2 测试写入为空是否断网
|
||||||
// boolean w = Settings.System.putString(mContext.getContentResolver(), "qch_app_power_on", "");
|
// boolean w = Settings.System.putString(crv, "qch_app_power_on", "");
|
||||||
// Log.e(TAG, "setNetAndlaunch: 测试写入: " + w);
|
// Log.e(TAG, "setNetAndlaunch: 测试写入: " + w);
|
||||||
// }
|
// }
|
||||||
setAppNetwork(mContext, disallowNetApp);
|
setAppNetwork(mContext, disallowNetApp);
|
||||||
BaseApplication.getInstance().setFinished(true);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void checkPackageAndVersion(HashSet<String> disallowUpgrade, List<AppListInfo> appListInfos) {
|
private void checkPackageAndVersion(HashSet<String> disallowUpgrade, List<AppListInfo> appListInfos) {
|
||||||
@@ -372,11 +375,11 @@ public class JGYUtils {
|
|||||||
|
|
||||||
if (disallowSlide.size() != 0) {
|
if (disallowSlide.size() != 0) {
|
||||||
String slide_not = String.join(",", disallowSlide);
|
String slide_not = String.join(",", disallowSlide);
|
||||||
boolean writeSucceed = Settings.System.putString(mContext.getContentResolver(), "qch_disable_slide", slide_not);
|
boolean writeSucceed = Settings.System.putString(crv, "qch_disable_slide", slide_not);
|
||||||
Log.e("fht", "qch_disable_slide=" + writeSucceed + ":" + slide_not);
|
Log.e("fht", "qch_disable_slide=" + writeSucceed + ":" + slide_not);
|
||||||
} else {
|
} else {
|
||||||
String slide_ok = String.join(",", allowSlide);
|
String slide_ok = String.join(",", allowSlide);
|
||||||
boolean writeSucceed = Settings.System.putString(mContext.getContentResolver(), "qch_disable_slide", "Invalid");
|
boolean writeSucceed = Settings.System.putString(crv, "qch_disable_slide", "Invalid");
|
||||||
Log.e("fht", "qch_disable_slide ok=" + writeSucceed + ":" + slide_ok);
|
Log.e("fht", "qch_disable_slide ok=" + writeSucceed + ":" + slide_ok);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -389,19 +392,18 @@ public class JGYUtils {
|
|||||||
Log.e(TAG, "setNetAndlaunch: qch_app_power_on: " + qch_app_power_on);
|
Log.e(TAG, "setNetAndlaunch: qch_app_power_on: " + qch_app_power_on);
|
||||||
if (TextUtils.isEmpty(qch_app_power_on)) {
|
if (TextUtils.isEmpty(qch_app_power_on)) {
|
||||||
//当 qch_app_power_on 的值为空时,会造成系统所有应用断网
|
//当 qch_app_power_on 的值为空时,会造成系统所有应用断网
|
||||||
Settings.System.putString(mContext.getContentResolver(), "qch_app_power_on", "Invalid");
|
Settings.System.putString(crv, "qch_app_power_on", "Invalid");
|
||||||
Log.e(TAG, "setNetAndlaunch: qch_app_power_on: " + "Invalid");
|
Log.e(TAG, "setNetAndlaunch: qch_app_power_on: " + "Invalid");
|
||||||
} else {
|
} else {
|
||||||
Settings.System.putString(mContext.getContentResolver(), "qch_app_power_on", qch_app_power_on);
|
Settings.System.putString(crv, "qch_app_power_on", qch_app_power_on);
|
||||||
Log.e(TAG, "setNetAndlaunch: qch_app_power_on: " + qch_app_power_on);
|
Log.e(TAG, "setNetAndlaunch: qch_app_power_on: " + qch_app_power_on);
|
||||||
}
|
}
|
||||||
// if (BuildConfig.DEBUG) {
|
// if (BuildConfig.DEBUG) {
|
||||||
// TODO: 2021/7/2 测试写入为空是否断网
|
// TODO: 2021/7/2 测试写入为空是否断网
|
||||||
// boolean w = Settings.System.putString(mContext.getContentResolver(), "qch_app_power_on", "");
|
// boolean w = Settings.System.putString(crv, "qch_app_power_on", "");
|
||||||
// Log.e(TAG, "setNetAndlaunch: 测试写入: " + w);
|
// Log.e(TAG, "setNetAndlaunch: 测试写入: " + w);
|
||||||
// }
|
// }
|
||||||
setAppNetwork(mContext, disallowNetApp);
|
setAppNetwork(mContext, disallowNetApp);
|
||||||
BaseApplication.getInstance().setFinished(true);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@SuppressLint("NewApi")
|
@SuppressLint("NewApi")
|
||||||
@@ -482,7 +484,7 @@ public class JGYUtils {
|
|||||||
|
|
||||||
String net_not = String.join(",", blackList);
|
String net_not = String.join(",", blackList);
|
||||||
SPUtils.put(context, JGYActions.ACTION_HRRECEIVER_JGY_DIS, net_not);
|
SPUtils.put(context, JGYActions.ACTION_HRRECEIVER_JGY_DIS, net_not);
|
||||||
//Settings.System.putString(mContext.getContentResolver(), JGYActions.ACTION_HrReceiver_JGY_DIS, net_not);
|
//Settings.System.putString(crv, JGYActions.ACTION_HrReceiver_JGY_DIS, net_not);
|
||||||
Log.e("fht", "not::" + net_not);
|
Log.e("fht", "not::" + net_not);
|
||||||
|
|
||||||
//Intent netControlIntent = new Intent(CommonDatas.ACTION_HrReceiver_JGY_DIS);
|
//Intent netControlIntent = new Intent(CommonDatas.ACTION_HrReceiver_JGY_DIS);
|
||||||
@@ -546,17 +548,17 @@ public class JGYUtils {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
String olddeselectViewArray = Settings.System.getString(mContext.getContentResolver(), "qch_app_forbid_id");
|
String olddeselectViewArray = Settings.System.getString(crv, "qch_app_forbid_id");
|
||||||
Log.e("writeDeselectIDtoSystem", "olddeselectViewArray: " + olddeselectViewArray);
|
Log.e("writeDeselectIDtoSystem", "olddeselectViewArray: " + olddeselectViewArray);
|
||||||
|
|
||||||
Settings.System.putString(mContext.getContentResolver(), "qch_app_forbid_id", packageStringBuilder.toString());
|
Settings.System.putString(crv, "qch_app_forbid_id", packageStringBuilder.toString());
|
||||||
Settings.System.putString(mContext.getContentResolver(), "DeselectViewArray", idStringBuilder.toString());
|
Settings.System.putString(crv, "DeselectViewArray", idStringBuilder.toString());
|
||||||
Log.e("writeDeselectIDtoSystem", "qch_app_forbid_id: " + packageStringBuilder.toString());
|
Log.e("writeDeselectIDtoSystem", "qch_app_forbid_id: " + packageStringBuilder.toString());
|
||||||
Log.e("writeDeselectIDtoSystem", "deselectViewArray: " + idStringBuilder.toString());
|
Log.e("writeDeselectIDtoSystem", "deselectViewArray: " + idStringBuilder.toString());
|
||||||
} else {
|
} else {
|
||||||
Log.e("writeDeselectIDtoSystem", "writeDeselectIDtoSystem is null:");
|
Log.e("writeDeselectIDtoSystem", "writeDeselectIDtoSystem is null:");
|
||||||
Settings.System.putString(mContext.getContentResolver(), "qch_app_forbid_id", "");
|
Settings.System.putString(crv, "qch_app_forbid_id", "");
|
||||||
Settings.System.putString(mContext.getContentResolver(), "DeselectViewArray", "");
|
Settings.System.putString(crv, "DeselectViewArray", "");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -963,8 +965,8 @@ public class JGYUtils {
|
|||||||
pkgSet.removeIf(TextUtils::isEmpty);
|
pkgSet.removeIf(TextUtils::isEmpty);
|
||||||
String qch_app_forbid = String.join(",", pkgSet);
|
String qch_app_forbid = String.join(",", pkgSet);
|
||||||
Log.e(TAG, "writeAppPackageList: " + qch_app_forbid);
|
Log.e(TAG, "writeAppPackageList: " + qch_app_forbid);
|
||||||
boolean b = Settings.System.putString(mContext.getContentResolver(), "qch_app_forbid", qch_app_forbid);
|
boolean b = Settings.System.putString(crv, "qch_app_forbid", qch_app_forbid);
|
||||||
Log.e("writeAppPackageList: ", "qch_app_forbid is :" + b + " " + Settings.System.getString(mContext.getContentResolver(), "qch_app_forbid"));
|
Log.e("writeAppPackageList: ", "qch_app_forbid is :" + b + " " + Settings.System.getString(crv, "qch_app_forbid"));
|
||||||
}
|
}
|
||||||
|
|
||||||
public void checkForceDownload() {
|
public void checkForceDownload() {
|
||||||
@@ -1151,10 +1153,10 @@ public class JGYUtils {
|
|||||||
versionCode = info.versionCode;
|
versionCode = info.versionCode;
|
||||||
}
|
}
|
||||||
if (app_version_code > versionCode) {
|
if (app_version_code > versionCode) {
|
||||||
Utils.ariaDownload(mContext, app_url, jsonObject);
|
Utils.ariaDownload(mContext, app_url, jsonObject);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
Utils.ariaDownload(mContext, app_url, jsonObject);
|
Utils.ariaDownload(mContext, app_url, jsonObject);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1162,7 +1164,7 @@ public class JGYUtils {
|
|||||||
|
|
||||||
//删除用户除了在应用市场的其他应用
|
//删除用户除了在应用市场的其他应用
|
||||||
public void deleteOtherApp() {
|
public void deleteOtherApp() {
|
||||||
int locked = Settings.System.getInt(mContext.getContentResolver(), JGYActions.ACTION_QCH_UNLOCK_IPAD, 0);
|
int locked = Settings.System.getInt(crv, JGYActions.ACTION_QCH_UNLOCK_IPAD, 0);
|
||||||
if (locked == 1) {
|
if (locked == 1) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -1170,12 +1172,12 @@ public class JGYUtils {
|
|||||||
String[] result_white = new String[]{};
|
String[] result_white = new String[]{};
|
||||||
String[] result_forbid = new String[]{};
|
String[] result_forbid = new String[]{};
|
||||||
//获取后台应用白名单
|
//获取后台应用白名单
|
||||||
String only_jgy_shortcut_list = Settings.System.getString(mContext.getContentResolver(), JGYActions.ACTION_JGY_SHORTCUTLIST);
|
String only_jgy_shortcut_list = Settings.System.getString(crv, JGYActions.ACTION_JGY_SHORTCUTLIST);
|
||||||
if (!TextUtils.isEmpty(only_jgy_shortcut_list)) {
|
if (!TextUtils.isEmpty(only_jgy_shortcut_list)) {
|
||||||
result_white = only_jgy_shortcut_list.split(",");
|
result_white = only_jgy_shortcut_list.split(",");
|
||||||
}
|
}
|
||||||
//获取可以被安装的包名
|
//获取可以被安装的包名
|
||||||
String qch_app_forbid = Settings.System.getString(mContext.getContentResolver(), "qch_app_forbid");
|
String qch_app_forbid = Settings.System.getString(crv, "qch_app_forbid");
|
||||||
if (!TextUtils.isEmpty(qch_app_forbid)) {
|
if (!TextUtils.isEmpty(qch_app_forbid)) {
|
||||||
result_forbid = qch_app_forbid.split(",");
|
result_forbid = qch_app_forbid.split(",");
|
||||||
}
|
}
|
||||||
@@ -1397,7 +1399,11 @@ public class JGYUtils {
|
|||||||
public void setDeveloperOptions(int state) {
|
public void setDeveloperOptions(int state) {
|
||||||
Log.e(TAG, "getDeveloper: " + state);
|
Log.e(TAG, "getDeveloper: " + state);
|
||||||
if (!BuildConfig.DEBUG) {
|
if (!BuildConfig.DEBUG) {
|
||||||
Settings.System.putInt(mContext.getContentResolver(), "qch_Developeroptions", state);
|
Settings.System.putInt(crv, "qch_Developeroptions", state);
|
||||||
|
if (JGYUtils.getInstance().checkAppPlatform() == JGYUtils.ZhanruiPlatform) {
|
||||||
|
Settings.Global.putInt(crv, Settings.Global.DEVELOPMENT_SETTINGS_ENABLED, state == 1 ? 0 : 1);
|
||||||
|
Settings.Global.putInt(crv, Settings.Global.ADB_ENABLED, state == 1 ? 0 : 1);
|
||||||
|
}
|
||||||
if (state == 1) {
|
if (state == 1) {
|
||||||
Intent intent = new Intent();
|
Intent intent = new Intent();
|
||||||
intent.setAction("qch_developeroptions_close");
|
intent.setAction("qch_developeroptions_close");
|
||||||
@@ -1411,8 +1417,13 @@ public class JGYUtils {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private String chromium_pkg = "org.chromium.browser";
|
||||||
|
|
||||||
public void hookWebView() {
|
public void hookWebView() {
|
||||||
int sdkInt = Build.VERSION.SDK_INT;
|
int sdkInt = Build.VERSION.SDK_INT;
|
||||||
|
if (!ApkUtils.isAvailable(mContext, chromium_pkg)) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
try {
|
try {
|
||||||
Class<?> factoryClass = Class.forName("android.webkit.WebViewFactory");
|
Class<?> factoryClass = Class.forName("android.webkit.WebViewFactory");
|
||||||
Field field = factoryClass.getDeclaredField("sProviderInstance");
|
Field field = factoryClass.getDeclaredField("sProviderInstance");
|
||||||
@@ -1463,7 +1474,7 @@ public class JGYUtils {
|
|||||||
Log.i(TAG, "Hook failed!");
|
Log.i(TAG, "Hook failed!");
|
||||||
}
|
}
|
||||||
} catch (Throwable e) {
|
} catch (Throwable e) {
|
||||||
Log.w(TAG, e.getMessage());
|
Log.w(TAG, "hookWebView: " + e.getMessage());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1908,9 +1919,9 @@ public class JGYUtils {
|
|||||||
Log.e(TAG, "setDefaultDesktop: " + pkg + ":" + className);
|
Log.e(TAG, "setDefaultDesktop: " + pkg + ":" + className);
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getMacJson() {
|
public String getMacJson(Context context) {
|
||||||
JsonObject jsonObject = new JsonObject();
|
JsonObject jsonObject = new JsonObject();
|
||||||
jsonObject.addProperty("sn", Utils.getSerial());
|
jsonObject.addProperty("sn", Utils.getSerial(context));
|
||||||
jsonObject.addProperty("mac", Utils.getAndroid10MAC(mContext));
|
jsonObject.addProperty("mac", Utils.getAndroid10MAC(mContext));
|
||||||
// jsonObject.addProperty("jpush_id", JPushInterface.getRegistrationID(mContext));
|
// jsonObject.addProperty("jpush_id", JPushInterface.getRegistrationID(mContext));
|
||||||
jsonObject.addProperty("jpush_id", "0000");
|
jsonObject.addProperty("jpush_id", "0000");
|
||||||
@@ -1937,28 +1948,6 @@ public class JGYUtils {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public static final String PACKAGE_DEVICEINFO = "com.aoleyun.sn";
|
|
||||||
public static final String PACKAGE_APPSTORE = "com.aoleyun.appstore";
|
|
||||||
|
|
||||||
public static final String CLASS_DEVICEINFO = "com.aoleyun.sn.receiver.BootReceiver";
|
|
||||||
public static final String CLASS_APPSTORE = "com.aoleyun.appstore.receiver.BootReceiver";
|
|
||||||
|
|
||||||
public void wakeUpDeviceInfo() {
|
|
||||||
//启动设备信息
|
|
||||||
Intent bootIntent = new Intent(BootReceiver.BOOT_COMPLETED);
|
|
||||||
bootIntent.setComponent(new ComponentName(PACKAGE_DEVICEINFO, CLASS_DEVICEINFO));
|
|
||||||
mContext.sendBroadcast(bootIntent);
|
|
||||||
}
|
|
||||||
|
|
||||||
public void wakeUpAppstore() {
|
|
||||||
//启动应用市场
|
|
||||||
Intent bootIntent = new Intent(BootReceiver.BOOT_COMPLETED);
|
|
||||||
bootIntent.setComponent(new ComponentName(PACKAGE_APPSTORE, CLASS_APPSTORE));
|
|
||||||
mContext.sendBroadcast(bootIntent);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 判断网络连接状态
|
* 判断网络连接状态
|
||||||
*
|
*
|
||||||
@@ -1990,8 +1979,59 @@ public class JGYUtils {
|
|||||||
try {
|
try {
|
||||||
new CacheUtils().cleanApplicationUserData(mContext, "com.aoleyun.os");
|
new CacheUtils().cleanApplicationUserData(mContext, "com.aoleyun.os");
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
Log.e(TAG, "onReceive: " + e.getMessage());
|
Log.e(TAG, "cleanAoleLauncher3Cache: " + e.getMessage());
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void cleanAoleAppCache() {
|
||||||
|
try {
|
||||||
|
new CacheUtils().cleanApplicationUserData(mContext, "com.aoleyun.os");
|
||||||
|
new CacheUtils().cleanApplicationUserData(mContext, "com.aoleyun.appstore");
|
||||||
|
new CacheUtils().cleanApplicationUserData(mContext, "com.aoleyun.info");
|
||||||
|
new CacheUtils().cleanApplicationUserData(mContext, "com.aoleyun.browser");
|
||||||
|
} catch (Exception e) {
|
||||||
|
Log.e(TAG, "cleanAoleAppCache: " + e.getMessage());
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public static final String PACKAGE_DEVICEINFO = "com.aoleyun.sn";
|
||||||
|
public static final String CLASS_DEVICEINFO = "com.aoleyun.sn.receiver.BootReceiver";
|
||||||
|
|
||||||
|
public void wakeUpDeviceInfo() {
|
||||||
|
Log.e(TAG, "wakeUpDeviceInfo: ");
|
||||||
|
//启动设备信息
|
||||||
|
Intent bootIntent = new Intent(BootReceiver.BOOT_COMPLETED);
|
||||||
|
bootIntent.setComponent(new ComponentName(PACKAGE_DEVICEINFO, CLASS_DEVICEINFO));
|
||||||
|
mContext.sendBroadcast(bootIntent);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static final String PACKAGE_APPSTORE = "com.aoleyun.appstore";
|
||||||
|
public static final String CLASS_APPSTORE = "com.aoleyun.appstore.receiver.BootReceiver";
|
||||||
|
|
||||||
|
public void wakeUpAppstore() {
|
||||||
|
Log.e(TAG, "wakeUpAppstore: ");
|
||||||
|
//启动应用市场
|
||||||
|
Intent bootIntent = new Intent(BootReceiver.BOOT_COMPLETED);
|
||||||
|
bootIntent.setComponent(new ComponentName(PACKAGE_APPSTORE, CLASS_APPSTORE));
|
||||||
|
mContext.sendBroadcast(bootIntent);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static final String PACKAGE_NOTIFY = "com.aoleyun.info";
|
||||||
|
public static final String CLASS_NOTIFY = "com.aoleyun.info.receiver.BootReceiver";
|
||||||
|
|
||||||
|
public void wakeUpNotify() {
|
||||||
|
Log.e(TAG, "wakeUpNotify: ");
|
||||||
|
//启动通知
|
||||||
|
Intent bootIntent = new Intent(BootReceiver.BOOT_COMPLETED);
|
||||||
|
bootIntent.setComponent(new ComponentName(PACKAGE_NOTIFY, CLASS_NOTIFY));
|
||||||
|
mContext.sendBroadcast(bootIntent);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void wakeUpAoleyunAPP() {
|
||||||
|
wakeUpAppstore();
|
||||||
|
wakeUpNotify();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -56,6 +56,7 @@ import com.aoleyun.sn.comm.CommonConfig;
|
|||||||
import com.aoleyun.sn.network.NetInterfaceManager;
|
import com.aoleyun.sn.network.NetInterfaceManager;
|
||||||
import com.arialyy.aria.core.Aria;
|
import com.arialyy.aria.core.Aria;
|
||||||
import com.blankj.utilcode.util.FileUtils;
|
import com.blankj.utilcode.util.FileUtils;
|
||||||
|
import com.google.gson.JsonObject;
|
||||||
import com.google.zxing.BarcodeFormat;
|
import com.google.zxing.BarcodeFormat;
|
||||||
import com.google.zxing.EncodeHintType;
|
import com.google.zxing.EncodeHintType;
|
||||||
import com.google.zxing.WriterException;
|
import com.google.zxing.WriterException;
|
||||||
@@ -73,6 +74,7 @@ import java.io.IOException;
|
|||||||
import java.io.InputStreamReader;
|
import java.io.InputStreamReader;
|
||||||
import java.io.LineNumberReader;
|
import java.io.LineNumberReader;
|
||||||
import java.io.Reader;
|
import java.io.Reader;
|
||||||
|
import java.lang.reflect.InvocationTargetException;
|
||||||
import java.lang.reflect.Method;
|
import java.lang.reflect.Method;
|
||||||
import java.net.Inet4Address;
|
import java.net.Inet4Address;
|
||||||
import java.net.InetAddress;
|
import java.net.InetAddress;
|
||||||
@@ -688,12 +690,41 @@ public class Utils {
|
|||||||
return t1;
|
return t1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static String NOSN = "012345679ABCDEF";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取设备序列号
|
* 获取设备序列号
|
||||||
*
|
*
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@SuppressLint("MissingPermission")
|
@SuppressLint({"MissingPermission", "HardwareIds"})
|
||||||
|
public static String getSerial(Context context) {
|
||||||
|
String serial = "unknow";
|
||||||
|
try {
|
||||||
|
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.P) {//9.0+
|
||||||
|
serial = Build.getSerial();
|
||||||
|
} else if (Build.VERSION.SDK_INT > Build.VERSION_CODES.N) {//8.0+
|
||||||
|
serial = Build.SERIAL;
|
||||||
|
} else {//8.0-
|
||||||
|
Class<?> c = Class.forName("android.os.SystemProperties");
|
||||||
|
Method get = c.getMethod("get", String.class);
|
||||||
|
serial = (String) get.invoke(c, "ro.serialno");
|
||||||
|
}
|
||||||
|
} catch (Exception e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
Log.e("getSerial", "读取设备序列号异常:" + e.toString());
|
||||||
|
}
|
||||||
|
if (BuildConfig.DEBUG) {
|
||||||
|
// return "QNG2DKB00463";
|
||||||
|
// serial = "012345679ABCDEF";
|
||||||
|
}
|
||||||
|
if (NOSN.equalsIgnoreCase(serial)) {
|
||||||
|
return getIMEI(context);
|
||||||
|
}
|
||||||
|
return serial;
|
||||||
|
}
|
||||||
|
|
||||||
|
@SuppressLint({"MissingPermission", "HardwareIds"})
|
||||||
public static String getSerial() {
|
public static String getSerial() {
|
||||||
String serial = "unknow";
|
String serial = "unknow";
|
||||||
try {
|
try {
|
||||||
@@ -928,7 +959,7 @@ public class Utils {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 更新应用白名单禁止升级
|
* 更新应用白名单禁止升级
|
||||||
*
|
*
|
||||||
* @param context
|
* @param context
|
||||||
@@ -1163,7 +1194,7 @@ public class Utils {
|
|||||||
try {
|
try {
|
||||||
interfaces = Collections.list(NetworkInterface.getNetworkInterfaces());
|
interfaces = Collections.list(NetworkInterface.getNetworkInterfaces());
|
||||||
for (NetworkInterface networkInterface : interfaces) {
|
for (NetworkInterface networkInterface : interfaces) {
|
||||||
if (networkInterface != null && TextUtils.isEmpty(networkInterface.getName()) == false) {
|
if (networkInterface != null && !TextUtils.isEmpty(networkInterface.getName())) {
|
||||||
if ("wlan0".equalsIgnoreCase(networkInterface.getName())) {
|
if ("wlan0".equalsIgnoreCase(networkInterface.getName())) {
|
||||||
byte[] macBytes = networkInterface.getHardwareAddress();
|
byte[] macBytes = networkInterface.getHardwareAddress();
|
||||||
if (macBytes != null && macBytes.length > 0) {
|
if (macBytes != null && macBytes.length > 0) {
|
||||||
@@ -1185,16 +1216,25 @@ public class Utils {
|
|||||||
return "unknown";
|
return "unknown";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@SuppressLint("HardwareIds")
|
||||||
|
public static String getIMEI(Context context, int slotIndex) {
|
||||||
|
TelephonyManager tm = (TelephonyManager) context.getSystemService(Context.TELEPHONY_SERVICE);
|
||||||
|
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
|
||||||
|
return tm.getImei(slotIndex);
|
||||||
|
} else {
|
||||||
|
return tm.getDeviceId(slotIndex);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@SuppressLint("HardwareIds")
|
||||||
public static String getIMEI(Context context) {
|
public static String getIMEI(Context context) {
|
||||||
String IMEI = "unknow";
|
String IMEI = "unknow";
|
||||||
String IMEI1, IMEI2, IMEI3;
|
|
||||||
//获取手机设备号
|
//获取手机设备号
|
||||||
TelephonyManager TelephonyMgr = (TelephonyManager) context.getSystemService(Context.TELEPHONY_SERVICE);
|
TelephonyManager TelephonyMgr = (TelephonyManager) context.getSystemService(Context.TELEPHONY_SERVICE);
|
||||||
//8.0及以后版本获取
|
//8.0及以后版本获取
|
||||||
if (android.os.Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
|
if (android.os.Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
|
||||||
IMEI = TelephonyMgr.getDeviceId();
|
IMEI = TelephonyMgr.getDeviceId();
|
||||||
} else if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) {
|
// } else if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) {
|
||||||
// try {
|
// try {
|
||||||
// Method method = TelephonyMgr.getClass().getMethod("getImei");
|
// Method method = TelephonyMgr.getClass().getMethod("getImei");
|
||||||
// IMEI = (String) method.invoke(TelephonyMgr);
|
// IMEI = (String) method.invoke(TelephonyMgr);
|
||||||
@@ -1205,7 +1245,7 @@ public class Utils {
|
|||||||
// IMEI = TelephonyMgr.getDeviceId();
|
// IMEI = TelephonyMgr.getDeviceId();
|
||||||
|
|
||||||
// } else {//9.0到10.0获取
|
// } else {//9.0到10.0获取
|
||||||
IMEI = Settings.System.getString(context.getContentResolver(), Settings.Secure.ANDROID_ID);
|
// IMEI = Settings.System.getString(context.getContentResolver(), Settings.Secure.ANDROID_ID);
|
||||||
}
|
}
|
||||||
Log.e("IMEI:", "IMEI: " + IMEI);
|
Log.e("IMEI:", "IMEI: " + IMEI);
|
||||||
if (null == IMEI) {
|
if (null == IMEI) {
|
||||||
@@ -1213,9 +1253,40 @@ public class Utils {
|
|||||||
} else {
|
} else {
|
||||||
return IMEI.toUpperCase();
|
return IMEI.toUpperCase();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* IMEI 1号
|
||||||
|
*
|
||||||
|
* @param context
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
// public static String getIMEI_1(Context context) {
|
||||||
|
// TelephonyManager tm = (TelephonyManager) context.getSystemService(Context.TELEPHONY_SERVICE);
|
||||||
|
// return tm != null ? tm.getDeviceId() : "";
|
||||||
|
// }
|
||||||
|
|
||||||
|
/**
|
||||||
|
* IMEI 2号
|
||||||
|
*
|
||||||
|
* @param context
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
// public static String getIMEI_2(Context context) {
|
||||||
|
// TelephonyManager tm = (TelephonyManager) context.getSystemService(Context.TELEPHONY_SERVICE);
|
||||||
|
// Class clazz = tm.getClass();
|
||||||
|
// try {
|
||||||
|
// Method getImei = clazz.getDeclaredMethod("getImei", int.class);
|
||||||
|
// return getImei.invoke(tm, 1).toString();
|
||||||
|
// } catch (NoSuchMethodException e) {
|
||||||
|
// e.printStackTrace();
|
||||||
|
// } catch (InvocationTargetException e) {
|
||||||
|
// e.printStackTrace();
|
||||||
|
// } catch (IllegalAccessException e) {
|
||||||
|
// e.printStackTrace();
|
||||||
|
// }
|
||||||
|
// return "";
|
||||||
|
// }
|
||||||
public static String getMachine(Context context) {
|
public static String getMachine(Context context) {
|
||||||
String device = Build.MODEL;//机型
|
String device = Build.MODEL;//机型
|
||||||
String imei = getIMEI(context);
|
String imei = getIMEI(context);
|
||||||
@@ -1259,6 +1330,21 @@ public class Utils {
|
|||||||
return jsonString;
|
return jsonString;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static String getAddressJsonString(Context context) {
|
||||||
|
String address = String.valueOf(SPUtils.get(context, "AmapAddress", "-"));
|
||||||
|
if ("-".equals(address)) {
|
||||||
|
address = "定位失败";
|
||||||
|
}
|
||||||
|
String longitude = String.valueOf(SPUtils.get(context, "longitude", "0"));
|
||||||
|
String latitude = String.valueOf(SPUtils.get(context, "latitude", "0"));
|
||||||
|
JsonObject jsonObject = new JsonObject();
|
||||||
|
jsonObject.addProperty("address", address);
|
||||||
|
jsonObject.addProperty("longitude", longitude);
|
||||||
|
jsonObject.addProperty("latitude", latitude);
|
||||||
|
String jsonString = jsonObject.toString();
|
||||||
|
return jsonString;
|
||||||
|
}
|
||||||
|
|
||||||
private static int getNumCores() {
|
private static int getNumCores() {
|
||||||
// Private Class to display only CPU devices in the directory listing
|
// Private Class to display only CPU devices in the directory listing
|
||||||
class CpuFilter implements FileFilter {
|
class CpuFilter implements FileFilter {
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
tools:context="com.aoleyun.sn.activity.SplashActivity">
|
tools:context="com.aoleyun.sn.activity.SplashActivity">
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:id="@+id/imageView"
|
android:id="@+id/iv_head"
|
||||||
android:layout_width="266dp"
|
android:layout_width="266dp"
|
||||||
android:layout_height="100dp"
|
android:layout_height="100dp"
|
||||||
android:layout_marginTop="80dp"
|
android:layout_marginTop="80dp"
|
||||||
@@ -24,9 +24,9 @@
|
|||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:text="logtest"
|
android:text="logtest"
|
||||||
android:visibility="gone"
|
android:visibility="gone"
|
||||||
app:layout_constraintEnd_toEndOf="@+id/imageView"
|
app:layout_constraintEnd_toEndOf="@+id/iv_head"
|
||||||
app:layout_constraintStart_toStartOf="@+id/imageView"
|
app:layout_constraintStart_toStartOf="@+id/iv_head"
|
||||||
app:layout_constraintTop_toBottomOf="@+id/imageView" />
|
app:layout_constraintTop_toBottomOf="@+id/iv_head" />
|
||||||
|
|
||||||
<Button
|
<Button
|
||||||
android:id="@+id/bt_stop"
|
android:id="@+id/bt_stop"
|
||||||
|
|||||||
@@ -17,7 +17,7 @@
|
|||||||
app:layout_constraintTop_toTopOf="parent">
|
app:layout_constraintTop_toTopOf="parent">
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:id="@+id/back"
|
android:id="@+id/iv_back"
|
||||||
android:layout_width="@dimen/dp_16"
|
android:layout_width="@dimen/dp_16"
|
||||||
android:layout_height="@dimen/dp_16"
|
android:layout_height="@dimen/dp_16"
|
||||||
android:layout_marginLeft="@dimen/dp_16"
|
android:layout_marginLeft="@dimen/dp_16"
|
||||||
@@ -43,7 +43,7 @@
|
|||||||
app:layout_constraintTop_toTopOf="parent" />
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:id="@+id/locked"
|
android:id="@+id/iv_locked"
|
||||||
android:layout_width="@dimen/dp_12"
|
android:layout_width="@dimen/dp_12"
|
||||||
android:layout_height="@dimen/dp_12"
|
android:layout_height="@dimen/dp_12"
|
||||||
android:layout_marginStart="@dimen/dp_8"
|
android:layout_marginStart="@dimen/dp_8"
|
||||||
@@ -71,7 +71,7 @@
|
|||||||
android:layout_weight="1">
|
android:layout_weight="1">
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:id="@+id/imageView"
|
android:id="@+id/iv_head"
|
||||||
android:layout_width="@dimen/dp_100"
|
android:layout_width="@dimen/dp_100"
|
||||||
android:layout_height="@dimen/dp_100"
|
android:layout_height="@dimen/dp_100"
|
||||||
android:adjustViewBounds="true"
|
android:adjustViewBounds="true"
|
||||||
@@ -95,10 +95,10 @@
|
|||||||
app:layout_constraintBottom_toTopOf="@id/tv_customversion"
|
app:layout_constraintBottom_toTopOf="@id/tv_customversion"
|
||||||
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/iv_head">
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:id="@+id/linearLayout"
|
android:id="@+id/ll_info"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_gravity="center"
|
android:layout_gravity="center"
|
||||||
@@ -122,14 +122,14 @@
|
|||||||
android:visibility="visible"
|
android:visibility="visible"
|
||||||
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/iv_head" />
|
||||||
|
|
||||||
<androidx.constraintlayout.widget.ConstraintLayout
|
<androidx.constraintlayout.widget.ConstraintLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="@dimen/dp_30">
|
android:layout_height="@dimen/dp_30">
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:id="@+id/imageView2"
|
android:id="@+id/iv_sn"
|
||||||
android:layout_width="30dp"
|
android:layout_width="30dp"
|
||||||
android:layout_height="30dp"
|
android:layout_height="30dp"
|
||||||
android:layout_marginStart="4dp"
|
android:layout_marginStart="4dp"
|
||||||
@@ -141,7 +141,7 @@
|
|||||||
app:layout_constraintTop_toTopOf="parent" />
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/textView2"
|
android:id="@+id/tv_sn"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginStart="16dp"
|
android:layout_marginStart="16dp"
|
||||||
@@ -149,7 +149,7 @@
|
|||||||
android:textColor="#000000"
|
android:textColor="#000000"
|
||||||
android:textSize="@dimen/sp_12"
|
android:textSize="@dimen/sp_12"
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
app:layout_constraintStart_toEndOf="@+id/imageView2"
|
app:layout_constraintStart_toEndOf="@+id/iv_sn"
|
||||||
app:layout_constraintTop_toTopOf="parent" />
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
@@ -159,9 +159,50 @@
|
|||||||
android:text="设备SN"
|
android:text="设备SN"
|
||||||
android:textColor="#000000"
|
android:textColor="#000000"
|
||||||
android:textSize="@dimen/sp_12"
|
android:textSize="@dimen/sp_12"
|
||||||
app:layout_constraintBottom_toBottomOf="@+id/textView2"
|
app:layout_constraintBottom_toBottomOf="@+id/tv_sn"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintTop_toTopOf="@+id/textView2" />
|
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>
|
||||||
|
|
||||||
<androidx.constraintlayout.widget.ConstraintLayout
|
<androidx.constraintlayout.widget.ConstraintLayout
|
||||||
@@ -169,7 +210,7 @@
|
|||||||
android:layout_height="@dimen/dp_30">
|
android:layout_height="@dimen/dp_30">
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:id="@+id/imageView3"
|
android:id="@+id/iv_mac"
|
||||||
android:layout_width="30dp"
|
android:layout_width="30dp"
|
||||||
android:layout_height="30dp"
|
android:layout_height="30dp"
|
||||||
android:layout_marginStart="4dp"
|
android:layout_marginStart="4dp"
|
||||||
@@ -181,6 +222,7 @@
|
|||||||
app:layout_constraintTop_toTopOf="parent" />
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
|
android:id="@+id/tv_mac"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginStart="16dp"
|
android:layout_marginStart="16dp"
|
||||||
@@ -188,7 +230,7 @@
|
|||||||
android:textColor="#000000"
|
android:textColor="#000000"
|
||||||
android:textSize="@dimen/sp_12"
|
android:textSize="@dimen/sp_12"
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
app:layout_constraintStart_toEndOf="@+id/imageView3"
|
app:layout_constraintStart_toEndOf="@+id/iv_mac"
|
||||||
app:layout_constraintTop_toTopOf="parent" />
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
@@ -210,7 +252,7 @@
|
|||||||
android:visibility="visible">
|
android:visibility="visible">
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:id="@+id/imageView4"
|
android:id="@+id/iv_class"
|
||||||
android:layout_width="30dp"
|
android:layout_width="30dp"
|
||||||
android:layout_height="30dp"
|
android:layout_height="30dp"
|
||||||
android:layout_marginStart="4dp"
|
android:layout_marginStart="4dp"
|
||||||
@@ -230,7 +272,7 @@
|
|||||||
android:textColor="#000000"
|
android:textColor="#000000"
|
||||||
android:textSize="@dimen/sp_12"
|
android:textSize="@dimen/sp_12"
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
app:layout_constraintStart_toEndOf="@+id/imageView4"
|
app:layout_constraintStart_toEndOf="@+id/iv_class"
|
||||||
app:layout_constraintTop_toTopOf="parent" />
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
@@ -252,7 +294,7 @@
|
|||||||
android:visibility="visible">
|
android:visibility="visible">
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:id="@+id/imageView5"
|
android:id="@+id/iv_number"
|
||||||
android:layout_width="30dp"
|
android:layout_width="30dp"
|
||||||
android:layout_height="30dp"
|
android:layout_height="30dp"
|
||||||
android:layout_marginStart="4dp"
|
android:layout_marginStart="4dp"
|
||||||
@@ -272,7 +314,7 @@
|
|||||||
android:textColor="#000000"
|
android:textColor="#000000"
|
||||||
android:textSize="@dimen/sp_12"
|
android:textSize="@dimen/sp_12"
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
app:layout_constraintStart_toEndOf="@+id/imageView5"
|
app:layout_constraintStart_toEndOf="@+id/iv_number"
|
||||||
app:layout_constraintTop_toTopOf="parent" />
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
@@ -294,7 +336,7 @@
|
|||||||
android:visibility="visible">
|
android:visibility="visible">
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:id="@+id/imageView6"
|
android:id="@+id/iv_name"
|
||||||
android:layout_width="30dp"
|
android:layout_width="30dp"
|
||||||
android:layout_height="30dp"
|
android:layout_height="30dp"
|
||||||
android:layout_marginStart="4dp"
|
android:layout_marginStart="4dp"
|
||||||
@@ -313,7 +355,7 @@
|
|||||||
android:textColor="#000000"
|
android:textColor="#000000"
|
||||||
android:textSize="@dimen/sp_12"
|
android:textSize="@dimen/sp_12"
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
app:layout_constraintStart_toEndOf="@+id/imageView6"
|
app:layout_constraintStart_toEndOf="@+id/iv_name"
|
||||||
app:layout_constraintTop_toTopOf="parent" />
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
@@ -334,7 +376,7 @@
|
|||||||
android:layout_height="@dimen/dp_30">
|
android:layout_height="@dimen/dp_30">
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:id="@+id/imageView7"
|
android:id="@+id/iv_version"
|
||||||
android:layout_width="30dp"
|
android:layout_width="30dp"
|
||||||
android:layout_height="30dp"
|
android:layout_height="30dp"
|
||||||
android:layout_marginStart="4dp"
|
android:layout_marginStart="4dp"
|
||||||
@@ -346,7 +388,6 @@
|
|||||||
app:layout_constraintTop_toTopOf="parent" />
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/textView4"
|
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginStart="16dp"
|
android:layout_marginStart="16dp"
|
||||||
@@ -354,7 +395,7 @@
|
|||||||
android:textColor="#000000"
|
android:textColor="#000000"
|
||||||
android:textSize="@dimen/sp_12"
|
android:textSize="@dimen/sp_12"
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
app:layout_constraintStart_toEndOf="@+id/imageView7"
|
app:layout_constraintStart_toEndOf="@+id/iv_version"
|
||||||
app:layout_constraintTop_toTopOf="parent" />
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
@@ -372,7 +413,7 @@
|
|||||||
<Button
|
<Button
|
||||||
android:id="@+id/chkupd"
|
android:id="@+id/chkupd"
|
||||||
android:layout_width="@dimen/dp_200"
|
android:layout_width="@dimen/dp_200"
|
||||||
android:layout_height="@dimen/dp_32"
|
android:layout_height="@dimen/dp_28"
|
||||||
android:layout_gravity="center_horizontal"
|
android:layout_gravity="center_horizontal"
|
||||||
android:layout_marginTop="16dp"
|
android:layout_marginTop="16dp"
|
||||||
android:layout_marginBottom="24dp"
|
android:layout_marginBottom="24dp"
|
||||||
@@ -383,7 +424,7 @@
|
|||||||
android:textSize="@dimen/sp_12"
|
android:textSize="@dimen/sp_12"
|
||||||
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/linearLayout" />
|
app:layout_constraintTop_toBottomOf="@+id/ll_info" />
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
</ScrollView>
|
</ScrollView>
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|||||||
@@ -15,7 +15,7 @@
|
|||||||
app:layout_constraintTop_toTopOf="parent">
|
app:layout_constraintTop_toTopOf="parent">
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:id="@+id/back"
|
android:id="@+id/iv_back"
|
||||||
android:layout_width="@dimen/dp_16"
|
android:layout_width="@dimen/dp_16"
|
||||||
android:layout_height="@dimen/dp_16"
|
android:layout_height="@dimen/dp_16"
|
||||||
android:layout_marginStart="@dimen/dp_8"
|
android:layout_marginStart="@dimen/dp_8"
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
tools:context="com.aoleyun.sn.activity.SplashActivity">
|
tools:context="com.aoleyun.sn.activity.SplashActivity">
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:id="@+id/imageView"
|
android:id="@+id/iv_head"
|
||||||
android:layout_width="266dp"
|
android:layout_width="266dp"
|
||||||
android:layout_height="100dp"
|
android:layout_height="100dp"
|
||||||
android:layout_marginTop="160dp"
|
android:layout_marginTop="160dp"
|
||||||
@@ -24,9 +24,9 @@
|
|||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:text="logtest"
|
android:text="logtest"
|
||||||
android:visibility="gone"
|
android:visibility="gone"
|
||||||
app:layout_constraintEnd_toEndOf="@+id/imageView"
|
app:layout_constraintEnd_toEndOf="@+id/iv_head"
|
||||||
app:layout_constraintStart_toStartOf="@+id/imageView"
|
app:layout_constraintStart_toStartOf="@+id/iv_head"
|
||||||
app:layout_constraintTop_toBottomOf="@+id/imageView" />
|
app:layout_constraintTop_toBottomOf="@+id/iv_head" />
|
||||||
|
|
||||||
<Button
|
<Button
|
||||||
android:id="@+id/bt_stop"
|
android:id="@+id/bt_stop"
|
||||||
|
|||||||
@@ -18,7 +18,7 @@
|
|||||||
app:layout_constraintTop_toTopOf="parent">
|
app:layout_constraintTop_toTopOf="parent">
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:id="@+id/back"
|
android:id="@+id/iv_back"
|
||||||
android:layout_width="@dimen/dp_16"
|
android:layout_width="@dimen/dp_16"
|
||||||
android:layout_height="@dimen/dp_16"
|
android:layout_height="@dimen/dp_16"
|
||||||
android:layout_marginLeft="@dimen/dp_16"
|
android:layout_marginLeft="@dimen/dp_16"
|
||||||
@@ -44,7 +44,7 @@
|
|||||||
app:layout_constraintTop_toTopOf="parent" />
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:id="@+id/locked"
|
android:id="@+id/iv_locked"
|
||||||
android:layout_width="@dimen/dp_12"
|
android:layout_width="@dimen/dp_12"
|
||||||
android:layout_height="@dimen/dp_12"
|
android:layout_height="@dimen/dp_12"
|
||||||
android:layout_marginStart="@dimen/dp_8"
|
android:layout_marginStart="@dimen/dp_8"
|
||||||
@@ -58,7 +58,7 @@
|
|||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:id="@+id/imageView"
|
android:id="@+id/iv_head"
|
||||||
android:layout_width="@dimen/dp_100"
|
android:layout_width="@dimen/dp_100"
|
||||||
android:layout_height="@dimen/dp_100"
|
android:layout_height="@dimen/dp_100"
|
||||||
android:adjustViewBounds="true"
|
android:adjustViewBounds="true"
|
||||||
@@ -81,10 +81,10 @@
|
|||||||
android:visibility="visible"
|
android:visibility="visible"
|
||||||
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/iv_head" />
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:id="@+id/linearLayout"
|
android:id="@+id/ll_info"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginLeft="@dimen/dp_64"
|
android:layout_marginLeft="@dimen/dp_64"
|
||||||
@@ -101,7 +101,7 @@
|
|||||||
android:layout_height="@dimen/dp_32">
|
android:layout_height="@dimen/dp_32">
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:id="@+id/imageView2"
|
android:id="@+id/iv_sn"
|
||||||
android:layout_width="30dp"
|
android:layout_width="30dp"
|
||||||
android:layout_height="30dp"
|
android:layout_height="30dp"
|
||||||
android:layout_marginStart="4dp"
|
android:layout_marginStart="4dp"
|
||||||
@@ -113,7 +113,7 @@
|
|||||||
app:layout_constraintTop_toTopOf="parent" />
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/textView2"
|
android:id="@+id/tv_sn"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginStart="16dp"
|
android:layout_marginStart="16dp"
|
||||||
@@ -121,7 +121,7 @@
|
|||||||
android:textColor="#000000"
|
android:textColor="#000000"
|
||||||
android:textSize="@dimen/sp_12"
|
android:textSize="@dimen/sp_12"
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
app:layout_constraintStart_toEndOf="@+id/imageView2"
|
app:layout_constraintStart_toEndOf="@+id/iv_sn"
|
||||||
app:layout_constraintTop_toTopOf="parent" />
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
@@ -131,9 +131,50 @@
|
|||||||
android:text="设备SN"
|
android:text="设备SN"
|
||||||
android:textColor="#000000"
|
android:textColor="#000000"
|
||||||
android:textSize="@dimen/sp_12"
|
android:textSize="@dimen/sp_12"
|
||||||
app:layout_constraintBottom_toBottomOf="@+id/textView2"
|
app:layout_constraintBottom_toBottomOf="@+id/tv_sn"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintTop_toTopOf="@+id/textView2" />
|
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>
|
||||||
|
|
||||||
<androidx.constraintlayout.widget.ConstraintLayout
|
<androidx.constraintlayout.widget.ConstraintLayout
|
||||||
@@ -141,7 +182,7 @@
|
|||||||
android:layout_height="@dimen/dp_32">
|
android:layout_height="@dimen/dp_32">
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:id="@+id/imageView3"
|
android:id="@+id/iv_mac"
|
||||||
android:layout_width="30dp"
|
android:layout_width="30dp"
|
||||||
android:layout_height="30dp"
|
android:layout_height="30dp"
|
||||||
android:layout_marginStart="4dp"
|
android:layout_marginStart="4dp"
|
||||||
@@ -153,6 +194,7 @@
|
|||||||
app:layout_constraintTop_toTopOf="parent" />
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
|
android:id="@+id/tv_mac"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginStart="16dp"
|
android:layout_marginStart="16dp"
|
||||||
@@ -160,7 +202,7 @@
|
|||||||
android:textColor="#000000"
|
android:textColor="#000000"
|
||||||
android:textSize="@dimen/sp_12"
|
android:textSize="@dimen/sp_12"
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
app:layout_constraintStart_toEndOf="@+id/imageView3"
|
app:layout_constraintStart_toEndOf="@+id/iv_mac"
|
||||||
app:layout_constraintTop_toTopOf="parent" />
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
@@ -182,7 +224,7 @@
|
|||||||
android:visibility="visible">
|
android:visibility="visible">
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:id="@+id/imageView4"
|
android:id="@+id/iv_class"
|
||||||
android:layout_width="30dp"
|
android:layout_width="30dp"
|
||||||
android:layout_height="30dp"
|
android:layout_height="30dp"
|
||||||
android:layout_marginStart="4dp"
|
android:layout_marginStart="4dp"
|
||||||
@@ -202,7 +244,7 @@
|
|||||||
android:textColor="#000000"
|
android:textColor="#000000"
|
||||||
android:textSize="@dimen/sp_12"
|
android:textSize="@dimen/sp_12"
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
app:layout_constraintStart_toEndOf="@+id/imageView4"
|
app:layout_constraintStart_toEndOf="@+id/iv_class"
|
||||||
app:layout_constraintTop_toTopOf="parent" />
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
@@ -224,7 +266,7 @@
|
|||||||
android:visibility="visible">
|
android:visibility="visible">
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:id="@+id/imageView5"
|
android:id="@+id/iv_number"
|
||||||
android:layout_width="30dp"
|
android:layout_width="30dp"
|
||||||
android:layout_height="30dp"
|
android:layout_height="30dp"
|
||||||
android:layout_marginStart="4dp"
|
android:layout_marginStart="4dp"
|
||||||
@@ -244,7 +286,7 @@
|
|||||||
android:textColor="#000000"
|
android:textColor="#000000"
|
||||||
android:textSize="@dimen/sp_12"
|
android:textSize="@dimen/sp_12"
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
app:layout_constraintStart_toEndOf="@+id/imageView5"
|
app:layout_constraintStart_toEndOf="@+id/iv_number"
|
||||||
app:layout_constraintTop_toTopOf="parent" />
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
@@ -266,7 +308,7 @@
|
|||||||
android:visibility="visible">
|
android:visibility="visible">
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:id="@+id/imageView6"
|
android:id="@+id/iv_name"
|
||||||
android:layout_width="30dp"
|
android:layout_width="30dp"
|
||||||
android:layout_height="30dp"
|
android:layout_height="30dp"
|
||||||
android:layout_marginStart="4dp"
|
android:layout_marginStart="4dp"
|
||||||
@@ -285,7 +327,7 @@
|
|||||||
android:textColor="#000000"
|
android:textColor="#000000"
|
||||||
android:textSize="@dimen/sp_12"
|
android:textSize="@dimen/sp_12"
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
app:layout_constraintStart_toEndOf="@+id/imageView6"
|
app:layout_constraintStart_toEndOf="@+id/iv_name"
|
||||||
app:layout_constraintTop_toTopOf="parent" />
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
@@ -306,7 +348,7 @@
|
|||||||
android:layout_height="@dimen/dp_32">
|
android:layout_height="@dimen/dp_32">
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:id="@+id/imageView7"
|
android:id="@+id/iv_version"
|
||||||
android:layout_width="30dp"
|
android:layout_width="30dp"
|
||||||
android:layout_height="30dp"
|
android:layout_height="30dp"
|
||||||
android:layout_marginStart="4dp"
|
android:layout_marginStart="4dp"
|
||||||
@@ -326,7 +368,7 @@
|
|||||||
android:textColor="#000000"
|
android:textColor="#000000"
|
||||||
android:textSize="@dimen/sp_12"
|
android:textSize="@dimen/sp_12"
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
app:layout_constraintStart_toEndOf="@+id/imageView7"
|
app:layout_constraintStart_toEndOf="@+id/iv_version"
|
||||||
app:layout_constraintTop_toTopOf="parent" />
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
@@ -356,7 +398,7 @@
|
|||||||
android:textSize="@dimen/sp_12"
|
android:textSize="@dimen/sp_12"
|
||||||
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/linearLayout" />
|
app:layout_constraintTop_toBottomOf="@+id/ll_info" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/tv_customversion"
|
android:id="@+id/tv_customversion"
|
||||||
|
|||||||
@@ -15,7 +15,7 @@
|
|||||||
app:layout_constraintTop_toTopOf="parent">
|
app:layout_constraintTop_toTopOf="parent">
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:id="@+id/back"
|
android:id="@+id/iv_back"
|
||||||
android:layout_width="@dimen/dp_16"
|
android:layout_width="@dimen/dp_16"
|
||||||
android:layout_height="@dimen/dp_16"
|
android:layout_height="@dimen/dp_16"
|
||||||
android:layout_marginStart="@dimen/dp_8"
|
android:layout_marginStart="@dimen/dp_8"
|
||||||
|
|||||||
Reference in New Issue
Block a user