Package org.mozilla.geckoview
Class AIFeaturesController.RuntimeAIFeatures
Object
org.mozilla.geckoview.AIFeaturesController.RuntimeAIFeatures
- Enclosing class:
- AIFeaturesController
Coordinates runtime messaging between GeckoView and AI features that are not dependent on a
specific browsing session.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns a map of all known AI features and basic information keyed by feature ID.static GeckoResult<Void>makeFeatureAvailable(String featureId) Makes the given AI feature available (resets to default state).static GeckoResult<Void>setFeatureEnablement(String featureId, boolean enabled) Enables or blocks the given AI feature.
-
Constructor Details
-
RuntimeAIFeatures
public RuntimeAIFeatures()
-
-
Method Details
-
listFeatures
@HandlerThread @NonNull public static GeckoResult<Map<String,AIFeaturesController.AIFeature>> listFeatures()Returns a map of all known AI features and basic information keyed by feature ID.- Returns:
- A GeckoResult resolving to a map of feature ID to
AIFeaturesController.AIFeatureor aAIFeaturesController.AIFeaturesException.
-
setFeatureEnablement
@HandlerThread @NonNull public static GeckoResult<Void> setFeatureEnablement(@NonNull String featureId, boolean enabled) Enables or blocks the given AI feature.- Parameters:
featureId- The identifier of the AI feature to configure.enabled- True to enable the feature, false to block it.- Returns:
- A GeckoResult that resolves on success or rejects with an error.
-
makeFeatureAvailable
@HandlerThread @NonNull public static GeckoResult<Void> makeFeatureAvailable(@NonNull String featureId) Makes the given AI feature available (resets to default state).- Parameters:
featureId- the identifier of the AI feature to make available- Returns:
- a GeckoResult that resolves on success or rejects with an error
-