bugfixes:优化命名
This commit is contained in:
2025-03-13 10:41:32 +08:00
parent 816753a500
commit 8716bf0e36
25 changed files with 458 additions and 397 deletions

View File

@@ -14,7 +14,6 @@ import android.os.IBinder;
import android.os.SystemClock;
import android.provider.Settings;
import android.text.TextUtils;
import android.text.format.Formatter;
import android.util.Log;
import androidx.annotation.Nullable;
@@ -25,18 +24,16 @@ import com.aoleyun.sn.R;
import com.aoleyun.sn.bean.BaseResponse;
import com.aoleyun.sn.bean.DownloadTaskInfo;
import com.aoleyun.sn.comm.CommonConfig;
import com.aoleyun.sn.comm.PackageNames;
import com.aoleyun.sn.gson.GsonUtils;
import com.aoleyun.sn.manager.MapManager;
import com.aoleyun.sn.network.NetInterfaceManager;
import com.aoleyun.sn.network.api.post.SendScreenStatusApi;
import com.aoleyun.sn.receiver.BootReceiver;
import com.aoleyun.sn.receiver.NewAppReceiver;
import com.aoleyun.sn.rlog.LogDBManager;
import com.aoleyun.sn.service.main.MainService;
import com.aoleyun.sn.utils.ApkUtils;
import com.aoleyun.sn.utils.CmdUtil;
import com.aoleyun.sn.utils.JGYUtils;
import com.aoleyun.sn.utils.JgyUtils;
import com.aoleyun.sn.utils.SPUtils;
import com.aoleyun.sn.utils.ServiceAliveUtils;
import com.aoleyun.sn.utils.TimeUtils;
@@ -214,7 +211,7 @@ public class GuardService extends Service {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
// 8.0之后需要在
registmNewAppReceiver();
JGYUtils.startServices(GuardService.this);
JgyUtils.startServices(GuardService.this);
}
registerPresentReceiver();
registerBatteryReceiver();
@@ -304,8 +301,8 @@ public class GuardService extends Service {
// // 启动发送广播
// sendBroadcast(intent1);
JGYUtils.startServices(GuardService.this);
if (JGYUtils.getInstance().checkAppPlatform() == JGYUtils.ZhanruiPlatform) {
JgyUtils.startServices(GuardService.this);
if (JgyUtils.getInstance().checkAppPlatform() == JgyUtils.ZhanruiPlatform) {
int setting_statusbar = Settings.System.getInt(context.getContentResolver(), CommonConfig.AOLE_ACTION_HIDE_STATUS_BAR, 0);
String statusbarStatus = "";
if (setting_statusbar == 0) {
@@ -331,8 +328,8 @@ public class GuardService extends Service {
long time = System.currentTimeMillis();
getLockState("1", String.valueOf(time));
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
// JGYUtils.getInstance().wakeUpAoleyunAPP();
JGYUtils.getInstance().deleteScreenshots();
// JgyUtils.getInstance().wakeUpAoleyunAPP();
JgyUtils.getInstance().deleteScreenshots();
}
// sendScreenStatus(2);
}
@@ -420,7 +417,7 @@ public class GuardService extends Service {
* @param time 和锁屏状态无关,记录设备使用时长的
*/
private void getLockState(String status, String time) {
if (JGYUtils.isOfficialVersion() || JGYUtils.getInstance().tagEmpty()) {
if (JgyUtils.isOfficialVersion() || JgyUtils.getInstance().tagEmpty()) {
return;
}
NetInterfaceManager.getInstance()
@@ -494,21 +491,21 @@ public class GuardService extends Service {
} else {
if (Intent.ACTION_POWER_CONNECTED.equals(action)) {
LogDBManager.getInstance().creatOtherLog(LogDBManager.LOG_EVENT_BATTERY,
"开始充电", "electricity: " + JGYUtils.getInstance().getBatteryLevel() + "%");
"开始充电", "electricity: " + JgyUtils.getInstance().getBatteryLevel() + "%");
}
if (Intent.ACTION_POWER_DISCONNECTED.equals(action)) {
LogDBManager.getInstance().creatOtherLog(LogDBManager.LOG_EVENT_BATTERY,
"停止充电", "electricity: " + JGYUtils.getInstance().getBatteryLevel() + "%");
"停止充电", "electricity: " + JgyUtils.getInstance().getBatteryLevel() + "%");
}
if (Intent.ACTION_BATTERY_LOW.equals(action)) {
LogDBManager.getInstance().creatOtherLog(LogDBManager.LOG_EVENT_BATTERY,
"电量偏低", "electricity: " + JGYUtils.getInstance().getBatteryLevel() + "%");
"电量偏低", "electricity: " + JgyUtils.getInstance().getBatteryLevel() + "%");
}
if (Intent.ACTION_BATTERY_OKAY.equals(action)) {
LogDBManager.getInstance().creatOtherLog(LogDBManager.LOG_EVENT_BATTERY,
"电量充足", "electricity: " + JGYUtils.getInstance().getBatteryLevel() + "%");
"电量充足", "electricity: " + JgyUtils.getInstance().getBatteryLevel() + "%");
}
recordBattery("电量充足\t" + "electricity: " + JGYUtils.getInstance().getBatteryLevel() + "%");
recordBattery("电量充足\t" + "electricity: " + JgyUtils.getInstance().getBatteryLevel() + "%");
setDefaultUSBStatus();
Log.e(TAG, action);
start.onstar(SystemClock.elapsedRealtime());
@@ -841,7 +838,7 @@ public class GuardService extends Service {
}
}
Intent usbIntent = new Intent(usbStatus);
if (JGYUtils.getInstance().checkAppPlatform() == JGYUtils.TeclastP20sPlatform) {
if (JgyUtils.getInstance().checkAppPlatform() == JgyUtils.TeclastP20sPlatform) {
usbIntent.setPackage("com.android.settings");
}
sendBroadcast(usbIntent);
@@ -891,7 +888,7 @@ public class GuardService extends Service {
}
} else if (filepath.endsWith(".zip")) {
Log.e("taskComplete", "开机动画下载完成:" + task.getPercent() + ":" + task.getExtendField());
JGYUtils.getInstance().setBootanimationG10J(task.getFilePath());
JgyUtils.getInstance().setBootanimationG10J(task.getFilePath());
}
}