Merge "Remove temporary deprecated methods ContentSuggestionsService." into qt-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
ae5afab030
@@ -6401,14 +6401,10 @@ package android.service.contentsuggestions {
|
|||||||
|
|
||||||
public abstract class ContentSuggestionsService extends android.app.Service {
|
public abstract class ContentSuggestionsService extends android.app.Service {
|
||||||
ctor public ContentSuggestionsService();
|
ctor public ContentSuggestionsService();
|
||||||
method @Deprecated public void classifyContentSelections(@NonNull android.app.contentsuggestions.ClassificationsRequest, @NonNull android.app.contentsuggestions.ContentSuggestionsManager.ClassificationsCallback);
|
method public abstract void onClassifyContentSelections(@NonNull android.app.contentsuggestions.ClassificationsRequest, @NonNull android.app.contentsuggestions.ContentSuggestionsManager.ClassificationsCallback);
|
||||||
method @Deprecated public void notifyInteraction(@NonNull String, @NonNull android.os.Bundle);
|
method public abstract void onNotifyInteraction(@NonNull String, @NonNull android.os.Bundle);
|
||||||
method public void onClassifyContentSelections(@NonNull android.app.contentsuggestions.ClassificationsRequest, @NonNull android.app.contentsuggestions.ContentSuggestionsManager.ClassificationsCallback);
|
method public abstract void onProcessContextImage(int, @Nullable android.graphics.Bitmap, @NonNull android.os.Bundle);
|
||||||
method public void onNotifyInteraction(@NonNull String, @NonNull android.os.Bundle);
|
method public abstract void onSuggestContentSelections(@NonNull android.app.contentsuggestions.SelectionsRequest, @NonNull android.app.contentsuggestions.ContentSuggestionsManager.SelectionsCallback);
|
||||||
method public void onProcessContextImage(int, @Nullable android.graphics.Bitmap, @NonNull android.os.Bundle);
|
|
||||||
method public void onSuggestContentSelections(@NonNull android.app.contentsuggestions.SelectionsRequest, @NonNull android.app.contentsuggestions.ContentSuggestionsManager.SelectionsCallback);
|
|
||||||
method @Deprecated public void processContextImage(int, @Nullable android.graphics.Bitmap, @NonNull android.os.Bundle);
|
|
||||||
method @Deprecated public void suggestContentSelections(@NonNull android.app.contentsuggestions.SelectionsRequest, @NonNull android.app.contentsuggestions.ContentSuggestionsManager.SelectionsCallback);
|
|
||||||
field public static final String SERVICE_INTERFACE = "android.service.contentsuggestions.ContentSuggestionsService";
|
field public static final String SERVICE_INTERFACE = "android.service.contentsuggestions.ContentSuggestionsService";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -127,41 +127,29 @@ public abstract class ContentSuggestionsService extends Service {
|
|||||||
* Called by the system to provide the snapshot for the task associated with the given
|
* Called by the system to provide the snapshot for the task associated with the given
|
||||||
* {@param taskId}.
|
* {@param taskId}.
|
||||||
*/
|
*/
|
||||||
public void onProcessContextImage(
|
public abstract void onProcessContextImage(
|
||||||
int taskId, @Nullable Bitmap contextImage, @NonNull Bundle extras) {
|
int taskId, @Nullable Bitmap contextImage, @NonNull Bundle extras);
|
||||||
// TODO(b/127532182): remove after next prebuilt drop.
|
|
||||||
processContextImage(taskId, contextImage, extras);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Content selections have been request through {@link ContentSuggestionsManager}, implementer
|
* Content selections have been request through {@link ContentSuggestionsManager}, implementer
|
||||||
* should reply on the callback with selections.
|
* should reply on the callback with selections.
|
||||||
*/
|
*/
|
||||||
public void onSuggestContentSelections(@NonNull SelectionsRequest request,
|
public abstract void onSuggestContentSelections(@NonNull SelectionsRequest request,
|
||||||
@NonNull ContentSuggestionsManager.SelectionsCallback callback) {
|
@NonNull ContentSuggestionsManager.SelectionsCallback callback);
|
||||||
// TODO(b/127532182): remove after next prebuilt drop.
|
|
||||||
suggestContentSelections(request, callback);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Content classifications have been request through {@link ContentSuggestionsManager},
|
* Content classifications have been request through {@link ContentSuggestionsManager},
|
||||||
* implementer should reply on the callback with classifications.
|
* implementer should reply on the callback with classifications.
|
||||||
*/
|
*/
|
||||||
public void onClassifyContentSelections(@NonNull ClassificationsRequest request,
|
public abstract void onClassifyContentSelections(@NonNull ClassificationsRequest request,
|
||||||
@NonNull ContentSuggestionsManager.ClassificationsCallback callback) {
|
@NonNull ContentSuggestionsManager.ClassificationsCallback callback);
|
||||||
// TODO(b/127532182): remove after next prebuilt drop.
|
|
||||||
classifyContentSelections(request, callback);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* User interactions have been reported through {@link ContentSuggestionsManager}, implementer
|
* User interactions have been reported through {@link ContentSuggestionsManager}, implementer
|
||||||
* should handle those interactions.
|
* should handle those interactions.
|
||||||
*/
|
*/
|
||||||
public void onNotifyInteraction(
|
public abstract void onNotifyInteraction(
|
||||||
@NonNull String requestId, @NonNull Bundle interaction) {
|
@NonNull String requestId, @NonNull Bundle interaction);
|
||||||
// TODO(b/127532182): remove after next prebuilt drop.
|
|
||||||
notifyInteraction(requestId, interaction);
|
|
||||||
}
|
|
||||||
|
|
||||||
private ContentSuggestionsManager.SelectionsCallback wrapSelectionsCallback(
|
private ContentSuggestionsManager.SelectionsCallback wrapSelectionsCallback(
|
||||||
ISelectionsCallback callback) {
|
ISelectionsCallback callback) {
|
||||||
@@ -184,42 +172,4 @@ public abstract class ContentSuggestionsService extends Service {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* For temporary compat reason, remove with b/127532182
|
|
||||||
* @deprecated use {@link #onProcessContextImage(int, Bitmap, Bundle)} instead.
|
|
||||||
*/
|
|
||||||
@Deprecated
|
|
||||||
public void processContextImage(
|
|
||||||
int taskId, @Nullable Bitmap contextImage, @NonNull Bundle extras) {
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* For temporary compat reason, remove with b/127532182
|
|
||||||
* @deprecated use {@link #onSuggestContentSelections(SelectionsRequest,
|
|
||||||
* ContentSuggestionsManager.SelectionsCallback)} instead.
|
|
||||||
*/
|
|
||||||
@Deprecated
|
|
||||||
public void suggestContentSelections(@NonNull SelectionsRequest request,
|
|
||||||
@NonNull ContentSuggestionsManager.SelectionsCallback callback) {
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* For temporary compat reason, remove with b/127532182
|
|
||||||
* @deprecated use {@link #onClassifyContentSelections(ClassificationsRequest,
|
|
||||||
* ContentSuggestionsManager.ClassificationsCallback)} instead.
|
|
||||||
*/
|
|
||||||
@Deprecated
|
|
||||||
public void classifyContentSelections(@NonNull ClassificationsRequest request,
|
|
||||||
@NonNull ContentSuggestionsManager.ClassificationsCallback callback) {
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* For temporary compat reason, remove with b/127532182
|
|
||||||
* @deprecated use {@link #onNotifyInteraction(String, Bundle)} instead.
|
|
||||||
*/
|
|
||||||
@Deprecated
|
|
||||||
public void notifyInteraction(@NonNull String requestId, @NonNull Bundle interaction) {
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user