Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 4bb46774 authored by Steven Ng's avatar Steven Ng
Browse files

Add an extra in AssistContent for providing contextual app functions data.

Flag: android.app.appfunctions.flags.enable_app_function_manager
Test: Build successfully. No need test added because this changes introduces a string constant
Bug: 376858408
Change-Id: Ideb9258d522de47cb8ff2c77bc25279c235dec4f
parent 2f8329c7
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -8880,6 +8880,7 @@ package android.app.assist {
    method public void setWebUri(android.net.Uri);
    method public void writeToParcel(android.os.Parcel, int);
    field @NonNull public static final android.os.Parcelable.Creator<android.app.assist.AssistContent> CREATOR;
    field @FlaggedApi("android.app.appfunctions.flags.enable_app_function_manager") public static final String EXTRA_APP_FUNCTION_DATA = "android.app.assist.extra.APP_FUNCTION_DATA";
  }
  public class AssistStructure implements android.os.Parcelable {
+15 −0
Original line number Diff line number Diff line
package android.app.assist;

import android.annotation.FlaggedApi;
import android.compat.annotation.UnsupportedAppUsage;
import android.content.ClipData;
import android.content.Intent;
@@ -15,6 +16,20 @@ import android.os.Parcelable;
 * {@link android.app.Activity#onProvideAssistContent Activity.onProvideAssistContent}.
 */
public class AssistContent implements Parcelable {
    /**
     * Extra for a {@link Bundle} that provides contextual AppFunction's information about the
     * content currently being viewed in the application.
     * <p>
     * This extra can be optionally supplied in the {@link AssistContent#getExtras()} bundle.
     * <p>
     * The schema of the {@link Bundle} in this extra is defined in the AppFunction SDK.
     *
     * @see android.app.appfunctions.AppFunctionManager
     */
    @FlaggedApi(android.app.appfunctions.flags.Flags.FLAG_ENABLE_APP_FUNCTION_MANAGER)
    public static final String EXTRA_APP_FUNCTION_DATA =
            "android.app.assist.extra.APP_FUNCTION_DATA";

    @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.P, trackingBug = 115609023)
    private boolean mIsAppProvidedIntent = false;
    private boolean mIsAppProvidedWebUri = false;