اعتبارًا من 27 آذار (مارس) 2025، ننصحك باستخدام android-latest-release بدلاً من aosp-main لإنشاء AOSP والمساهمة فيه. لمزيد من المعلومات، يُرجى الاطّلاع على التغييرات في AOSP.
تنظيم صفحاتك في مجموعات
يمكنك حفظ المحتوى وتصنيفه حسب إعداداتك المفضّلة.
تعمل وحدة ExtServices على تعديل مكوّنات إطار العمل لوظائف النظام الأساسية،
مثل ترتيب الإشعارات واستراتيجيات الملء التلقائي لمطابقة النصوص وذاكرة التخزين المؤقت
وخدمة مراقبة الحِزم وغيرها من الخدمات التي تعمل باستمرار. هذه الوحدة قابله
للتحديث، ما يعني أنّه يمكنها تلقّي تحديثات للوظائف خارج دورة إصدار
Android العادية.
في Android 12، يتم استخدام DisplayHashingService ل
إنشاء مثيل من DisplayHash للذاكرة المؤقتة المحدّدة. ويُستخدَم أيضًا
للتحقّق من أنّ النظام قد أنشأ تجزئة عرض معيّنة. عند
إنشاء تجزئة عرض، يمكن للمتصل تحديد خوارزميات التجزئة المتوافقة التي يريد استخدامها.
يتيح مكوّن الخدمة InlineSuggestionRenderService عرض "الاقتراحات المضمّنة"
في شريط اقتراحات لوحة المفاتيح. يتمّ استدعاء هذه الخدمة لعرض عنصر
View يحتوي على "الاقتراح المضمّن" لمسار "الملء التلقائي المضمّن" الجديد.
تُجري عملية التنفيذ التلقائية لخدمة عرض الإعلانات هذه مكالمة إلى
androidx.autofill.inline.Renderer
لعرض الاقتراح. يتم التحقّق من هذا السلوك من خلال اختبارات CTS في
/autofillservice/cts/inline/.
اسم الحزمة
يجب ضبط
config_servicesExtensionPackage (في
frameworks/base/core/res/res/values/config.xml) على اسم حزمة ExtServices (com.android.ext.services) على الأجهزة التي تعمل بنظام التشغيل Android 11. ويتم التحقّق من تغيير الإعدادات هذا من خلال
اختبار CTS
cts/tests/tests/os/src/android/os/cts/RequiredComponentsTest.java.
حدود الوحدة
في Android 12، تم نقل رمز وحدة ExtServices
من frameworks/base/apex/extservices
(وهو دليل فرعي من frameworks/base project)
وpackages/modules/ExtServices.
في ما يلي بنية المشروع الجديدة لـ packages/modules/ExtServices:
apex/ (ملفات من frameworks/base/apex/extservices)
java/ (ملفات من packages/modules/ExtServices/respackages/modules/ExtServices/src وpackages/modules/ExtServices/tests
وملفات للميزة الجديدة)
jni/ (ملفات للميزة الجديدة)
native/ (ملفات للميزة الجديدة)
تقع حدود وحدة ExtServices في packages/modules/ExtServices. ينقل نظام التشغيل Android
11 أيضًا العديد من فئات تنفيذ TextClassifier خارج frameworks/base/core/.
تنسيق الوحدة
في Android 11، تكون وحدة ExtServices
(com.android.ext.services) بتنسيق APEX. في Android 10، تكون هذه الوحدة بتنسيق APK.
التخصيص
في Android 11، يمكنك ضبط خدمة مخصّصة لتصنيف النصوص تُطلِب تصنيف النصوص التلقائي (لا يُنصح بذلك). في الإصدار
Android 10، لا توفّر وحدة ExtServices خيارات
التخصيص.
الاختبار
تتحقّق مجموعة أدوات اختبار التوافق مع Android (CTS) من وظائف ملف ExtServices.jar من خلال إجراء مجموعة شاملة من اختبارات CTS على كل إصدار من ملف ExtServices.jar. بالإضافة إلى ذلك، تحتوي "مجموعة اختبارات Mainline" (MTS) أيضًا على العديد من اختبارات
ExtServices. في ما يلي القائمة الكاملة لاختبارات ExtServices:
اقتراح مضمّن في الملء التلقائي تم إثبات ذلك من خلال اختبارات CTS في
cts/inline/.
يخضع كل من المحتوى وعيّنات التعليمات البرمجية في هذه الصفحة للتراخيص الموضحّة في ترخيص استخدام المحتوى. إنّ Java وOpenJDK هما علامتان تجاريتان مسجَّلتان لشركة Oracle و/أو الشركات التابعة لها.
تاريخ التعديل الأخير: 2025-07-27 (حسب التوقيت العالمي المتفَّق عليه)
[[["يسهُل فهم المحتوى.","easyToUnderstand","thumb-up"],["ساعَدني المحتوى في حلّ مشكلتي.","solvedMyProblem","thumb-up"],["غير ذلك","otherUp","thumb-up"]],[["لا يحتوي على المعلومات التي أحتاج إليها.","missingTheInformationINeed","thumb-down"],["الخطوات معقدة للغاية / كثيرة جدًا.","tooComplicatedTooManySteps","thumb-down"],["المحتوى قديم.","outOfDate","thumb-down"],["ثمة مشكلة في الترجمة.","translationIssue","thumb-down"],["مشكلة في العيّنات / التعليمات البرمجية","samplesCodeIssue","thumb-down"],["غير ذلك","otherDown","thumb-down"]],["تاريخ التعديل الأخير: 2025-07-27 (حسب التوقيت العالمي المتفَّق عليه)"],[],[],null,["# ExtServices\n\nThe ExtServices module updates framework components for core OS functionality,\nsuch as notification ranking, autofill text-matching strategies, storage cache,\npackage watchdog, and other services that run continually. This module is\nupdatable, meaning it can receive updates to functionality outside of the normal\nAndroid release cycle.\n\nService components\n------------------\n\nThe ExtServices module contains the following services.\n\n- [`DisplayHashingService`](https://android.googlesource.com/platform/frameworks/base/+/android16-release/core/java/android/service/displayhash/DisplayHashingService.java) starting in Android 12\n\n- [`TextClassifierService`](https://android.googlesource.com/platform/frameworks/base/+/android16-release/core/java/android/service/textclassifier/TextClassifierService.java) starting in Android 11\n\n- `InlineSuggestionsRenderService` starting in\n Android 11\n\n- [`AutofillFieldClassificationService`](https://android.googlesource.com/platform/frameworks/base/+/android16-release/core/java/android/service/autofill/AutofillFieldClassificationService.java) starting in\n Android 10\n\n- [`NotificationAssistantService`](https://android.googlesource.com/platform/frameworks/base/+/android16-release/core/java/android/service/notification/NotificationAssistantService.java) starting in\n Android 10\n\n- [`ResolverRankerService`](https://android.googlesource.com/platform/frameworks/base/+/android16-release/core/java/android/service/resolver/ResolverRankerService.java) starting in\n Android 10\n\n- [`CacheQuotaService`](https://android.googlesource.com/platform/frameworks/base/+/android16-release/core/java/android/app/usage/CacheQuotaService.java)\n starting in Android 10\n\n### DisplayHashingService\n\nIn Android 12, `DisplayHashingService` is used to\ngenerate an instance of `DisplayHash` for the specified buffer. It's also used\nto verify that a specific display hash was generated by the system. When\ngenerating a display hash, the caller can specify which of the supported\nhashing algorithms it wishes to use.\n\n### TextClassifierService\n\nThe\n[`TextClassifierService`](/docs/core/display/textclassifier)\nservice component backs [`TextClassifier`\nAPIs](https://developer.android.com/reference/android/view/textclassifier/package-summary)\nand Android features such as smart text selection and smart suggestions in\nnotifications. The ExtServices module contains the default text classifier,\nwhich is verified by the CTS test\n[`TextClassifierPolicyTest.java`](https://android.googlesource.com/platform/cts/).\n\nIf needed, you can configure a custom text classifier service by specifying\n`config_defaultTextClassifierPackage` in\n[`config.xml`](https://android.googlesource.com/platform/frameworks/base/+/android16-release/core/res/res/values/config.xml).\nCustom text classifiers can depend on the default text classifier by calling\n[`TextClassifierService.getDefaultTextClassifierImplementation(Context)`](https://android.googlesource.com/platform/frameworks/base/+/android16-release/core/java/android/service/textclassifier/TextClassifierService.java)\nto get an instance of it.\n| **Note:** We recommend that devices use the default text classifier and don't specify `config_defaultTextClassifierPackage`.\n\n### InlineSuggestionRenderService\n\nThe `InlineSuggestionRenderService` service component enables Inline Suggestions\nto be shown in the keyboard suggestion strip. This service is called to render a\n`View` object holding the Inline Suggestion for the new Inline Autofill flow.\nThe default implementation for this renderer service calls into\n[`androidx.autofill.inline.Renderer`](https://android.googlesource.com/platform/frameworks/support/+/refs/heads/androidx-master-dev/autofill/autofill/src/main/java/androidx/autofill/inline/Renderer.java)\nto render the suggestion. This behavior is verified by CTS tests in\n[`/autofillservice/cts/inline/`](https://android.googlesource.com/platform/cts/+/refs/tags/android-r-preview-3/tests/autofillservice/).\n\nPackage name\n------------\n\nDevices running Android 11 must set\n`config_servicesExtensionPackage` (in\n`frameworks/base/core/res/res/values/config.xml`) to the ExtServices package\nname (`com.android.ext.services`). This configuration change is verified by the\nCTS test\n[`cts/tests/tests/os/src/android/os/cts/RequiredComponentsTest.java`](https://android.googlesource.com/platform/cts/).\n| **Note:** The Android 11 version of the ExtServices module already contains this configuration change.\n\nModule boundary\n---------------\n\nIn Android 12, the ExtServices\nmodule code is moved from `frameworks/base/apex/extservices`\n(this is a subdirectory of the `frameworks/base project`)\nand\n`packages/modules/ExtServices`.\n\nThe new project structure for `packages/modules/ExtServices` is as follows:\n\n- `apex/` (files from `frameworks/base/apex/extservices`)\n- `java/` (files from `packages/modules/ExtServices/res`, `packages/modules/ExtServices/src`, `packages/modules/ExtServices/tests`, and files for new feature)\n- `jni/` (files for new feature)\n- `native/` (files for new feature)\n\nThe ExtServices module boundary is in `packages/modules/ExtServices`. Android\n11 also moves several `TextClassifier` implementation\nclasses out of `frameworks/base/core/`.\n\nModule format\n-------------\n\nIn Android 11, the ExtServices module\n(`com.android.ext.services`) is in [APEX](/docs/core/ota/apex)\nformat. In Android 10, this module is in APK format.\n\nCustomization\n-------------\n\nIn Android 11, you can configure a custom text\nclassifier service that calls the [default text\nclassifier](#textclassifierservice) (however, this isn't recommended). In\nAndroid 10, the ExtServices module doesn't provide\ncustomization options.\n\nTesting\n-------\n\nThe Android Compatibility Test Suite (CTS) verifies ExtServices module\nfunctionality by running a comprehensive set of CTS tests on every module\nrelease. In addition, the Mainline Test Suite (MTS) also contains several\nExtServices tests. The full list of ExtServices tests is as follows:\n\n- Config changes. Verified by the CTS test\n [`cts/tests/tests/os/src/android/os/cts/RequiredComponentsTest.java`](https://android.googlesource.com/platform/cts/).\n\n- `TextClassifier` config. Verified by CTS test\n [`cts/TextClassifierPolicyTest.java`](https://android.googlesource.com/platform/cts/).\n\n- Autofill inline suggestion. Verified by CTS tests in\n [`cts/inline/`](https://android.googlesource.com/platform/cts/+/refs/tags/android-r-preview-3/tests/autofillservice/)."]]