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

Commit bb35a7cc authored by Menghan Li's avatar Menghan Li Committed by Android (Google) Code Review
Browse files

Merge "Refine A11y Tile Service javadoc" into tm-dev

parents 50527019 92a75579
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -3248,7 +3248,7 @@ package android.accessibilityservice {
    method public int getNonInteractiveUiTimeoutMillis();
    method public android.content.pm.ResolveInfo getResolveInfo();
    method public String getSettingsActivityName();
    method @Nullable public String getTileServiceClassName();
    method @Nullable public String getTileServiceName();
    method public boolean isAccessibilityTool();
    method public String loadDescription(android.content.pm.PackageManager);
    method @Nullable public CharSequence loadIntro(@NonNull android.content.pm.PackageManager);
+12 −10
Original line number Diff line number Diff line
@@ -83,11 +83,13 @@ import java.util.List;
 * @attr ref android.R.styleable#AccessibilityService_canRequestFilterKeyEvents
 * @attr ref android.R.styleable#AccessibilityService_canRequestTouchExplorationMode
 * @attr ref android.R.styleable#AccessibilityService_canRetrieveWindowContent
 * @attr ref android.R.styleable#AccessibilityService_intro
 * @attr ref android.R.styleable#AccessibilityService_description
 * @attr ref android.R.styleable#AccessibilityService_summary
 * @attr ref android.R.styleable#AccessibilityService_notificationTimeout
 * @attr ref android.R.styleable#AccessibilityService_packageNames
 * @attr ref android.R.styleable#AccessibilityService_settingsActivity
 * @attr ref android.R.styleable#AccessibilityService_tileService
 * @attr ref android.R.styleable#AccessibilityService_nonInteractiveUiTimeout
 * @attr ref android.R.styleable#AccessibilityService_interactiveUiTimeout
 * @attr ref android.R.styleable#AccessibilityService_canTakeScreenshot
@@ -547,11 +549,11 @@ public class AccessibilityServiceInfo implements Parcelable {
    private String mSettingsActivityName;

    /**
     * The class name of {@link android.service.quicksettings.TileService} is associated with this
     * The name of {@link android.service.quicksettings.TileService} is associated with this
     * accessibility service for one to one mapping. It is used by system settings to remind users
     * this accessibility service has a {@link android.service.quicksettings.TileService}.
     */
    private String mTileServiceClassName;
    private String mTileServiceName;

    /**
     * Bit mask with capabilities of this service.
@@ -740,7 +742,7 @@ public class AccessibilityServiceInfo implements Parcelable {
            }
            mIsAccessibilityTool = asAttributes.getBoolean(
                    R.styleable.AccessibilityService_isAccessibilityTool, false);
            mTileServiceClassName = asAttributes.getString(
            mTileServiceName = asAttributes.getString(
                    com.android.internal.R.styleable.AccessibilityService_tileService);
            peekedValue = asAttributes.peekValue(
                    com.android.internal.R.styleable.AccessibilityService_intro);
@@ -850,14 +852,14 @@ public class AccessibilityServiceInfo implements Parcelable {
    }

    /**
     * Gets the class name of {@link android.service.quicksettings.TileService} is associated with
     * Gets the name of {@link android.service.quicksettings.TileService} is associated with
     * this accessibility service.
     *
     * @return The class names of {@link android.service.quicksettings.TileService}.
     * @return The name of {@link android.service.quicksettings.TileService}.
     */
    @Nullable
    public String getTileServiceClassName() {
        return mTileServiceClassName;
    public String getTileServiceName() {
        return mTileServiceName;
    }

    /**
@@ -1146,7 +1148,7 @@ public class AccessibilityServiceInfo implements Parcelable {
        parcel.writeInt(mHtmlDescriptionRes);
        parcel.writeString(mNonLocalizedDescription);
        parcel.writeBoolean(mIsAccessibilityTool);
        parcel.writeString(mTileServiceClassName);
        parcel.writeString(mTileServiceName);
        parcel.writeInt(mIntroResId);
    }

@@ -1170,7 +1172,7 @@ public class AccessibilityServiceInfo implements Parcelable {
        mHtmlDescriptionRes = parcel.readInt();
        mNonLocalizedDescription = parcel.readString();
        mIsAccessibilityTool = parcel.readBoolean();
        mTileServiceClassName = parcel.readString();
        mTileServiceName = parcel.readString();
        mIntroResId = parcel.readInt();
    }

@@ -1224,7 +1226,7 @@ public class AccessibilityServiceInfo implements Parcelable {
        stringBuilder.append(", ");
        stringBuilder.append("settingsActivityName: ").append(mSettingsActivityName);
        stringBuilder.append(", ");
        stringBuilder.append("tileServiceClassName: ").append(mTileServiceClassName);
        stringBuilder.append("tileServiceName: ").append(mTileServiceName);
        stringBuilder.append(", ");
        stringBuilder.append("summary: ").append(mNonLocalizedSummary);
        stringBuilder.append(", ");
+7 −7
Original line number Diff line number Diff line
@@ -101,11 +101,11 @@ public final class AccessibilityShortcutInfo {
    private String mSettingsActivityName;

    /**
     * The class name of {@link android.service.quicksettings.TileService} is associated with this
     * The name of {@link android.service.quicksettings.TileService} is associated with this
     * accessibility shortcut target for one to one mapping. It is used by system settings to remind
     * users this accessibility service has a {@link android.service.quicksettings.TileService}.
     */
    private String mTileServiceClassName;
    private String mTileServiceName;

    /**
     * Creates a new instance.
@@ -163,7 +163,7 @@ public final class AccessibilityShortcutInfo {
            mSettingsActivityName = asAttributes.getString(
                    com.android.internal.R.styleable.AccessibilityShortcutTarget_settingsActivity);
            // Get tile service class name
            mTileServiceClassName = asAttributes.getString(
            mTileServiceName = asAttributes.getString(
                    com.android.internal.R.styleable.AccessibilityShortcutTarget_tileService);
            // Gets intro
            mIntroResId = asAttributes.getResourceId(
@@ -287,14 +287,14 @@ public final class AccessibilityShortcutInfo {
    }

    /**
     * Gets the class name of {@link android.service.quicksettings.TileService} is associated with
     * Gets the name of {@link android.service.quicksettings.TileService} is associated with
     * this accessibility shortcut target.
     *
     * @return The class names of {@link android.service.quicksettings.TileService}.
     * @return The class name of {@link android.service.quicksettings.TileService}.
     */
    @Nullable
    public String getTileServiceClassName() {
        return mTileServiceClassName;
    public String getTileServiceName() {
        return mTileServiceName;
    }

    /**
+10 −10
Original line number Diff line number Diff line
@@ -3932,12 +3932,12 @@
            <!-- Has flag {@link android.accessibilityservice.AccessibilityServiceInfo#FLAG_INPUT_METHOD_EDITOR}. -->
            <flag name="flagInputMethodEditor" value="0x0008000" />
        </attr>
        <!-- Component name of an activity that allows the user to modify
             the settings for this service. This setting cannot be changed at runtime. -->
        <!-- Fully qualified class name of an activity that allows the user to modify the settings
             for this service. This setting cannot be changed at runtime. -->
        <attr name="settingsActivity" />
        <!-- Component name of {@link android.service.quicksettings.TileService} is associated
             with this accessibility service for one to one mapping. It is used by system settings
             to remind users this accessibility service has a
        <!-- Fully qualified class name of {@link android.service.quicksettings.TileService} is
             associated with this accessibility service for one to one mapping. It is used by system
             settings to remind users this accessibility service has a
             {@link android.service.quicksettings.TileService}. -->
        <attr name="tileService" format="string" />
        <!-- Attribute whether the accessibility service wants to be able to retrieve the
@@ -4026,12 +4026,12 @@
        <!-- Html description of the target of accessibility shortcut usage, availability, or
             limitations (e.g. isn't supported by all apps). -->
        <attr name="htmlDescription" format="reference"/>
        <!-- Component name of an activity that allows the user to modify the settings for this
             target of accessibility shortcut. -->
        <!-- Fully qualified class name of an activity that allows the user to modify the settings
             for this target of accessibility shortcut. -->
        <attr name="settingsActivity" />
        <!-- Component name of {@link android.service.quicksettings.TileService} is associated
             with this accessibility shortcut target for one to one mapping. It is used by system
             settings to remind users this accessibility service has a
        <!-- Fully qualified class name of {@link android.service.quicksettings.TileService} is
             associated with this accessibility shortcut target for one to one mapping. It is used
             by system settings to remind users this accessibility service has a
             {@link android.service.quicksettings.TileService}. -->
        <attr name="tileService" format="string" />
        <!-- Detailed intro of the target of accessibility shortcut purpose or behavior. -->
+1 −1
Original line number Diff line number Diff line
@@ -129,7 +129,7 @@ public class AccessibilityShortcutInfoTest {
    @Test
    public void testTileService() {
        assertThat("Tile service is not correct",
                mShortcutInfo.getTileServiceClassName(), is(TILE_SERVICE_NAME));
                mShortcutInfo.getTileServiceName(), is(TILE_SERVICE_NAME));
    }