[[["わかりやすい","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-03-26 UTC。"],[],[],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/)."]]