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

Commit 82338600 authored by Jeff Sharkey's avatar Jeff Sharkey
Browse files

Define roles for Gallery and Music apps.

The new storage work in Q will extend capabilities to the default
Gallery and default Music apps, and we'll be implementing the
management of those default apps using the new roles feature.

This change starts by defining these roles using a relaxed definition
that only uses the existing CATEGORY_APP_* intent filters.

Bug: 119713234
Test: manual
Change-Id: I9bd32b57313cf712ce7441bcadef702dac866a3f
parent 8c33a548
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -7304,7 +7304,10 @@ package android.app.role {
    method public android.content.Intent createRequestRoleIntent(java.lang.String);
    method public boolean isRoleAvailable(java.lang.String);
    method public boolean isRoleHeld(java.lang.String);
    field public static final java.lang.String ROLE_BROWSER = "android.app.role.BROWSER";
    field public static final java.lang.String ROLE_DIALER = "android.app.role.DIALER";
    field public static final java.lang.String ROLE_GALLERY = "android.app.role.GALLERY";
    field public static final java.lang.String ROLE_MUSIC = "android.app.role.MUSIC";
    field public static final java.lang.String ROLE_SMS = "android.app.role.SMS";
  }
+23 −0
Original line number Diff line number Diff line
@@ -66,9 +66,32 @@ public final class RoleManager {

    /**
     * The name of the SMS role.
     *
     * @see Intent#CATEGORY_APP_MESSAGING
     */
    public static final String ROLE_SMS = "android.app.role.SMS";

    /**
     * The name of the browser role.
     *
     * @see Intent#CATEGORY_APP_BROWSER
     */
    public static final String ROLE_BROWSER = "android.app.role.BROWSER";

    /**
     * The name of the gallery role.
     *
     * @see Intent#CATEGORY_APP_GALLERY
     */
    public static final String ROLE_GALLERY = "android.app.role.GALLERY";

    /**
     * The name of the music player role.
     *
     * @see Intent#CATEGORY_APP_MUSIC
     */
    public static final String ROLE_MUSIC = "android.app.role.MUSIC";

    /**
     * The action used to request user approval of a role for an application.
     *