Android 13 framework方法通过AIDL方式供三方APP使用

    增加接口服务供外部调用diff --git a/frameworks/base/core/api/current.txt b/frameworks/base/core/api/current.txt
index 6eeeb7dcb5..2b6445eed8 100644
--- a/frameworks/base/core/api/current.txt
+++ b/frameworks/base/core/api/current.txt
@@ -4590,6 +4590,14 @@ package android.app {field public static final String EXTRA_USAGE_TIME_REPORT_PACKAGES = "android.usage_time_packages";}+  public class AemManager {
+    method public void addLmkWhiteList(@Nullable String);
+    method public void clearLmkWhiteList();
+    method public void delLmkWhiteList(@Nullable String);
+    method public void mockNotifyMessage(@Nullable String, int, @NonNull android.app.Notification, int);
+    method @Nullable public String queryLmkWhiteList();
+  }
+public class AlarmManager {method public boolean canScheduleExactAlarms();method public void cancel(android.app.PendingIntent);
@@ -6496,6 +6504,7 @@ package android.app {method public boolean isNotificationListenerAccessGranted(android.content.ComponentName);method public boolean isNotificationPolicyAccessGranted();method @WorkerThread public boolean matchesCallFilter(@NonNull android.net.Uri);
+    method public void mockNotifyMessage(@Nullable String, int, @NonNull android.app.Notification, int);method public void notify(int, android.app.Notification);method public void notify(String, int, android.app.Notification);method public void notifyAsPackage(@NonNull String, @Nullable String, int, @NonNull android.app.Notification);
@@ -9772,6 +9781,7 @@ package android.content {field public static final String ACCESSIBILITY_SERVICE = "accessibility";field public static final String ACCOUNT_SERVICE = "account";field public static final String ACTIVITY_SERVICE = "activity";
+    field public static final String AEM_SERVICE = "aemManager";field public static final String ALARM_SERVICE = "alarm";field public static final String APPWIDGET_SERVICE = "appwidget";field public static final String APP_OPS_SERVICE = "appops";
diff --git a/frameworks/base/core/java/android/app/AemManager.java b/frameworks/base/core/java/android/app/AemManager.java
new file mode 100755
index 0000000000..8062e3a335
--- /dev/null
+++ b/frameworks/base/core/java/android/app/AemManager.java
@@ -0,0 +1,85 @@
+package android.app;
+
+import android.annotation.NonNull;
+import android.annotation.Nullable;
+import android.annotation.SystemService;
+import android.content.Context;
+import android.os.IBinder;
+import android.compat.annotation.UnsupportedAppUsage;
+import android.os.RemoteException;
+import android.os.ServiceManager;
+import android.app.IAemManager;
+import android.util.Log;
+
+@SystemService(Context.AEM_SERVICE)
+public class AemManager {
+    private IAemManager mService;
+    private static AemManager sInstance;
+    /**
+     *@hide
+     */
+    public AemManager(IAemManager service){
+        mService=service;
+    }
+    /**
+     *@hide
+     */
+    @NonNull
+    @UnsupportedAppUsage
+    public static AemManager getInstance() {
+        synchronized (AemManager.class) {
+            if (sInstance == null) {
+                try {
+                    IBinder b = ServiceManager.getServiceOrThrow(Context.AEM_SERVICE);
+                    sInstance = new AemManager(IAemManager.Stub
+                            .asInterface(ServiceManager.getServiceOrThrow(Context.AEM_SERVICE)));
+                } catch (ServiceManager.ServiceNotFoundException e) {
+                    throw new IllegalStateException(e);
+                }
+            }
+            return sInstance;
+        }
+    }
+
+    @Nullable
+    public String queryLmkWhiteList() {
+        try {
+            return mService.queryLmkWhiteList();
+        } catch (RemoteException e) {
+            e.rethrowFromSystemServer();
+        }
+        return "";
+    }
+
+    public void clearLmkWhiteList() {
+        try {
+            mService.clearLmkWhiteList();
+        } catch (RemoteException e) {
+            e.rethrowFromSystemServer();
+        }
+    }
+
+    public void addLmkWhiteList(@Nullable String jsonData) {
+        try {
+            mService.addLmkWhiteList(jsonData);
+        } catch (RemoteException e) {
+            e.rethrowFromSystemServer();
+        }
+    }
+
+    public void delLmkWhiteList(@Nullable String jsonData) {
+        try {
+            mService.delLmkWhiteList(jsonData);
+        } catch (RemoteException e) {
+            e.rethrowFromSystemServer();
+        }
+    }
+    public void mockNotifyMessage(@Nullable String pkg, int id, @NonNull Notification notification,int uid) {
+        try {
+            mService.mockNotifyMessage(pkg,id,notification,uid);
+        } catch (RemoteException e) {
+            e.rethrowFromSystemServer();
+        }
+    }
+
+}
diff --git a/frameworks/base/core/java/android/app/IAemManager.aidl b/frameworks/base/core/java/android/app/IAemManager.aidl
new file mode 100755
index 0000000000..db22c4fdc7
--- /dev/null
+++ b/frameworks/base/core/java/android/app/IAemManager.aidl
@@ -0,0 +1,18 @@
+package android.app;
+
+import android.app.Notification;
+
+/**
+ * System private API for talking with the activity manager service.  This
+ * provides calls from the application back to the activity manager.
+ *
+ * {@hide}
+ */
+interface IAemManager {
+    void addLmkWhiteList(@nullable String jsonData);
+    void delLmkWhiteList(@nullable String jsonData);
+    String queryLmkWhiteList();
+    void clearLmkWhiteList();
+
+    void mockNotifyMessage(@nullable String pkg, int id,in Notification notification,int uid);
+}
diff --git a/frameworks/base/core/java/android/app/SystemServiceRegistry.java b/frameworks/base/core/java/android/app/SystemServiceRegistry.java
index 40192836e0..1ab79c6c69 100644
--- a/frameworks/base/core/java/android/app/SystemServiceRegistry.java
+++ b/frameworks/base/core/java/android/app/SystemServiceRegistry.java
@@ -1514,6 +1514,19 @@ public final class SystemServiceRegistry {return new DisplayHashManager();}});
+        registerService(Context.ACTIVITY_SERVICE, ActivityManager.class,
+                new CachedServiceFetcher<ActivityManager>() {
+                    @Override
+                    public ActivityManager createService(ContextImpl ctx) {
+                        return new ActivityManager(ctx.getOuterContext(), ctx.mMainThread.getHandler());
+                    }});
+        //syd
+        registerService(Context.AEM_SERVICE, AemManager.class,
+                new CachedServiceFetcher<AemManager>() {
+                    @Override
+                    public AemManager createService(ContextImpl ctx) {
+                            return AemManager.getInstance();
+                    }});registerService(Context.AMBIENT_CONTEXT_SERVICE, AmbientContextManager.class,new CachedServiceFetcher<AmbientContextManager>() {
diff --git a/frameworks/base/core/java/android/content/Context.java b/frameworks/base/core/java/android/content/Context.java
index fce23cf681..f5245f3f06 100644
--- a/frameworks/base/core/java/android/content/Context.java
+++ b/frameworks/base/core/java/android/content/Context.java
@@ -3932,6 +3932,7 @@ public abstract class Context {//@hide: ATTESTATION_VERIFICATION_SERVICE,//@hide: SAFETY_CENTER_SERVICE,DISPLAY_HASH_SERVICE,
+            AEM_SERVICE,})@Retention(RetentionPolicy.SOURCE)public @interface ServiceName {}
@@ -5763,6 +5764,17 @@ public abstract class Context {*/public static final String CROSS_PROFILE_APPS_SERVICE = "crossprofileapps";+    /**
+     * Use with {@link #getSystemService(String)} to retrieve a {@link
+     * android.app.AemManager} for interacting with the status bar and quick settings.
+     *
+     * @see #getSystemService(String)
+     * @see android.app.AemManager
+     *
+     */
+    @SuppressLint("ServiceName")
+    public static final String AEM_SERVICE = "aemManager";
+/*** Use with {@link #getSystemService} to retrieve a* {@link android.se.omapi.ISecureElementService}
diff --git a/frameworks/base/services/core/java/com/android/server/am/AemManagerService.java b/frameworks/base/services/core/java/com/android/server/am/AemManagerService.java
new file mode 100755
index 0000000000..4c06f1d57a
--- /dev/null
+++ b/frameworks/base/services/core/java/com/android/server/am/AemManagerService.java
@@ -0,0 +1,53 @@
+package com.android.server.am;
+
+import android.annotation.NonNull;
+import android.annotation.Nullable;
+import android.app.ActivityManager;
+import android.app.IAemManager;
+import android.app.Notification;
+import android.app.NotificationManager;
+import android.content.Context;
+import android.os.RemoteException;
+import android.util.Log;
+
+public class AemManagerService extends IAemManager.Stub {
+    Context mContext;
+    ActivityManager am;
+    NotificationManager notificationManager;
+    public AemManagerService(Context context){
+        mContext = context;
+        am = (ActivityManager) context.getSystemService(Context.ACTIVITY_SERVICE);
+        notificationManager = (NotificationManager) context.getSystemService(Context.NOTIFICATION_SERVICE);
+    }
+
+    public Context getContext(){
+        return mContext;
+    }
+
+    @Override
+    public String queryLmkWhiteList() throws RemoteException {
+        return am.queryLmkWhiteList();
+    }
+
+    @Override
+    public void clearLmkWhiteList() throws RemoteException{
+        am.clearLmkWhiteList();
+    }
+
+    @Override
+    public void addLmkWhiteList(String jsonData) throws RemoteException{
+        am.addLmkWhiteList(jsonData);
+    }
+
+    @Override
+    public void delLmkWhiteList(String jsonData) throws RemoteException{
+        am.delLmkWhiteList(jsonData);
+    }
+
+    @Override
+    public void mockNotifyMessage(@Nullable String pkg, int id, @NonNull Notification notification,int uid) {
+        notificationManager.mockNotifyMessage(pkg, id, notification, uid);
+    }
+}
+
+
diff --git a/frameworks/base/services/java/com/android/server/SystemServer.java b/frameworks/base/services/java/com/android/server/SystemServer.java
index 2401ec3497..2bd46bac3d 100644
--- a/frameworks/base/services/java/com/android/server/SystemServer.java
+++ b/frameworks/base/services/java/com/android/server/SystemServer.java
@@ -105,6 +105,7 @@ import com.android.internal.util.EmergencyAffordanceManager;import com.android.internal.util.FrameworkStatsLog;import com.android.internal.widget.ILockSettings;import com.android.server.am.ActivityManagerService;
+import com.android.server.am.AemManagerService;import com.android.server.ambientcontext.AmbientContextManagerService;import com.android.server.appbinding.AppBindingService;import com.android.server.art.ArtManagerLocal;
@@ -3061,6 +3062,15 @@ public final class SystemServer implements Dumpable {}t.traceEnd();+        t.traceBegin("AemManagerService");
+        try {
+            ServiceManager.addService(Context.AEM_SERVICE,
+                    new AemManagerService(context));
+        } catch (Throwable e) {
+            Slog.e(TAG, "Failure starting AemManagerService", e);
+        }
+        t.traceEnd();
+t.traceEnd(); // startOtherServices}diff --git a/system/sepolicy/prebuilts/api/28.0/private/service_contexts b/system/sepolicy/prebuilts/api/28.0/private/service_contexts
index 5ec45a23ef..3c57817cc1 100644
--- a/system/sepolicy/prebuilts/api/28.0/private/service_contexts
+++ b/system/sepolicy/prebuilts/api/28.0/private/service_contexts
@@ -158,6 +158,7 @@ SurfaceFlinger                            u:object_r:surfaceflinger_service:s0system_update                             u:object_r:system_update_service:s0task                                      u:object_r:task_service:s0telecom                                   u:object_r:telecom_service:s0
+AemManager                                       u:object_r:AemManager_service:s0telephony.registry                        u:object_r:registry_service:s0textclassification                        u:object_r:textclassification_service:s0textservices                              u:object_r:textservices_service:s0
diff --git a/system/sepolicy/prebuilts/api/28.0/public/service.te b/system/sepolicy/prebuilts/api/28.0/public/service.te
index 3526049f25..1bf428920a 100644
--- a/system/sepolicy/prebuilts/api/28.0/public/service.te
+++ b/system/sepolicy/prebuilts/api/28.0/public/service.te
@@ -106,6 +106,7 @@ type network_management_service, app_api_service, ephemeral_app_api_service, systype network_score_service, system_api_service, system_server_service, service_manager_type;type network_time_update_service, system_server_service, service_manager_type;type notification_service, app_api_service, ephemeral_app_api_service, system_server_service, service_manager_type;
+type AemManager_service, app_api_service, ephemeral_app_api_service, system_server_service, service_manager_type;type oem_lock_service, system_api_service, system_server_service, service_manager_type;type otadexopt_service, system_server_service, service_manager_type;type overlay_service, system_api_service, system_server_service, service_manager_type;
diff --git a/system/sepolicy/prebuilts/api/29.0/private/service_contexts b/system/sepolicy/prebuilts/api/29.0/private/service_contexts
index 96d553bf49..c7a0867b79 100644
--- a/system/sepolicy/prebuilts/api/29.0/private/service_contexts
+++ b/system/sepolicy/prebuilts/api/29.0/private/service_contexts
@@ -188,6 +188,7 @@ suspend_control                           u:object_r:system_suspend_control_servsystem_update                             u:object_r:system_update_service:s0task                                      u:object_r:task_service:s0telecom                                   u:object_r:telecom_service:s0
+AemManager                                       u:object_r:AemManager_service:s0telephony.registry                        u:object_r:registry_service:s0testharness                               u:object_r:testharness_service:s0textclassification                        u:object_r:textclassification_service:s0
diff --git a/system/sepolicy/prebuilts/api/29.0/public/service.te b/system/sepolicy/prebuilts/api/29.0/public/service.te
index a2193d0edb..bb9a06d218 100644
--- a/system/sepolicy/prebuilts/api/29.0/public/service.te
+++ b/system/sepolicy/prebuilts/api/29.0/public/service.te
@@ -124,6 +124,7 @@ type network_score_service, system_api_service, system_server_service, service_mtype network_stack_service, system_server_service, service_manager_type;type network_time_update_service, system_server_service, service_manager_type;type notification_service, app_api_service, ephemeral_app_api_service, system_server_service, service_manager_type;
+type AemManager_service, app_api_service, ephemeral_app_api_service, system_server_service, service_manager_type;type oem_lock_service, system_api_service, system_server_service, service_manager_type;type otadexopt_service, system_server_service, service_manager_type;type overlay_service, system_api_service, system_server_service, service_manager_type;
diff --git a/system/sepolicy/prebuilts/api/30.0/private/service_contexts b/system/sepolicy/prebuilts/api/30.0/private/service_contexts
index 5c6f1a4766..db3d1aeba3 100644
--- a/system/sepolicy/prebuilts/api/30.0/private/service_contexts
+++ b/system/sepolicy/prebuilts/api/30.0/private/service_contexts
@@ -213,6 +213,7 @@ task                                      u:object_r:task_service:s0telecom                                   u:object_r:telecom_service:s0telephony.registry                        u:object_r:registry_service:s0telephony_ims                             u:object_r:radio_service:s0
+AemManager                                       u:object_r:AemManager_service:s0testharness                               u:object_r:testharness_service:s0tethering                                 u:object_r:tethering_service:s0textclassification                        u:object_r:textclassification_service:s0
diff --git a/system/sepolicy/prebuilts/api/30.0/public/service.te b/system/sepolicy/prebuilts/api/30.0/public/service.te
index f27772eabb..a01f894b74 100644
--- a/system/sepolicy/prebuilts/api/30.0/public/service.te
+++ b/system/sepolicy/prebuilts/api/30.0/public/service.te
@@ -136,6 +136,7 @@ type network_score_service, system_api_service, system_server_service, service_mtype network_stack_service, system_server_service, service_manager_type;type network_time_update_service, system_server_service, service_manager_type;type notification_service, app_api_service, ephemeral_app_api_service, system_server_service, service_manager_type;
+type AemManager_service, app_api_service, ephemeral_app_api_service, system_server_service, service_manager_type;type oem_lock_service, system_api_service, system_server_service, service_manager_type;type otadexopt_service, system_server_service, service_manager_type;type overlay_service, system_api_service, system_server_service, service_manager_type;
diff --git a/system/sepolicy/prebuilts/api/31.0/private/service_contexts b/system/sepolicy/prebuilts/api/31.0/private/service_contexts
index 3fd342b9be..6275bea280 100644
--- a/system/sepolicy/prebuilts/api/31.0/private/service_contexts
+++ b/system/sepolicy/prebuilts/api/31.0/private/service_contexts
@@ -266,6 +266,7 @@ task                                      u:object_r:task_service:s0telecom                                   u:object_r:telecom_service:s0telephony.registry                        u:object_r:registry_service:s0telephony_ims                             u:object_r:radio_service:s0
+AemManager                                       u:object_r:AemManager_service:s0testharness                               u:object_r:testharness_service:s0tethering                                 u:object_r:tethering_service:s0textclassification                        u:object_r:textclassification_service:s0
diff --git a/system/sepolicy/prebuilts/api/31.0/public/service.te b/system/sepolicy/prebuilts/api/31.0/public/service.te
index ba7837d562..072b615fd9 100644
--- a/system/sepolicy/prebuilts/api/31.0/public/service.te
+++ b/system/sepolicy/prebuilts/api/31.0/public/service.te
@@ -158,6 +158,7 @@ type network_score_service, system_api_service, system_server_service, service_mtype network_stack_service, system_server_service, service_manager_type;type network_time_update_service, system_server_service, service_manager_type;type notification_service, app_api_service, ephemeral_app_api_service, system_server_service, service_manager_type;
+type AemManager_service, app_api_service, ephemeral_app_api_service, system_server_service, service_manager_type;type oem_lock_service, system_api_service, system_server_service, service_manager_type;type otadexopt_service, system_server_service, service_manager_type;type overlay_service, system_api_service, system_server_service, service_manager_type;
diff --git a/system/sepolicy/prebuilts/api/32.0/private/service_contexts b/system/sepolicy/prebuilts/api/32.0/private/service_contexts
index 3fd342b9be..6275bea280 100644
--- a/system/sepolicy/prebuilts/api/32.0/private/service_contexts
+++ b/system/sepolicy/prebuilts/api/32.0/private/service_contexts
@@ -266,6 +266,7 @@ task                                      u:object_r:task_service:s0telecom                                   u:object_r:telecom_service:s0telephony.registry                        u:object_r:registry_service:s0telephony_ims                             u:object_r:radio_service:s0
+AemManager                                       u:object_r:AemManager_service:s0testharness                               u:object_r:testharness_service:s0tethering                                 u:object_r:tethering_service:s0textclassification                        u:object_r:textclassification_service:s0
diff --git a/system/sepolicy/prebuilts/api/32.0/public/service.te b/system/sepolicy/prebuilts/api/32.0/public/service.te
index ba7837d562..072b615fd9 100644
--- a/system/sepolicy/prebuilts/api/32.0/public/service.te
+++ b/system/sepolicy/prebuilts/api/32.0/public/service.te
@@ -158,6 +158,7 @@ type network_score_service, system_api_service, system_server_service, service_mtype network_stack_service, system_server_service, service_manager_type;type network_time_update_service, system_server_service, service_manager_type;type notification_service, app_api_service, ephemeral_app_api_service, system_server_service, service_manager_type;
+type AemManager_service, app_api_service, ephemeral_app_api_service, system_server_service, service_manager_type;type oem_lock_service, system_api_service, system_server_service, service_manager_type;type otadexopt_service, system_server_service, service_manager_type;type overlay_service, system_api_service, system_server_service, service_manager_type;
diff --git a/system/sepolicy/prebuilts/api/33.0/private/service_contexts b/system/sepolicy/prebuilts/api/33.0/private/service_contexts
index 72fa16629e..cd1951fa44 100644
--- a/system/sepolicy/prebuilts/api/33.0/private/service_contexts
+++ b/system/sepolicy/prebuilts/api/33.0/private/service_contexts
@@ -341,6 +341,7 @@ task                                      u:object_r:task_service:s0telecom                                   u:object_r:telecom_service:s0telephony.registry                        u:object_r:registry_service:s0telephony_ims                             u:object_r:radio_service:s0
+AemManager                                       u:object_r:AemManager_service:s0testharness                               u:object_r:testharness_service:s0tethering                                 u:object_r:tethering_service:s0textclassification                        u:object_r:textclassification_service:s0
diff --git a/system/sepolicy/prebuilts/api/33.0/public/service.te b/system/sepolicy/prebuilts/api/33.0/public/service.te
index e862b405fe..d213f7fbeb 100644
--- a/system/sepolicy/prebuilts/api/33.0/public/service.te
+++ b/system/sepolicy/prebuilts/api/33.0/public/service.te
@@ -171,6 +171,7 @@ type network_score_service, system_api_service, system_server_service, service_mtype network_stack_service, system_server_service, service_manager_type;type network_time_update_service, system_server_service, service_manager_type;type notification_service, app_api_service, ephemeral_app_api_service, system_server_service, service_manager_type;
+type AemManager_service, app_api_service, ephemeral_app_api_service, system_server_service, service_manager_type;type oem_lock_service, system_api_service, system_server_service, service_manager_type;type otadexopt_service, system_server_service, service_manager_type;type overlay_service, system_api_service, system_server_service, service_manager_type;
diff --git a/system/sepolicy/private/service_contexts b/system/sepolicy/private/service_contexts
index 72fa16629e..cd1951fa44 100644
--- a/system/sepolicy/private/service_contexts
+++ b/system/sepolicy/private/service_contexts
@@ -341,6 +341,7 @@ task                                      u:object_r:task_service:s0telecom                                   u:object_r:telecom_service:s0telephony.registry                        u:object_r:registry_service:s0telephony_ims                             u:object_r:radio_service:s0
+AemManager                                       u:object_r:AemManager_service:s0testharness                               u:object_r:testharness_service:s0tethering                                 u:object_r:tethering_service:s0textclassification                        u:object_r:textclassification_service:s0
diff --git a/system/sepolicy/public/service.te b/system/sepolicy/public/service.te
index e862b405fe..d213f7fbeb 100644
--- a/system/sepolicy/public/service.te
+++ b/system/sepolicy/public/service.te
@@ -171,6 +171,7 @@ type network_score_service, system_api_service, system_server_service, service_mtype network_stack_service, system_server_service, service_manager_type;type network_time_update_service, system_server_service, service_manager_type;type notification_service, app_api_service, ephemeral_app_api_service, system_server_service, service_manager_type;
+type AemManager_service, app_api_service, ephemeral_app_api_service, system_server_service, service_manager_type;type oem_lock_service, system_api_service, system_server_service, service_manager_type;type otadexopt_service, system_server_service, service_manager_type;type overlay_service, system_api_service, system_server_service, service_manager_type;

APP调用方法的时候,在工程下新建相同包名的文件夹及名称

包名:android.app

文件名:AemManager.java

文件内容:

package android.app;import androidx.annotation.Nullable;public class AemManager {public static AemManager getInstance() {throw new RuntimeException("API not supported!");}public String queryLmkWhiteList() {throw new RuntimeException("API not supported!");}public void clearLmkWhiteList() {throw new RuntimeException("API not supported!");}public void addLmkWhiteList(String json) {throw new RuntimeException("API not supported!");}public void delLmkWhiteList(String json) {throw new RuntimeException("API not supported!");}public void mockNotifyMessage(@Nullable String pkg, int id, Notification notification,int uid) {throw new RuntimeException("API not supported!");}
}

就可以在APP里面这样调用了

AemManager.getInstance().clearLmkWhiteList();

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.mzph.cn/news/892505.shtml

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

《系统爆破:MD5易破,后台登录可爆破?》

声明&#xff1a;笔记的只是方便各位师傅学习知识&#xff0c;以下代码、网站只涉及学习内容&#xff0c;其他的都与本人无关&#xff0c;切莫逾越法律红线&#xff0c;否则后果自负。 爆破Sales系统 一、爆破MD5 场景&#xff1a;已知MD5的加密字符串&#xff0c;如何得知明…

Copula算法原理和R语言股市收益率相依性可视化分析

阅读全文&#xff1a;http://tecdat.cn/?p6193 copula是将多变量分布函数与其边缘分布函数耦合的函数&#xff0c;通常称为边缘。在本视频中&#xff0c;我们通过可视化的方式直观地介绍了Copula函数&#xff0c;并通过R软件应用于金融时间序列数据来理解它&#xff08;点击文…

DSP+Simulink——点亮LED灯(TMSDSP28379D)超详细

实现功能&#xff1a;DSP28379D-LED灯闪烁 :matlab为2019a :环境建立见之前文章 Matlab2019a安装C2000 Processors超详细过程 matlab官网链接&#xff1a; Getting Started with Embedded Coder Support Package for Texas Instruments C2000 Processors Overview of Creat…

APP上架之Android 证书 MD5 指纹

Android 证书 MD5 指纹 1. 什么是 Android 证书 MD5 指纹&#xff1f; Android 证书 MD5 指纹是对证书数据进行 MD5 哈希运算后得到的 128 位字符串。在 Android 开发中&#xff0c;每个证书在理论上都有一个唯一的 MD5 指纹&#xff0c;用于识别和验证证书的有效性。证书指纹…

【Rust自学】11.6. 控制测试运行:并行和串行(连续执行)测试

喜欢的话别忘了点赞、收藏加关注哦&#xff0c;对接下来的教程有兴趣的可以关注专栏。谢谢喵&#xff01;(&#xff65;ω&#xff65;) 11.6.1. 控制测试的运行方式 cargo test和cargo run一样&#xff0c;cargo test也会编译代码并生成一个二进制文件用于测试&#xff0c;…

计算机网络学习笔记

第1课 绪论、传输介质 【知识点回顾】 两种导线可以减小电磁干扰&#xff1a; 双绞线&#xff08;分为非屏蔽双绞线、屏蔽双绞线&#xff09;&#xff08;RJ-45用&#xff09;同轴电缆&#xff08;短距离使用&#xff09;网络通信的基本单位&#xff1a;位&#xff08;bit&…

STM32之CAN通讯(十一)

STM32F407 系列文章 - CAN通讯&#xff08;十一&#xff09; 目录 前言 一、CAN 二、CAN驱动电路 三、CAN软件设计 1.CAN状态初始化 2.头文件相关定义 3.接收中断服务函数 4.用户层使用 1.用户层相关定义 2.发送数据 3.接收数据 1.查询方式处理 2.中断方式处理 3…

Java聊天小程序

拟设计一个基于 Java 技术的局域网在线聊天系统,实现客户端与服务器之间的实时通信。系统分为客户端和服务器端两类,客户端用于发送和接收消息,服务器端负责接收客户端请求并处理消息。客户端通过图形界面提供用户友好的操作界面,服务器端监听多个客户端的连接并管理消息通…

C#Halcon找线封装

利用CreateMetrologyModel封装找线工具时&#xff0c;在后期实际应用调试时容易把检测极性搞混乱&#xff0c;造成检测偏差&#xff0c;基于此&#xff0c;此Demo增加画线后检测极性的指引&#xff0c;首先看一下效果 加载测试图片 画线 确定后指引效果 找线效果 修改显示 UI代…

【linux系统之redis6】redis的基础命令使用及springboot连接redis

redis的基础命令很多&#xff0c;大部分我们都可以在官网上找到&#xff0c;真的用的时候可以去官网找&#xff0c;不用全部记住这些命令 redis通用的基础命令的使用 代码测试 string类型常见的命令 key值的结构&#xff0c;可以区分不同的需求不同的业务名字 hash类型 创建…

ISP各模块功能介绍

--------声明&#xff0c;本文为转载整理------- ISP各个模块功能介绍&#xff1a; 各模块前后效果对比&#xff1a; 黑电平补偿&#xff08;BLC&#xff09; 在理想情况下&#xff0c;没有光照射的像素点其响应值应为0。但是&#xff0c;由于杂质、受热等其它原因的影响&…

前缀和练习

【模版】前缀和 【模板】前缀和_牛客题霸_牛客网 思路 要想快速找出某一连续区间的和&#xff0c;我们就要使用前缀和算法。 其实本质是再创建一个dp数组&#xff0c;每进一次循环加上原数组的值&#xff08;dp代表arr的前n项和&#xff09;&#xff1a; vector<int>…

3. 【Vue实战--孢子记账--Web 版开发】--登录大模块

从这篇文章开始我们就进入到了孢子记账的前端开发&#xff0c;在本专栏中我默认大家的电脑上都已经配置好了开发环境。下面我们一起开始编写孢子记账的Web版吧。 一、功能 登录大模块功能包括注册、登录和找回密码功能&#xff0c;在本篇文章中我只会展示注册界面的实现&…

【2024年华为OD机试】 (A卷,100分)- 端口合并(Java JS PythonC/C++)

一、问题描述 题目描述 有 M 个端口组 (1 < M < 10)&#xff0c; 每个端口组是长度为 N 的整数数组 (1 < N < 100)&#xff0c; 如果端口组间存在 2 个及以上不同端口相同&#xff0c;则认为这 2 个端口组互相关联&#xff0c;可以合并。 输入描述 第一行输入端…

73.矩阵置零 python

矩阵置零 题目题目描述示例 1&#xff1a;示例 2&#xff1a;提示&#xff1a; 题解思路分析Python 实现代码代码解释提交结果 题目 题目描述 给定一个 m x n 的矩阵&#xff0c;如果一个元素为 0 &#xff0c;则将其所在行和列的所有元素都设为 0 。请使用 原地 算法。 示例…

基于华为ENSP的OSPF状态机、工作过程、配置保姆级别详解(2)

本篇技术博文摘要 &#x1f31f; 基于华为enspOSPF状态机、OSPF工作过程、.OSPF基本配置等保姆级别具体详解步骤&#xff1b;精典图示举例说明、注意点及常见报错问题所对应的解决方法 引言 &#x1f4d8; 在这个快速发展的技术时代&#xff0c;与时俱进是每个IT人的必修课。我…

SOLID原则学习,接口隔离原则

文章目录 1. 定义2. 为什么要遵循接口隔离原则&#xff1f;3. 违反接口隔离原则的例子4. 遵循接口隔离原则的改进5. 总结 1. 定义 接口隔离原则&#xff08;Interface Segregation Principle, ISP&#xff09; 接口隔离原则是面向对象设计中的五大原则&#xff08;SOLID&#…

Jenkins-持续集成、交付、构建、部署、测试

Jenkins-持续集成、交付、构建、部署、测试 一: Jenkins 介绍1> Jenkins 概念2> Jenkins 目的3> Jenkins 特性4> Jenkins 作用 二&#xff1a;Jenkins 版本三&#xff1a;DevOps流程简述1> 持续集成&#xff08;Continuous Integration&#xff0c;CI&#xff0…

从0到机器视觉工程师(六):配置OpenCV和Qt环境

CMake配置OpenCV CMakeLists.txt文件的编写 cmake_minimum_required(VERSION 3.20) project(test_opencv LANGUAGES CXX) #寻找Opencv库 FIND_PACKAGE(OpenCV REQUIRED) include_directories(test_opencv ${OpenCV_INCLUDE_DIRS}) add_executable(test_opencv main.cpp) TARGE…

CDA数据分析师一级经典错题知识点总结(3)

1、SEMMA 的基本思想是从样本数据开始&#xff0c;通过统计分析与可视化技术&#xff0c;发现并转换最有价值的预测变量&#xff0c;根据变量进行构建模型&#xff0c;并检验模型的可用性和准确性。【强调探索性】 2、CRISP-DM模型Cross Industry Standard Process of Data Mi…