از 27 مارس 2025، توصیه می کنیم از android-latest-release به جای aosp-main برای ساختن و کمک به AOSP استفاده کنید. برای اطلاعات بیشتر، به تغییرات AOSP مراجعه کنید.
با مجموعهها، منظم بمانید
ذخیره و طبقهبندی محتوا براساس اولویتهای شما.
ماژول ExtServices اجزای چارچوب را برای عملکرد اصلی سیستم عامل، مانند رتبهبندی اعلانها، استراتژیهای تطبیق متن تکمیل خودکار، حافظه پنهان ذخیرهسازی، نگهبان بسته و سایر خدماتی که بهطور مداوم اجرا میشوند، بهروزرسانی میکند. این ماژول قابل بهروزرسانی است، به این معنی که میتواند بهروزرسانیهای عملکرد را خارج از چرخه انتشار عادی اندروید دریافت کند.
در اندروید 12، DisplayHashingService برای تولید نمونه ای از DisplayHash برای بافر مشخص شده استفاده می شود. همچنین برای تأیید اینکه یک هش نمایش خاص توسط سیستم ایجاد شده است استفاده می شود. هنگام ایجاد هش نمایشگر، تماسگیرنده میتواند مشخص کند که میخواهد از کدام یک از الگوریتمهای هش پشتیبانی شده استفاده کند.
در صورت نیاز، میتوانید یک سرویس طبقهبندی متن سفارشی را با تعیین config_defaultTextClassifierPackage در config.xml پیکربندی کنید. طبقهبندیکنندههای متن سفارشی میتوانند با فراخوانی TextClassifierService.getDefaultTextClassifierImplementation(Context) به طبقهبندیکننده متن پیشفرض وابسته باشند تا نمونهای از آن را دریافت کنند.
InlineSuggestionRenderService
مؤلفه سرویس InlineSuggestionRenderService پیشنهادات درون خطی را قادر می سازد تا در نوار پیشنهادات صفحه کلید نشان داده شوند. این سرویس برای ارائه یک شی View فراخوانی می شود که پیشنهاد Inline را برای جریان تکمیل خودکار درون خطی جدید نگه می دارد. پیادهسازی پیشفرض برای این سرویس رندر androidx.autofill.inline.Renderer را فراخوانی میکند تا پیشنهاد را ارائه کند. این رفتار توسط تستهای CTS در /autofillservice/cts/inline/ تأیید میشود.
نام بسته
دستگاههای دارای Android 11 باید config_servicesExtensionPackage (در frameworks/base/core/res/res/values/config.xml ) را روی نام بسته ExtServices تنظیم کنند ( com.android.ext.services ). این تغییر پیکربندی توسط تست CTS cts/tests/tests/os/src/android/os/cts/RequiredComponentsTest.java تأیید میشود.
مرز ماژول
در اندروید 12، کد ماژول ExtServices از frameworks/base/apex/extservices (این زیر شاخه frameworks/base project است) و packages/modules/ExtServices منتقل می شود.
ساختار پروژه جدید برای packages/modules/ExtServices به شرح زیر است:
apex/ (فایل ها از frameworks/base/apex/extservices )
java/ (فایلها از packages/modules/ExtServices/res ، packages/modules/ExtServices/src ، packages/modules/ExtServices/tests و فایلهای مربوط به ویژگی جدید)
jni/ (فایل های ویژگی جدید)
native/ (فایل برای ویژگی جدید)
مرز ماژول ExtServices در packages/modules/ExtServices است. اندروید 11 همچنین چندین کلاس پیاده سازی TextClassifier از frameworks/base/core/ خارج می کند.
فرمت ماژول
در اندروید 11، ماژول ExtServices ( com.android.ext.services ) با فرمت APEX است. در اندروید 10 این ماژول با فرمت APK است.
سفارشی سازی
در اندروید 11، میتوانید یک سرویس طبقهبندی متن سفارشی را پیکربندی کنید که طبقهبندیکننده متن پیشفرض را فراخوانی میکند (اما این توصیه نمیشود). در اندروید 10، ماژول ExtServices گزینه های سفارشی سازی را ارائه نمی دهد.
تست کردن
مجموعه تست سازگاری اندروید (CTS) عملکرد ماژول ExtServices را با اجرای مجموعه ای جامع از تست های CTS در هر نسخه ماژول تأیید می کند. علاوه بر این، مجموعه تست اصلی (MTS) همچنین شامل چندین تست ExtServices است. لیست کامل تست های ExtServices به شرح زیر است:
تکمیل خودکار پیشنهاد درون خطی. تایید شده توسط تست های CTS در cts/inline/ .
محتوا و نمونه کدها در این صفحه مشمول پروانههای توصیفشده در پروانه محتوا هستند. جاوا و OpenJDK علامتهای تجاری یا علامتهای تجاری ثبتشده Oracle و/یا وابستههای آن هستند.
تاریخ آخرین بهروزرسانی 2025-07-29 بهوقت ساعت هماهنگ جهانی.
[[["درک آسان","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-29 بهوقت ساعت هماهنگ جهانی."],[],[],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/)."]]