Android 11 添加系统开机启动的Service方案

2023-05-16

近日,在搞一套开机启动的Service,虽然在之前低版本弄过,以为直接照搬过来就可以了,结果还出了一堆问题,比如framework里边@NonNull检测、selinux新规则等等,废了本尊些许时日才完工~

且听我一一道来~~~~

首先,在Framework相关目录添加Service和aidl文件;

在frameworks/base/core/java/android/app/目录创建genie目录,新建如下两个文件:

GeniePadManager.java:

/**

* Pad manager

*/

package android.app.genie;

import android.content.Context;

import android.os.RemoteException;

import android.util.Slog;

import android.annotation.NonNull;

public class GeniePadManager {

Context mContext;

IGeniePadManager mService;

static final String TAG = "GeniePadManager";

public GeniePadManager(@NonNull Context context, @NonNull IGeniePadManager service) {

mContext = context;

mService = service;

if (mService != null)

Slog.d(TAG, "====== mService not null");

else

Slog.d(TAG, "====== mService not null");

}

public @NonNull String getPadBrightness() {

if (mService != null) {

try {

//Slog.d(TAG, " Will return getPadBrightness");

return mService.getPadBrightness();

} catch (RemoteException e) {

Slog.d(TAG, "RemoteException " + e);

return null;

}

}

return null;

}

public @NonNull String getTpVersion() {

if (mService != null) {

try {

Slog.d(TAG, "====== Will return getTpVersion");

return mService.getTpVersion();

} catch (RemoteException e) {

Slog.d(TAG, "RemoteException " + e);

return null;

}

}

return null;

}

}

IGeniePadManager.aidl:

/**

* pad controller

*/

package android.app.genie;

interface IGeniePadManager {

String getPadBrightness();

String getTpVersion();

}

第二步:执行一次make update-api,会遇到类似下边的报错日志:

1 new API lint issues were found. See tools/metalava/API-LINT.md for how to handle these.
/************************************************************
Your API changes are triggering API Lint warnings or errors. To make these errors go away, fix the code according to the error and/or warning messages above. it is not possible to do so, there are workarounds
1.You can suppress the errors with @SuppressLint("")
2.You can update the baseline by executing the following
command:
cp \
out/soong/.intermediates/frameworks/base/api-stubs-docs/android_common/api_lint_baseline.txt \
frameworks/base/api/lint-baseline.txt
To submit the revised baseline.txt to the main Android\n repository, you will need approval.
************************************************************/
这是Android的lint检查,之前的版本没有明显语法错误是不报错的,android11规范了这种语法,会报错,

假设报错提示为:

Missing nullability on method csdn() return [MissingNullability]

则需要在方法之前添加@NonNull关键字,这是解决这个问题的方案之一;还有一个更简单的方案,就是直接忽略掉这个目录的lint检查:

修改framework/base目录下的Android.bp

diff --git a/Android.bp b/Android.bp

index 14a2bff8a..fd2c2dcb9 100644

--- a/Android.bp

+++ b/Android.bp

@@ -1219,7 +1219,8 @@ metalava_framework_docs_args = "--manifest $(location core/res/AndroidManifest.x

"--api-lint-ignore-prefix android.icu. " +

"--api-lint-ignore-prefix java. " +

"--api-lint-ignore-prefix junit. " +

- "--api-lint-ignore-prefix org. "

+ "--api-lint-ignore-prefix org. " +

+ "--api-lint-ignore-prefix android.app.genie "

