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

Commit fd2bb91c authored by Ajinkya Chalke's avatar Ajinkya Chalke
Browse files

Update App Clips API documentation to include Backlinks.

- Backlinks is the contextual information that is returned via ClipData.
- Apps can provide this contextual data by integrating with
  AssistContent.
- When screenshot is captured, SystemUI queries the apps whose
  screenshot is taken for AssistContent and returns this via ClipData.
- Also updated the doc to mention checking
  EXTRA_CAPTURE_CONTENT_FOR_NOTE_STATUS_CODE, this way the Intent API
  constants are better connected.

Test: N/A
Flag: EXEMPT documentation update
Bug: 300307759
Change-Id: Ieb4eacbaa097da68374b235980537809623b38a1
parent 3b6167a6
Loading
Loading
Loading
Loading
+16 −0
Original line number Diff line number Diff line
@@ -5277,12 +5277,28 @@ public class Intent implements Parcelable, Cloneable {
     * through {@link #getData()}. User interaction is required to return the edited screenshot to
     * the calling activity.
     *
     * <p>The response {@link Intent} may include additional data to "backlink" directly back to the
     * application for which the screenshot was captured. If present, the application "backlink" can
     * be retrieved via {@link #getClipData()}. The data is present only if the user accepted to
     * include the link information with the screenshot. The data can contain one of the following:
     * <ul>
     *     <li>A deeplinking {@link Uri} or an {@link Intent} if the captured app integrates with
     *         {@link android.app.assist.AssistContent}.</li>
     *     <li>Otherwise, a main launcher intent that launches the screenshotted application to
     *         its home screen.</li>
     * </ul>
     * The "backlink" to the screenshotted application will be set within {@link ClipData}, either
     * as a {@link Uri} or an {@link Intent} if present.
     *
     * <p>This intent action requires the permission
     * {@link android.Manifest.permission#LAUNCH_CAPTURE_CONTENT_ACTIVITY_FOR_NOTE}.
     *
     * <p>Callers should query
     * {@link StatusBarManager#canLaunchCaptureContentActivityForNote(Activity)} before showing a UI
     * element that allows users to trigger this flow.
     *
     * <p>Callers should query for {@link #EXTRA_CAPTURE_CONTENT_FOR_NOTE_STATUS_CODE} in the
     * response {@link Intent} to check if the request was a success.
     */
    @RequiresPermission(Manifest.permission.LAUNCH_CAPTURE_CONTENT_ACTIVITY_FOR_NOTE)
    @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION)