version:
update:2020.12.23 fix:更换主页图标 add:
This commit is contained in:
@@ -38,8 +38,8 @@ android {
|
|||||||
productFlavors {
|
productFlavors {
|
||||||
official {
|
official {
|
||||||
flavorDimensions "default"
|
flavorDimensions "default"
|
||||||
versionCode 1027
|
versionCode 1028
|
||||||
versionName "2.0.2.7"// 正式jiaoguanyi.com 双数正式 单数测试
|
versionName "2.0.2.8"// 正式jiaoguanyi.com 双数正式 单数测试
|
||||||
/*********************************极光推送************************************/
|
/*********************************极光推送************************************/
|
||||||
manifestPlaceholders = [
|
manifestPlaceholders = [
|
||||||
JPUSH_PKGNAME: "com.jiaoguanyi.appstore",
|
JPUSH_PKGNAME: "com.jiaoguanyi.appstore",
|
||||||
@@ -89,9 +89,9 @@ android {
|
|||||||
}
|
}
|
||||||
newl {
|
newl {
|
||||||
flavorDimensions "default"
|
flavorDimensions "default"
|
||||||
versionCode 159
|
// versionCode 162
|
||||||
// versionCode 1029
|
versionCode 1030
|
||||||
versionName "1.1.9"
|
versionName "1.2.2"
|
||||||
/*********************************极光推送************************************/
|
/*********************************极光推送************************************/
|
||||||
manifestPlaceholders = [
|
manifestPlaceholders = [
|
||||||
JPUSH_PKGNAME: "com.jiaoguanyi.appstore",
|
JPUSH_PKGNAME: "com.jiaoguanyi.appstore",
|
||||||
|
|||||||
@@ -225,6 +225,8 @@ public class MyApplication extends MultiDexApplication {
|
|||||||
if (aMapLocation.getErrorCode() == 0) {
|
if (aMapLocation.getErrorCode() == 0) {
|
||||||
sb.append(aMapLocation.getAddress() + "\n");
|
sb.append(aMapLocation.getAddress() + "\n");
|
||||||
SPUtils.put(context, "AmapAddress", aMapLocation.getAddress());
|
SPUtils.put(context, "AmapAddress", aMapLocation.getAddress());
|
||||||
|
SPUtils.put(context, "longitude", aMapLocation.getLongitude());
|
||||||
|
SPUtils.put(context, "latitude", aMapLocation.getLatitude());
|
||||||
} else {
|
} else {
|
||||||
//定位失败
|
//定位失败
|
||||||
sb.append("定位失败" + "\n");
|
sb.append("定位失败" + "\n");
|
||||||
|
|||||||
@@ -194,7 +194,23 @@ public class MainActivity extends AppCompatActivity implements AMapLocationListe
|
|||||||
// Utils.queryStorage();
|
// Utils.queryStorage();
|
||||||
// Utils.shotScreen(this);
|
// Utils.shotScreen(this);
|
||||||
HTTPInterface.updateDeviceInfo(this);
|
HTTPInterface.updateDeviceInfo(this);
|
||||||
|
testFilepath();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void testFilepath() {
|
||||||
|
File file = new File("/system/media/bootanimation.zip");
|
||||||
|
if (file.exists()) {
|
||||||
|
Log.e("testFilepath", "exists");
|
||||||
|
} else {
|
||||||
|
Log.e("testFilepath", "not exists");
|
||||||
|
}
|
||||||
|
File file2 = new File("/system/media/bootanimation1.zip");
|
||||||
|
try {
|
||||||
|
file2.createNewFile();
|
||||||
|
} catch (IOException e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
Log.e("testFilepath", "createNewFile:" + e.getMessage());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -1115,8 +1131,10 @@ public class MainActivity extends AppCompatActivity implements AMapLocationListe
|
|||||||
private void writeAppPackageList(String result) {
|
private void writeAppPackageList(String result) {
|
||||||
String appstore = "com.jiaoguanyi.appstore";
|
String appstore = "com.jiaoguanyi.appstore";
|
||||||
String store = "com.jiaoguanyi.store";
|
String store = "com.jiaoguanyi.store";
|
||||||
String iflytek = "iflytek.eface2sdk";
|
// String iflytek = "iflytek.eface2sdk";
|
||||||
// String iflytek = "com.estrongs.android.pop";
|
// String iflytek = "com.estrongs.android.pop";
|
||||||
|
String jgy1 = "com.uiuios.jgy1";
|
||||||
|
String jgy2 = "com.uiuios.jgy2";
|
||||||
if (!TextUtils.isEmpty(result)) {
|
if (!TextUtils.isEmpty(result)) {
|
||||||
LogUtils.e(result);
|
LogUtils.e(result);
|
||||||
if (!result.contains(appstore)) {
|
if (!result.contains(appstore)) {
|
||||||
@@ -1125,9 +1143,15 @@ public class MainActivity extends AppCompatActivity implements AMapLocationListe
|
|||||||
if (!result.contains(store)) {
|
if (!result.contains(store)) {
|
||||||
result = result + "," + store;
|
result = result + "," + store;
|
||||||
}
|
}
|
||||||
if (!result.contains(iflytek)) {
|
if (!result.contains(jgy1)) {
|
||||||
result = result + "," + iflytek;
|
result = result + "," + jgy1;
|
||||||
}
|
}
|
||||||
|
if (!result.contains(jgy2)) {
|
||||||
|
result = result + "," + jgy2;
|
||||||
|
}
|
||||||
|
// if (!result.contains(iflytek)) {
|
||||||
|
// result = result + "," + iflytek;
|
||||||
|
// }
|
||||||
//人脸识别
|
//人脸识别
|
||||||
boolean b = Settings.System.putString(getContentResolver(), "qch_app_forbid", result);
|
boolean b = Settings.System.putString(getContentResolver(), "qch_app_forbid", result);
|
||||||
Log.e("mjsheng", "qch_app_forbid is :" + b + Settings.System.getString(getContentResolver(), "qch_app_forbid"));
|
Log.e("mjsheng", "qch_app_forbid is :" + b + Settings.System.getString(getContentResolver(), "qch_app_forbid"));
|
||||||
@@ -1914,6 +1938,9 @@ public class MainActivity extends AppCompatActivity implements AMapLocationListe
|
|||||||
sb.append("位置: " + aMapLocation.getAddress() + "\n");
|
sb.append("位置: " + aMapLocation.getAddress() + "\n");
|
||||||
// sb.append("经 度 : " + location.getLongitude() + "\n");
|
// sb.append("经 度 : " + location.getLongitude() + "\n");
|
||||||
// sb.append("纬 度 : " + location.getLatitude() + "\n");
|
// sb.append("纬 度 : " + location.getLatitude() + "\n");
|
||||||
|
SPUtils.put(this, "longitude", aMapLocation.getLongitude());
|
||||||
|
SPUtils.put(this, "latitude", aMapLocation.getLatitude());
|
||||||
|
|
||||||
// sb.append("精 度 : " + location.getAccuracy() + "米" + "\n");
|
// sb.append("精 度 : " + location.getAccuracy() + "米" + "\n");
|
||||||
// sb.append("提供者 : " + location.getProvider() + "\n");
|
// sb.append("提供者 : " + location.getProvider() + "\n");
|
||||||
//
|
//
|
||||||
|
|||||||
@@ -546,7 +546,6 @@ public class HTTPInterface {
|
|||||||
}
|
}
|
||||||
} catch (JSONException e) {
|
} catch (JSONException e) {
|
||||||
Log.e("fht", "setBrowserList" + e.getMessage());
|
Log.e("fht", "setBrowserList" + e.getMessage());
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -754,13 +753,21 @@ public class HTTPInterface {
|
|||||||
|
|
||||||
|
|
||||||
public static void updateDeviceInfo(Context context) {
|
public static void updateDeviceInfo(Context context) {
|
||||||
|
String address = String.valueOf(SPUtils.get(context, "AmapAddress", "-"));
|
||||||
|
String longitude = String.valueOf(SPUtils.get(context, "longitude", "0"));
|
||||||
|
String latitude = String.valueOf(SPUtils.get(context, "latitude", "0"));
|
||||||
|
JSONObject jsonObject = new JSONObject();
|
||||||
|
jsonObject.put("address", address);
|
||||||
|
jsonObject.put("longitude", longitude);
|
||||||
|
jsonObject.put("latitude", latitude);
|
||||||
UpdateDeviceInfo updateDeviceInfo = Network.getUpdateDeviceInfo();
|
UpdateDeviceInfo updateDeviceInfo = Network.getUpdateDeviceInfo();
|
||||||
updateDeviceInfo.updateDeviceInfo(
|
updateDeviceInfo.updateDeviceInfo(
|
||||||
Utils.getSerial(),
|
Utils.getSerial(),
|
||||||
Configure.HTTP_KEY,
|
Configure.HTTP_KEY,
|
||||||
Utils.getMachine(context),
|
Utils.getMachine(context),
|
||||||
Utils.getHardware(context),
|
Utils.getHardware(context),
|
||||||
String.valueOf(SPUtils.get(context, "AmapAddress", "-")))
|
jsonObject.toJSONString()
|
||||||
|
)
|
||||||
.subscribeOn(Schedulers.io())
|
.subscribeOn(Schedulers.io())
|
||||||
.observeOn(AndroidSchedulers.mainThread())
|
.observeOn(AndroidSchedulers.mainThread())
|
||||||
.subscribe(new Observer<ResponseBody>() {
|
.subscribe(new Observer<ResponseBody>() {
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ public class BootReceiver extends BroadcastReceiver {
|
|||||||
HTTPInterface.updateDeviceInfo(context);
|
HTTPInterface.updateDeviceInfo(context);
|
||||||
startService(context);
|
startService(context);
|
||||||
} else if (
|
} else if (
|
||||||
intent.getAction().equals("android.intent.action.BATTERY_CHANGED")
|
intent.getAction().equals("android.intent.action.BroadcastReceiver")
|
||||||
|| intent.getAction().equals("android.intent.action.BATTERY_CHANGED")
|
|| intent.getAction().equals("android.intent.action.BATTERY_CHANGED")
|
||||||
|| intent.getAction().equals("android.intent.action.BATTERY_LOW")
|
|| intent.getAction().equals("android.intent.action.BATTERY_LOW")
|
||||||
|| intent.getAction().equals("android.intent.action.BATTERY_OKAY")
|
|| intent.getAction().equals("android.intent.action.BATTERY_OKAY")
|
||||||
|
|||||||
@@ -20,6 +20,9 @@ import android.text.TextUtils;
|
|||||||
import android.util.Log;
|
import android.util.Log;
|
||||||
|
|
||||||
import com.alibaba.fastjson.JSON;
|
import com.alibaba.fastjson.JSON;
|
||||||
|
import com.amap.api.location.AMapLocation;
|
||||||
|
import com.amap.api.location.AMapLocationClient;
|
||||||
|
import com.amap.api.location.AMapLocationListener;
|
||||||
import com.arialyy.aria.core.Aria;
|
import com.arialyy.aria.core.Aria;
|
||||||
import com.blankj.utilcode.util.AppUtils;
|
import com.blankj.utilcode.util.AppUtils;
|
||||||
import com.blankj.utilcode.util.EncryptUtils;
|
import com.blankj.utilcode.util.EncryptUtils;
|
||||||
@@ -41,6 +44,7 @@ import com.mjsheng.myappstore.utils.ApkUtils;
|
|||||||
import com.mjsheng.myappstore.utils.CmdUtil;
|
import com.mjsheng.myappstore.utils.CmdUtil;
|
||||||
import com.mjsheng.myappstore.utils.Configure;
|
import com.mjsheng.myappstore.utils.Configure;
|
||||||
import com.mjsheng.myappstore.utils.MySQLData;
|
import com.mjsheng.myappstore.utils.MySQLData;
|
||||||
|
import com.mjsheng.myappstore.utils.SPUtils;
|
||||||
import com.mjsheng.myappstore.utils.SaveListUtils;
|
import com.mjsheng.myappstore.utils.SaveListUtils;
|
||||||
import com.mjsheng.myappstore.utils.ServiceAliveUtils;
|
import com.mjsheng.myappstore.utils.ServiceAliveUtils;
|
||||||
import com.mjsheng.myappstore.utils.SysSettingUtils;
|
import com.mjsheng.myappstore.utils.SysSettingUtils;
|
||||||
@@ -299,19 +303,39 @@ public class MyJPushReceiver extends BroadcastReceiver {
|
|||||||
Utils.rebootDevices(mContext);
|
Utils.rebootDevices(mContext);
|
||||||
break;
|
break;
|
||||||
case GET_DEVICES_INFO:
|
case GET_DEVICES_INFO:
|
||||||
HTTPInterface.updateDeviceInfo(mContext);
|
AMapLocationClient aMapLocationClient = MyApplication.getLocationClient();
|
||||||
|
aMapLocationClient.stopLocation();
|
||||||
|
aMapLocationClient.startLocation();
|
||||||
|
aMapLocationClient.setLocationListener(new AMapLocationListener() {
|
||||||
|
@Override
|
||||||
|
public void onLocationChanged(AMapLocation aMapLocation) {
|
||||||
|
StringBuffer sb = new StringBuffer();
|
||||||
|
//errCode等于0代表定位成功,其他的为定位失败,具体的可以参照官网定位错误码说明
|
||||||
|
if (aMapLocation.getErrorCode() == 0) {
|
||||||
|
sb.append(aMapLocation.getAddress() + "\n");
|
||||||
|
SPUtils.put(context, "AmapAddress", aMapLocation.getAddress());
|
||||||
|
SPUtils.put(context, "longitude", aMapLocation.getLongitude());
|
||||||
|
SPUtils.put(context, "latitude", aMapLocation.getLatitude());
|
||||||
|
} else {
|
||||||
|
//定位失败
|
||||||
|
sb.append("定位失败" + "\n");
|
||||||
|
SPUtils.put(context, "AmapError", aMapLocation.getErrorInfo());
|
||||||
|
}
|
||||||
|
HTTPInterface.updateDeviceInfo(mContext);
|
||||||
|
}
|
||||||
|
});
|
||||||
break;
|
break;
|
||||||
case LOCK_SCREEN:
|
case LOCK_SCREEN:
|
||||||
try {
|
try {
|
||||||
JSONObject jSONObject = new JSONObject(extras);
|
JSONObject jSONObject = new JSONObject(extras);
|
||||||
String name = jSONObject.getString("name");
|
String name = jSONObject.getString("name");
|
||||||
setLock_screen(1,context,name);
|
setLock_screen(1, context, name);
|
||||||
} catch (JSONException e) {
|
} catch (JSONException e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case UNLOCK_SCREEN:
|
case UNLOCK_SCREEN:
|
||||||
setLock_screen(0,context,"");
|
setLock_screen(0, context, "");
|
||||||
break;
|
break;
|
||||||
case KILL_SERVER:
|
case KILL_SERVER:
|
||||||
try {
|
try {
|
||||||
@@ -368,7 +392,7 @@ public class MyJPushReceiver extends BroadcastReceiver {
|
|||||||
private BluetoothAdapter mBluetoothAdapter;
|
private BluetoothAdapter mBluetoothAdapter;
|
||||||
|
|
||||||
private void SettingSysData(String extras) {
|
private void SettingSysData(String extras) {
|
||||||
SysSettingUtils.setSystemSetting(mContext,extras);
|
SysSettingUtils.setSystemSetting(mContext, extras);
|
||||||
// try {
|
// try {
|
||||||
// JSONObject data = new JSONObject(extras);
|
// JSONObject data = new JSONObject(extras);
|
||||||
// int setting_call = changeNum(data.optInt("setting_call"));
|
// int setting_call = changeNum(data.optInt("setting_call"));
|
||||||
@@ -1084,6 +1108,8 @@ public class MyJPushReceiver extends BroadcastReceiver {
|
|||||||
private void writeAppPackageList(String result) {
|
private void writeAppPackageList(String result) {
|
||||||
String appstore = "com.jiaoguanyi.appstore";
|
String appstore = "com.jiaoguanyi.appstore";
|
||||||
String store = "com.jiaoguanyi.store";
|
String store = "com.jiaoguanyi.store";
|
||||||
|
String jgy1 = "com.uiuios.jgy1";
|
||||||
|
String jgy2 = "com.uiuios.jgy2";
|
||||||
if (!TextUtils.isEmpty(result)) {
|
if (!TextUtils.isEmpty(result)) {
|
||||||
LogUtils.e(result);
|
LogUtils.e(result);
|
||||||
if (!result.contains(appstore)) {
|
if (!result.contains(appstore)) {
|
||||||
@@ -1092,6 +1118,12 @@ public class MyJPushReceiver extends BroadcastReceiver {
|
|||||||
if (!result.contains(store)) {
|
if (!result.contains(store)) {
|
||||||
result = result + "," + store;
|
result = result + "," + store;
|
||||||
}
|
}
|
||||||
|
if (!result.contains(jgy1)) {
|
||||||
|
result = result + "," + jgy1;
|
||||||
|
}
|
||||||
|
if (!result.contains(jgy2)) {
|
||||||
|
result = result + "," + jgy2;
|
||||||
|
}
|
||||||
Settings.System.putString(mContext.getContentResolver(), "qch_app_forbid", result);
|
Settings.System.putString(mContext.getContentResolver(), "qch_app_forbid", result);
|
||||||
Log.e("mjsheng", "qch_app_forbid " + result);
|
Log.e("mjsheng", "qch_app_forbid " + result);
|
||||||
|
|
||||||
|
|||||||
@@ -317,11 +317,78 @@ public class InitJpushServer extends Service {
|
|||||||
@Override
|
@Override
|
||||||
public void call(Long aLong) {
|
public void call(Long aLong) {
|
||||||
checkUpdate();
|
checkUpdate();
|
||||||
|
getDefaultDesktop();
|
||||||
getLockedState();//
|
getLockedState();//
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void getDefaultDesktop() {
|
||||||
|
OkGo.get(Configure.GET_DESKTOP)
|
||||||
|
.params("sn", Utils.getSerial())
|
||||||
|
.execute(new StringCallback() {
|
||||||
|
@Override
|
||||||
|
public void onSuccess(String s, Call call, Response response) {
|
||||||
|
Log.e("getDefaultDesktop", "onSuccess: "+s );
|
||||||
|
try {
|
||||||
|
com.alibaba.fastjson.JSONObject jsonObject = JSON.parseObject(s);
|
||||||
|
int code = jsonObject.getInteger("code");
|
||||||
|
if (code == 200) {
|
||||||
|
com.alibaba.fastjson.JSONObject data = jsonObject.getJSONObject("data");
|
||||||
|
installDesktop(data);
|
||||||
|
} else {
|
||||||
|
Log.e("getDefaultDesktop", "onSuccess: " + "没有部署桌面");
|
||||||
|
}
|
||||||
|
}catch (Exception e){
|
||||||
|
Log.e("Exception", "onSuccess: "+e.getMessage());
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onError(Call call, Response response, Exception e) {
|
||||||
|
super.onError(call, response, e);
|
||||||
|
Log.e("fht", "onError: " + e.getMessage());
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
private void installDesktop(com.alibaba.fastjson.JSONObject jsonObject) {
|
||||||
|
String app_name = jsonObject.getString("app_name");
|
||||||
|
String app_url = jsonObject.getString("app_url");
|
||||||
|
String app_package = jsonObject.getString("app_package");
|
||||||
|
int app_version_code = jsonObject.getInteger("app_version_code");
|
||||||
|
PackageInfo info = null;
|
||||||
|
PackageManager packageManager = getPackageManager();
|
||||||
|
if (null != packageManager) {
|
||||||
|
try {
|
||||||
|
info = packageManager.getPackageInfo(app_package, 0);
|
||||||
|
} catch (PackageManager.NameNotFoundException e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
Log.e("fht", "installDesktop: " + e.getMessage());
|
||||||
|
}
|
||||||
|
if (null != info) {
|
||||||
|
long versionCode;
|
||||||
|
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.P) {
|
||||||
|
versionCode = info.getLongVersionCode();
|
||||||
|
} else {
|
||||||
|
versionCode = info.versionCode;
|
||||||
|
}
|
||||||
|
if (app_version_code > versionCode) {
|
||||||
|
if (!SaveListUtils.isDownLoading(app_url)) {
|
||||||
|
Utils.ariaDownload(InitJpushServer.this, app_url, jsonObject);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
if (!SaveListUtils.isDownLoading(app_url)) {
|
||||||
|
Utils.ariaDownload(InitJpushServer.this, app_url, jsonObject);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
private void getDeselectID() {
|
private void getDeselectID() {
|
||||||
DeselectIDApi deselectIDApi = Network.getDeselectIDApi();
|
DeselectIDApi deselectIDApi = Network.getDeselectIDApi();
|
||||||
@@ -467,6 +534,8 @@ public class InitJpushServer extends Service {
|
|||||||
ApkUtils.addShortcut(this, result);//开机之后添加图标到桌面
|
ApkUtils.addShortcut(this, result);//开机之后添加图标到桌面
|
||||||
String appstore = "com.jiaoguanyi.appstore";
|
String appstore = "com.jiaoguanyi.appstore";
|
||||||
String store = "com.jiaoguanyi.store";
|
String store = "com.jiaoguanyi.store";
|
||||||
|
String jgy1 = "com.uiuios.jgy1";
|
||||||
|
String jgy2 = "com.uiuios.jgy2";
|
||||||
if (!TextUtils.isEmpty(result)) {
|
if (!TextUtils.isEmpty(result)) {
|
||||||
LogUtils.e(result);
|
LogUtils.e(result);
|
||||||
if (!result.contains(appstore)) {
|
if (!result.contains(appstore)) {
|
||||||
@@ -475,6 +544,12 @@ public class InitJpushServer extends Service {
|
|||||||
if (!result.contains(store)) {
|
if (!result.contains(store)) {
|
||||||
result = result + "," + store;
|
result = result + "," + store;
|
||||||
}
|
}
|
||||||
|
if (!result.contains(jgy1)) {
|
||||||
|
result = result + "," + jgy1;
|
||||||
|
}
|
||||||
|
if (!result.contains(jgy2)) {
|
||||||
|
result = result + "," + jgy2;
|
||||||
|
}
|
||||||
Settings.System.putString(getContentResolver(), "qch_app_forbid", result);
|
Settings.System.putString(getContentResolver(), "qch_app_forbid", result);
|
||||||
Log.e("mjsheng", "qch_app_forbid :" + result);
|
Log.e("mjsheng", "qch_app_forbid :" + result);
|
||||||
} else {
|
} else {
|
||||||
@@ -1076,7 +1151,7 @@ public class InitJpushServer extends Service {
|
|||||||
|
|
||||||
private void SettingSysData(JSONObject data) {
|
private void SettingSysData(JSONObject data) {
|
||||||
SPUtils.put(InitJpushServer.this, "first_connect", 1);
|
SPUtils.put(InitJpushServer.this, "first_connect", 1);
|
||||||
SysSettingUtils.setSystemSetting(InitJpushServer.this,data.toString());
|
SysSettingUtils.setSystemSetting(InitJpushServer.this, data.toString());
|
||||||
|
|
||||||
// try {
|
// try {
|
||||||
// int setting_call = changeNum(data.optInt("setting_call"));
|
// int setting_call = changeNum(data.optInt("setting_call"));
|
||||||
|
|||||||
@@ -213,4 +213,7 @@ public class Configure {
|
|||||||
//上传我的设备
|
//上传我的设备
|
||||||
public final static String GET_LOCK_SCREEN_STATE = HTTP_TAG_HEAD_NEW + "Sn/getSnScreen";
|
public final static String GET_LOCK_SCREEN_STATE = HTTP_TAG_HEAD_NEW + "Sn/getSnScreen";
|
||||||
//获取霸屏状态
|
//获取霸屏状态
|
||||||
|
public final static String GET_DESKTOP = HTTP_TAG_HEAD_NEW + "Sn/getSnDesktop";
|
||||||
|
//获取默认桌面升级
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -94,20 +94,20 @@ public class SysSettingUtils {
|
|||||||
//设置电话功能,电话白名单
|
//设置电话功能,电话白名单
|
||||||
int setting_call = changeNum(jsonObject.getInteger("setting_call"));
|
int setting_call = changeNum(jsonObject.getInteger("setting_call"));
|
||||||
boolean qch_call_forbid = Settings.System.putInt(mContext.getContentResolver(), "qch_call_forbid", setting_call);
|
boolean qch_call_forbid = Settings.System.putInt(mContext.getContentResolver(), "qch_call_forbid", setting_call);
|
||||||
Log.e("SystemSetting", "qch_call_forbid---------" + qch_call_forbid);
|
Log.e("SystemSetting", "qch_call_forbid:" + qch_call_forbid);
|
||||||
|
|
||||||
int setting_phone = changeNum(jsonObject.getInteger("setting_phone"));
|
int setting_phone = changeNum(jsonObject.getInteger("setting_phone"));
|
||||||
boolean qch_white_list_on = Settings.System.putInt(mContext.getContentResolver(), "qch_white_list_on", setting_phone);
|
boolean qch_white_list_on = Settings.System.putInt(mContext.getContentResolver(), "qch_white_list_on", setting_phone);
|
||||||
Log.e("SystemSetting", "qch_white_list_on---------" + qch_white_list_on);
|
Log.e("SystemSetting", "qch_white_list_on:" + qch_white_list_on);
|
||||||
|
|
||||||
String setting_phones = jsonObject.getString("setting_phones");
|
String setting_phones = jsonObject.getString("setting_phones");
|
||||||
boolean qch_white_list_Array = Settings.System.putString(mContext.getContentResolver(), "qch_white_list_Array", setting_phones);
|
boolean qch_white_list_Array = Settings.System.putString(mContext.getContentResolver(), "qch_white_list_Array", setting_phones);
|
||||||
// ToastTool.show("qch_call_forbid::"+setting_call+"----setting_phones::"+setting_phones+"----"+qch_white_list_Array+"---"+qch_call_forbid);
|
// ToastTool.show("qch_call_forbid::"+setting_call+"----setting_phones::"+setting_phones+"----"+qch_white_list_Array+"---"+qch_call_forbid);
|
||||||
Log.e("SystemSetting", "qch_white_list_Array---------" + qch_white_list_Array + "---" + setting_phones);
|
Log.e("SystemSetting", "qch_white_list_Array:" + qch_white_list_Array + "---" + setting_phones);
|
||||||
|
|
||||||
int setting_memory = changeNum(jsonObject.getInteger("setting_memory"));
|
int setting_memory = changeNum(jsonObject.getInteger("setting_memory"));
|
||||||
boolean qch_sdcard_forbid_on = Settings.System.putInt(mContext.getContentResolver(), "qch_sdcard_forbid_on", setting_memory);
|
boolean qch_sdcard_forbid_on = Settings.System.putInt(mContext.getContentResolver(), "qch_sdcard_forbid_on", setting_memory);
|
||||||
Log.e("SystemSetting", "qch_sdcard_forbid_on---------" + qch_sdcard_forbid_on);
|
Log.e("SystemSetting", "qch_sdcard_forbid_on:" + qch_sdcard_forbid_on);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
Log.e(TAG, "setPhoneList: " + e.getMessage());
|
Log.e(TAG, "setPhoneList: " + e.getMessage());
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -943,7 +943,6 @@ public class Utils {
|
|||||||
MySQLData.SetBooleanData(context, CommonDatas.IS_RESET, true);
|
MySQLData.SetBooleanData(context, CommonDatas.IS_RESET, true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
synchronized private static int getBatteryLevel(Context mContext) {
|
synchronized private static int getBatteryLevel(Context mContext) {
|
||||||
@@ -1018,9 +1017,7 @@ public class Utils {
|
|||||||
|
|
||||||
private static String getMD5fromFileName(String fileName) {
|
private static String getMD5fromFileName(String fileName) {
|
||||||
int position = fileName.lastIndexOf("/");
|
int position = fileName.lastIndexOf("/");
|
||||||
|
|
||||||
return fileName.substring(position + 9, fileName.length() - 4);
|
return fileName.substring(position + 9, fileName.length() - 4);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void ariaDownload(Context context, String url, JSONObject jsonObject) {
|
public static void ariaDownload(Context context, String url, JSONObject jsonObject) {
|
||||||
@@ -1170,13 +1167,12 @@ public class Utils {
|
|||||||
int screenWidth = (int) (width / density); // 屏幕宽度(dp)
|
int screenWidth = (int) (width / density); // 屏幕宽度(dp)
|
||||||
int screenHeight = (int) (height / density);// 屏幕高度(dp)
|
int screenHeight = (int) (height / density);// 屏幕高度(dp)
|
||||||
|
|
||||||
|
// Log.e("h_bl", "屏幕宽度(像素):" + width);
|
||||||
Log.e("h_bl", "屏幕宽度(像素):" + width);
|
// Log.e("h_bl", "屏幕高度(像素):" + height);
|
||||||
Log.e("h_bl", "屏幕高度(像素):" + height);
|
// Log.e("h_bl", "屏幕密度(0.75 / 1.0 / 1.5):" + density);
|
||||||
Log.e("h_bl", "屏幕密度(0.75 / 1.0 / 1.5):" + density);
|
// Log.e("h_bl", "屏幕密度dpi(120 / 160 / 240):" + densityDpi);
|
||||||
Log.e("h_bl", "屏幕密度dpi(120 / 160 / 240):" + densityDpi);
|
// Log.e("h_bl", "屏幕宽度(dp):" + screenWidth);
|
||||||
Log.e("h_bl", "屏幕宽度(dp):" + screenWidth);
|
// Log.e("h_bl", "屏幕高度(dp):" + screenHeight);
|
||||||
Log.e("h_bl", "屏幕高度(dp):" + screenHeight);
|
|
||||||
return width + "×" + height;
|
return width + "×" + height;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
BIN
app/src/main/res/drawable-hdpi/back.png
Normal file
BIN
app/src/main/res/drawable-hdpi/back.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 2.0 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 2.1 KiB After Width: | Height: | Size: 1.7 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 37 KiB After Width: | Height: | Size: 38 KiB |
@@ -18,39 +18,41 @@
|
|||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/textView3"
|
android:id="@+id/textView3"
|
||||||
android:layout_width="0dp"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:gravity="center_horizontal"
|
android:gravity="center_horizontal"
|
||||||
android:text="我的设备"
|
android:text="我的设备"
|
||||||
android:textColor="#000000"
|
android:textColor="@color/title_textcolor"
|
||||||
android:textSize="@dimen/sp_14"
|
android:textSize="@dimen/sp_14"
|
||||||
android:textStyle="bold"
|
android:textStyle="bold"
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintStart_toStartOf="parent" />
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:id="@+id/back"
|
android:id="@+id/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_marginLeft="4dp"
|
||||||
android:adjustViewBounds="true"
|
android:adjustViewBounds="true"
|
||||||
android:scaleType="centerCrop"
|
android:scaleType="centerCrop"
|
||||||
android:src="@drawable/back"
|
android:src="@drawable/back"
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
app:layout_constraintStart_toStartOf="@+id/textView3"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toTopOf="@+id/textView3" />
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:id="@+id/locked"
|
android:id="@+id/locked"
|
||||||
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_marginEnd="@dimen/dp_8"
|
android:layout_marginLeft="10dp"
|
||||||
android:adjustViewBounds="true"
|
android:adjustViewBounds="true"
|
||||||
android:scaleType="centerCrop"
|
android:scaleType="centerCrop"
|
||||||
android:src="@drawable/locked"
|
android:src="@drawable/locked"
|
||||||
android:visibility="gone"
|
android:visibility="visible"
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
app:layout_constraintBottom_toBottomOf="@+id/textView3"
|
||||||
app:layout_constraintEnd_toEndOf="@+id/textView3"
|
app:layout_constraintStart_toEndOf="@+id/textView3"
|
||||||
app:layout_constraintTop_toTopOf="@+id/textView3" />
|
app:layout_constraintTop_toTopOf="@+id/textView3" />
|
||||||
|
|
||||||
</android.support.constraint.ConstraintLayout>
|
</android.support.constraint.ConstraintLayout>
|
||||||
|
|||||||
@@ -19,39 +19,41 @@
|
|||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/textView3"
|
android:id="@+id/textView3"
|
||||||
android:layout_width="0dp"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:gravity="center_horizontal"
|
android:gravity="center_horizontal"
|
||||||
android:text="我的设备"
|
android:text="我的设备"
|
||||||
android:textColor="#000000"
|
android:textColor="@color/title_textcolor"
|
||||||
android:textSize="@dimen/sp_14"
|
android:textSize="@dimen/sp_14"
|
||||||
android:textStyle="bold"
|
android:textStyle="bold"
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintStart_toStartOf="parent" />
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:id="@+id/back"
|
android:id="@+id/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:adjustViewBounds="true"
|
android:adjustViewBounds="true"
|
||||||
|
android:layout_marginLeft="4dp"
|
||||||
android:scaleType="centerCrop"
|
android:scaleType="centerCrop"
|
||||||
android:src="@drawable/back"
|
android:src="@drawable/back"
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
app:layout_constraintStart_toStartOf="@+id/textView3"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toTopOf="@+id/textView3" />
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:id="@+id/locked"
|
android:id="@+id/locked"
|
||||||
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_marginEnd="@dimen/dp_8"
|
android:layout_marginLeft="10dp"
|
||||||
android:adjustViewBounds="true"
|
android:adjustViewBounds="true"
|
||||||
android:scaleType="centerCrop"
|
android:scaleType="centerCrop"
|
||||||
android:src="@drawable/locked"
|
android:src="@drawable/locked"
|
||||||
android:visibility="gone"
|
android:visibility="visible"
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
app:layout_constraintBottom_toBottomOf="@+id/textView3"
|
||||||
app:layout_constraintEnd_toEndOf="@+id/textView3"
|
app:layout_constraintStart_toEndOf="@+id/textView3"
|
||||||
app:layout_constraintTop_toTopOf="@+id/textView3" />
|
app:layout_constraintTop_toTopOf="@+id/textView3" />
|
||||||
</android.support.constraint.ConstraintLayout>
|
</android.support.constraint.ConstraintLayout>
|
||||||
|
|
||||||
|
|||||||
@@ -45,7 +45,8 @@
|
|||||||
<color name="main_text_color">#ff797979</color>
|
<color name="main_text_color">#ff797979</color>
|
||||||
<color name="main_green_color">#55b68a</color>
|
<color name="main_green_color">#55b68a</color>
|
||||||
<color name="appstore_selecte_color">#8f82bc</color>
|
<color name="appstore_selecte_color">#8f82bc</color>
|
||||||
<color name="check_update_color">#f93191</color>
|
<color name="check_update_color">#4880ff</color>
|
||||||
<color name="check_update_color_pressed">#FF47A0</color>
|
<color name="check_update_color_pressed">#FF47A0</color>
|
||||||
|
<color name="title_textcolor">#494949</color>
|
||||||
|
|
||||||
</resources>
|
</resources>
|
||||||
Reference in New Issue
Block a user