build = [

"StubLibraries.bp",

第三步:解决掉编译错误,顺利的话可以make update-api成功:

api文件会自动生成如下的改动:

diff --git a/api/current.txt b/api/current.txt

index 0d8a2c56c..fee9c416e 100644

--- a/api/current.txt

+++ b/api/current.txt

@@ -7616,6 +7616,37 @@ package android.app.blob {

}

+package android.app.genie {

+

+ public class GeniePadManager {

+ ctor public GeniePadManager(@NonNull android.content.Context, @NonNull android.app.genie.IGeniePadManager);

+ method @NonNull public String getPadBrightness();

+ method @NonNull public String getTpVersion();

+ }

+

+ public interface IGeniePadManager extends android.os.IInterface {

+ method public String getPadBrightness() throws android.os.RemoteException;

+ method public String getTpVersion() throws android.os.RemoteException;

+ }

+

+ public static class IGeniePadManager.Default implements android.app.genie.IGeniePadManager {

+ ctor public IGeniePadManager.Default();

+ method public android.os.IBinder asBinder();

+ method public String getPadBrightness() throws android.os.RemoteException;

+ method public String getTpVersion() throws android.os.RemoteException;

+ }

+

+ public abstract static class IGeniePadManager.Stub extends android.os.Binder implements android.app.genie.IGeniePadManager {

+ ctor public IGeniePadManager.Stub();

+ method public android.os.IBinder asBinder();

+ method public static android.app.genie.IGeniePadManager asInterface(android.os.IBinder);

+ method public static android.app.genie.IGeniePadManager getDefaultImpl();

+ method public boolean onTransact(int, android.os.Parcel, android.os.Parcel, int) throws android.os.RemoteException;

+ method public static boolean setDefaultImpl(android.app.genie.IGeniePadManager);

+ }

+

+}

+

package android.app.job {

public class JobInfo implements android.os.Parcelable {

@@ -10193,6 +10224,7 @@ package android.content {

field public static final String EUICC_SERVICE = "euicc";

field public static final String FILE_INTEGRITY_SERVICE = "file_integrity";

field public static final String FINGERPRINT_SERVICE = "fingerprint";

+ field public static final String GENIEPAD_SERVICE = "geniepad";

field public static final String HARDWARE_PROPERTIES_SERVICE = "hardware_properties";

field public static final String INPUT_METHOD_SERVICE = "input_method";

field public static final String INPUT_SERVICE = "input";

--- a/non-updatable-api/current.txt

+++ b/non-updatable-api/current.txt

@@ -7616,6 +7616,37 @@ package android.app.blob {

}

+package android.app.genie {

+

+ public class GeniePadManager {

+ ctor public GeniePadManager(@NonNull android.content.Context, @NonNull android.app.genie.IGeniePadManager);

+ method @NonNull public String getPadBrightness();

+ method @NonNull public String getTpVersion();

+ }

+

+ public interface IGeniePadManager extends android.os.IInterface {

+ method public String getPadBrightness() throws android.os.RemoteException;

+ method public String getTpVersion() throws android.os.RemoteException;

+ }

+

+ public static class IGeniePadManager.Default implements android.app.genie.IGeniePadManager {

+ ctor public IGeniePadManager.Default();

+ method public android.os.IBinder asBinder();

+ method public String getPadBrightness() throws android.os.RemoteException;

+ method public String getTpVersion() throws android.os.RemoteException;

+ }

+

+ public abstract static class IGeniePadManager.Stub extends android.os.Binder implements android.app.genie.IGeniePadManager {

+ ctor public IGeniePadManager.Stub();

+ method public android.os.IBinder asBinder();

+ method public static android.app.genie.IGeniePadManager asInterface(android.os.IBinder);

+ method public static android.app.genie.IGeniePadManager getDefaultImpl();

+ method public boolean onTransact(int, android.os.Parcel, android.os.Parcel, int) throws android.os.RemoteException;

+ method public static boolean setDefaultImpl(android.app.genie.IGeniePadManager);

+ }

+

+}

+

package android.app.job {

public class JobInfo implements android.os.Parcelable {

@@ -10193,6 +10224,7 @@ package android.content {

field public static final String EUICC_SERVICE = "euicc";

field public static final String FILE_INTEGRITY_SERVICE = "file_integrity";

field public static final String FINGERPRINT_SERVICE = "fingerprint";

+ field public static final String GENIEPAD_SERVICE = "geniepad";

field public static final String HARDWARE_PROPERTIES_SERVICE = "hardware_properties";

field public static final String INPUT_METHOD_SERVICE = "input_method";

field public static final String INPUT_SERVICE = "input";

第四步:如上所示是添加完成了接口文件,并且编译完成,这一步开始如何添加至系统开机启动,添加方式如下:

--- a/core/java/android/app/SystemServiceRegistry.java

+++ b/core/java/android/app/SystemServiceRegistry.java

@@ -44,6 +44,8 @@ import android.app.usage.IUsageStatsManager;

import android.app.usage.NetworkStatsManager;

import android.app.usage.StorageStatsManager;

import android.app.usage.UsageStatsManager;

+import android.app.genie.GeniePadManager;

+import android.app.genie.IGeniePadManager;

import android.appwidget.AppWidgetManager;

import android.bluetooth.BluetoothManager;

import android.companion.CompanionDeviceManager;

@@ -1216,6 +1218,18 @@ public final class SystemServiceRegistry {

}

});

+ registerService(Context.GENIEPAD_SERVICE, GeniePadManager.class,

+ new CachedServiceFetcher() {

+ @Override

+ public GeniePadManager createService(ContextImpl ctx)

+ throws ServiceNotFoundException {

+ IBinder b = ServiceManager.getServiceOrThrow(

+ Context.GENIEPAD_SERVICE);

+ IGeniePadManager service = IGeniePadManager.Stub.asInterface(b);

+ return new GeniePadManager(ctx.getOuterContext(), service);

+ }

+ });

+

registerService(Context.SLICE_SERVICE, SliceManager.class,

new CachedServiceFetcher() {

@Override

为service自定义名称:

diff --git a/core/java/android/content/Context.java b/core/java/android/content/Context.java

index 8472144a9..380e0df29 100644

--- a/core/java/android/content/Context.java

+++ b/core/java/android/content/Context.java

@@ -4188,6 +4188,8 @@ public abstract class Context {

*/

public static final String AUDIO_SERVICE = "audio";

+ public static final String GENIEPAD_SERVICE = "geniepad";

+

/**

* AuthService orchestrates biometric and PIN/pattern/password authentication.

*

--- a/services/java/com/android/server/SystemServer.java

+++ b/services/java/com/android/server/SystemServer.java

@@ -180,6 +180,7 @@ import com.android.server.webkit.WebViewUpdateService;

import com.android.server.wm.ActivityTaskManagerService;

import com.android.server.wm.WindowManagerGlobalLock;

import com.android.server.wm.WindowManagerService;

+import com.android.server.GeniePadManagerService;

import dalvik.system.PathClassLoader;

import dalvik.system.VMRuntime;

@@ -1625,6 +1626,16 @@ public final class SystemServer {

}

t.traceEnd();

+ t.traceBegin("StartGeniePadManagerService");

+ try {

+ Slog.i(TAG, "PadManager Service is create");

+ ServiceManager.addService(Context.GENIEPAD_SERVICE,

+ new GeniePadManagerService(context));

+ } catch (Throwable e) {

+ reportWtf("starting GeniePadManagerService", e);

+ }

+ t.traceEnd();

+

t.traceBegin("StartNotificationManager");

mSystemServiceManager.startService(NotificationManagerService.class);

SystemNotificationChannels.removeDeprecated(context);

第五步:简单描述下如何调用该接口:

mManager = (GeniePadManager) mmContext.getSystemService(Context.GENIEPAD_SERVICE);

mManager.getTpVersion();

最后,编译刷机,验证接口是否可用;

刷机后,发现还是太乐观了,一大块没搞,就是selinux规则配置添加:

修改device/mediatek/sepolicy/bsp目录下te文件,android11针对系统级Service更是添加了严苛规则,需要对servicemanager赋予add和find属性,具体流程及报错不在赘述,直接上最终极改动:

diff --git a/non_plat/file.te b/non_plat/file.te

index 69bfd33..f6de6ac 100644

--- a/non_plat/file.te

+++ b/non_plat/file.te

@@ -96,3 +96,6 @@ type proc_mtk_mdp_debug, fs_type, proc_type;

# Date : 2020/12/22

# Purpose: add permission for /data/vendor/hmp/

type data_vendor_hmp_file, data_file_type, file_type;

+

+# tp

+type tp_file, fs_type, proc_type;

diff --git a/non_plat/file_contexts b/non_plat/file_contexts

index 572925c..69f6a2d 100644

--- a/non_plat/file_contexts

+++ b/non_plat/file_contexts

@@ -215,3 +215,6 @@ data/duraspeed(/.*)? u:object_r:duraspeed_data_file:s0

# Date: 2020/12/29

# Purpose: mtk hmp info file

/data/vendor/hmp(/.*)? u:object_r:data_vendor_hmp_file:s0

+

+# tp

+/proc/android_touch(/.*)? u:object_r:tp_file:s0

diff --git a/non_plat/genfs_contexts b/non_plat/genfs_contexts

index 6ddcf5f..2814908 100644

--- a/non_plat/genfs_contexts

+++ b/non_plat/genfs_contexts

@@ -46,3 +46,7 @@ genfscon sysfs /devices/platform/soc/11170000.sdio/mmc_host/mmc1/mmc1:0001/mmc1:

genfscon sysfs /devices/platform/soc/11170000.sdio/mmc_host/mmc1/mmc1:0001/mmc1:0001:1/net/ap0/mtu u:object_r:sysfs_net:s0

genfscon sysfs /devices/platform/soc/11170000.sdio/mmc_host/mmc1/mmc1:0001/mmc1:0001:1/net/p2p0/mtu u:object_r:sysfs_net:s0

+

+# tp node

+genfscon proc /android_touch/vendor u:object_r:tp_file:s0

+

diff --git a/non_plat/system_app.te b/non_plat/system_app.te

index 818c7c6..c9cc837 100644

--- a/non_plat/system_app.te

+++ b/non_plat/system_app.te

@@ -182,3 +182,8 @@ allow system_app mtk_audiohal_data_file:file create_file_perms;

# Purpose: Allow atmwifimeta apk to use HIDL and access loghidlvendorservice

allow system_app mtk_hal_log_hwservice:hwservice_manager find;

binder_call(system_app, loghidlvendorservice);

+

+# tp

+allow system_app tp_file:dir { search read };

+allow system_app tp_file:file { read write open getattr };

+allow system_app genie_padmanager_service:service_manager { find add };

diff --git a/non_plat/system_server.te b/non_plat/system_server.te

index 3908c9a..23762e5 100644

--- a/non_plat/system_server.te

+++ b/non_plat/system_server.te

@@ -222,3 +222,8 @@ allow system_server proc_mtk_mdp_debug:file getattr;

# Date:2021/04/10

# Operation:allow CachedAppOptimi to search /proc/mtk_mdp_debug

allow system_server proc_mtk_mdp_debug:dir search;

+

+# For system service tp permission

+allow system_server tp_file:dir { search read };

+allow system_server tp_file:file { read write open getattr };

+allow system_server genie_padmanager_service:service_manager { find add };

diff --git a/plat_private/service_contexts b/plat_private/service_contexts

index 34255bf..fcac889 100644

--- a/plat_private/service_contexts

+++ b/plat_private/service_contexts

@@ -33,6 +33,7 @@ capctrl u:object_r:mtk_radio_service:s0

vow_bridge u:object_r:mtk_vowbridge_service:s0

autoboot u:object_r:mtk_autoboot_service:s0

smartratswitch u:object_r:mtk_radio_service:s0

+geniepad u:object_r:genie_padmanager_service:s0

# Other Services

GoogleOtaBinder u:object_r:ota_agent_service:s0

diff --git a/plat_public/service.te b/plat_public/service.te

index 91d97ec..86cd6b3 100644

--- a/plat_public/service.te

+++ b/plat_public/service.te

@@ -40,6 +40,7 @@ type vtservice_hidl_service, service_manager_type;

type mtk_hdmi_service,service_manager_type;

type ppl_agent_service, service_manager_type;

type mtk_gwsd_service, service_manager_type;

+type genie_padmanager_service, service_manager_type;

# Trustonic Services

type tee_service, service_manager_type;

至此,增量编译,上一步示例接口才能拿到数据~

大功告成!Mark~

本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

Android 11 添加系统开机启动的Service方案 的相关文章

  • 这个方法比 Math.random() 更快吗?

    我是一名初学者 目前已经开始开发一款使用粒子群优化算法的 Android 游戏 我现在正在尝试稍微优化我的代码 并且 for 循环中有相当多的 Math random 几乎一直在运行 所以我正在考虑一种方法来绕过并跳过所有 Math ran
  • 适用于 IOS 和 Android 的支付网关 [关闭]

    Closed 这个问题不符合堆栈溢出指南 help closed questions 目前不接受答案 我正在开发一个应用程序 用户必须在澳大利亚餐馆通过应用程序 android ios 付款 有两种付款方式 通过 PayPal 或 Visa
  • 如何从该 JAVA 文件中提取 Delphi 类以与 Android 一起使用?

    我的Delphi XE7项目需要与FTDI FT311 Android 配件芯片 http www ftdichip com Products ICs FT311D html 他们帮助提供了一个 Android 演示 其中包括他们的 JAV
  • Android 应用程序在启动时打开应用程序信息屏幕,而不是启动主 Activity

    我不确定这是否是一个问题 但这是我第一次遇到这个问题 我正在开发一个应用程序 当我在进行一些编码后断开应用程序与 Android Studio 和 PC 的连接时 如果我尝试在手机上打开应用程序 它会启动app info屏幕 我们看到强制停
  • 从历史堆栈中删除活动

    我的应用程序在用户第一次运行应用程序时显示注册活动 如下所示 活动启动画面 欢迎来到游戏 注册帐户 ActivitySplashScreenSignUp 很好 填写此信息 ActivityGameMain 游戏主屏幕 因此 当用户单击每个屏
  • 如何在android中压缩和解压png图像

    您好 在我的应用程序中 当我单击 zip 按钮时 我需要压缩图像文件 当我单击解压缩按钮时 我需要解压缩文件 我尝试使用下面的代码来压缩图像 但我的问题是当我单击 zip 按钮时 正在创建 zip 文件 但之后在使用 winzip 软件的系
  • API29 上不推荐使用 setColorFilter

    我使用以下行来更改 VectorDrawable 的颜色 mydrawable getBackground setColorFilter color PorterDuff Mode SRC ATOP 这很好用 尽管它现在已被弃用 文档建议我
  • 如何访问android库项目中的资源

    我正在构建一个 android 库项目 它内部需要一些静态资源 图像 xml 等 然后我想知道我可以把这些资源放在哪里以及如何访问它们 既然我把资源放到了assets文件夹 我使用 AssetManager 来访问资源 public cla
  • 不变违规:requireNativeComponent:在 UIManager 中找不到“RNSVGSvgViewAndroid”

    我对标题中提到的错误感到头疼 我正在使用react native gifted charts https www npmjs com package react native gifted charts v 1 0 3 https www
  • 位图内存不足错误

    我对这个错误有疑问 我从 URL 制作网站图标解析器 我这样做是这样的 public class GrabIconsFromWebPage public static String replaceUrl String url StringB
  • 使用 Android Firebase 堆栈推送通知

    我开发了使用 Firebase 接收推送通知的 Android 应用程序 我的代码基于 Firebase Google 官方文档 https firebase google com docs cloud messaging android
  • Android Fragment onCreateView 与手势

    我正在尝试在片段中使用手势 我在 FragmentActivity 中有以下内容来处理我的详细信息片段 我试图发生的情况是 当在视图上检测到滑动时 将该视图内的数据替换为上一个或下一个条目 如果有更好的方法来处理这个问题 我完全同意 然而
  • android textview 有字符限制吗?

    我正在尝试在 android TextView 中输入超过 2000 3000 个字符 它不显示任何内容 任何一份指南是否对 android textview 有字符限制或什么 我在G3中做了一些小测试 我发现 如果activtiy布局中有
  • 如何构建自定义摄像机应用程序?

    我正在尝试开发一个自定义摄像机录像机 当我的设备在 Activity 的 beginRecording 中执行 start MediaRecorder 方法时 应用程序崩溃 我不知道出了什么问题 因为我遵循谷歌API指南 http deve
  • 如何在 Android 上将动态 alpha 遮罩应用于文本

    I want to make a dynamic alpha mask with drawable shapes as circles or whatever and apply it to a drawed text on Android
  • Activity 类型中的方法 showDialog(int) 在 Android 中已被弃用?

    方法showDialog int 从类型Activity is 已弃用 什么原因 以及如何解决 什么原因 http developer android com reference android app Activity html show
  • 如何关闭 EditText 中的建议?

    如何在 Android 中关闭 EditText 中的建议 android inputType textNoSuggestions 根据this http comments gmane org gmane comp handhelds an
  • Flash 对象未显示在phonegap android 中

    我已经在 android 手机间隙创建了一个应用程序 我有一个屏幕 我想显示一个静态 flash obj 所以我在屏幕 HTML 页面中放入了以下代码
  • 如何在布局编辑器中模拟沉浸式模式

    我想在布局编辑器中全屏查看我的布局 我正在使用 eclipse 插件 我已经通过选择隐藏了 ActionBar NoActionBar组合中的主题 但导航栏是一个不同的故事 AFAIK 它只能使用代码中的标志来隐藏 我需要在活动 xml 文
  • 将焦距(以毫米为单位)转换为像素 - Android

    在 Android 中 我当前正在访问camera s焦距通过使用getFocalLength in Camera1 Camera2不是一个选择 我正在尝试完全填充当前的计算 focal length pix focal length m

随机推荐

  • 使用Hexo+Github一步步搭建属于自己的博客(基础)

    前言 xff1a 电脑系统为window 10专业版 xff0c 64位 相关步骤 xff1a 1 安装Node js和配置好Node js环境 xff0c 打开cmd命令行 xff0c 成功界面如下 2 安装Git和配置好Git环境 xf
  • OpenSSL命令学习

    OpenSSL命令学习 一 基础概念 OpenSSL是一个开放源代码的软件库包 xff0c 应用程序可以使用这个包来进行安全通信 xff0c 避免窃听 xff0c 同时确认另一端连接者的身份 这个包广泛被应用在互联网的网页服务器上 下面以问
  • 论文阅读——Shadow Attacks:Hiding and Replacing Content in Signed PDFS

    论文阅读报告 Shadow Attacks xff1a Hiding and Replacing Content in Signed PDFS 阅读背景 本次阅读的论文是由Christian Mainka Vladislav Mladeno
  • SecKill——一款超级好用的抢单软件

    软件介绍 下载地址见文章末尾 Seckill是一款使用Python和pyqt编写 xff0c 利用selenium库实现的自动化抢单软件 xff0c 它界面友好 xff0c 使用方便 xff0c 可以帮助你在购物时快人一步 xff0c 及时
  • 获取PowerShell的所有历史记录

    PowerShell默认的history命令只能查看当前窗口的历史记录 xff0c 很不方便 可以使用以下方法获取PowerShell的所有历史记录 xff0c 简单记录一下 一 PSReadline 当前版本 xff08 5 1 xff0
  • 用pyqt5写一个同步文件夹内容的小工具

    详见https github com distiny cool File Synchronization 完整代码在最下面 同步文件夹内容的小工具 点这里直接下载可执行程序 出发点 打算把电脑上的文件备份到外部磁盘上面 xff0c 但是原来
  • 博客园添加GitHub链接

    添加该样式涉及到博客园后台页面定制CSS代码和页首Html代码两处改动 1 将下列CSS代码添加至页面定制CSS代码处 1 GitHub Cornor 2 github corner hover octo arm 3 animation o
  • SQL-修改表名,列名

    sql 1 sql server修改表名 列名 修改表名 xff1a EXEC sp rename 原有表名 39 新表名 39 修改列名 xff1a EXEC sp rename 表名 原有列名 新列名 39 39 COLUMN 39 如
  • 程序员你为什么迷茫?

    你曾经充满热情 xff0c 是一位开源软件倡导者 xff0c 你崇尚全栈工程师才有未来的理念 xff0c 你渴望改变世界 但是现在你每天都处于焦虑之中 xff0c 你每天不断地学习各种技术Kotlin Swift React Native
  • Dataset之COCO数据集:COCO数据集的简介、下载、使用方法之详细攻略

    COCO数据集的简介 MS COCO的全称是Microsoft Common Objects in Context xff0c 起源于微软于2014年出资标注的Microsoft COCO数据集 xff0c 与ImageNet竞赛一样 xf
  • 类之间的组合关系

    继承加复合 这种情况下的构造顺序是 xff1a 先调用Base的默认构造函数 xff0c 再调用Component的构造函数 xff0c 最后调用自己的构造函数 析构的顺序与之相反 xff0c 先调用自己析构函数 xff0c 再调用Comp
  • maven pom.xml 详解(注释版)

    转自 xff1a http mrlee23 iteye com blog 1806412 pom xml Xml代码 lt project xmlns 61 34 http maven apache org POM 4 0 0 34 xml
  • 当用户支付成功,微信服务器与我们服务器中间网络断开时处理方案

    用户支付成功了 xff0c 但是微信服务器与我们服务器的网络中断了 这个时候 xff0c 我们的回调数据是没办法处理的 xff0c 这个时间的解决方案 可以有 xff1a 1 有支付脏表进行字段order status之类的进行区分哪些是没
  • java多线程设置超时时间

    情景 xff1a 多线程中个别线程执行时间会很长 xff0c 如果线程执行时间超过某段时间 xff0c 自动结束该线程 百度了很多答案之后大部分的解决办法都是利用Future类中的get long timeout TimeUnit unit
  • Android Studio安装Kotlin插件

    1 Kotlin语言介绍 Kotlin 是 JetBrains 在 2010 年推出的基于 JVM 的新编程语言 xff0c 是一种新的静态类型编程语言 开发者称 xff0c 设计它的目的是避免 Java 语言编程中的一些难题 比如 xff
  • VMware虚拟机教程

    什么样配置的电脑适合建立虚拟机 xff1f 当硬件配置达不到要求时 xff0c 虚拟机运行速度会很慢 xff0c 甚至不能运行 xff0c VMware的配置要求如下 CPU 最低主频266MB xff0c 建议P3 1GHz以上 xff1
  • <数据结构>无向连通子图个数求解(C语言版)

    求无向图连通子图个数 测试数据由m 43 1行构成 xff0c 第一行为两个正整数n 1 lt n lt 61 30 xff0c m 1 lt m lt 100 xff0c 顶点数 xff0c 边数 m行数据是边的信息 xff0c 表示该边
  • 【2015-2016,我在路上】

    前言 xff1a 每天 xff0c 每时 xff0c 每分 xff0c 时光的步伐永远不会停止 xff0c 当我提起笔 xff0c 写下的这一瞬间 xff0c 时间又是一年 xff0c 一年的时光 xff0c 在没逝去时 xff0c 感觉很
  • sourceTree中的git rebase变基操作

    sourceTree中的git rebase操作 记录Sourcetree 基于git rebase修改git提交记录的方法 sourceTree进行git rebase变基操作 sourcetree rebase的使用 sourceTre
  • Android 11 添加系统开机启动的Service方案

    近日 xff0c 在搞一套开机启动的Service xff0c 虽然在之前低版本弄过 xff0c 以为直接照搬过来就可以了 xff0c 结果还出了一堆问题 xff0c 比如framework里边 64 NonNull检测 selinux新规