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

Commit c0570cf0 authored by PETER LIANG's avatar PETER LIANG Committed by Android (Google) Code Review
Browse files

Merge "Change the attribute format of htmlDescription."

parents 443b3e99 515b989f
Loading
Loading
Loading
Loading
+1 −12
Original line number Original line Diff line number Diff line
@@ -550,11 +550,6 @@ public class AccessibilityServiceInfo implements Parcelable {
     */
     */
    private int mHtmlDescriptionRes;
    private int mHtmlDescriptionRes;


    /**
     * Non localized html description of the accessibility service.
     */
    private String mNonLocalizedHtmlDescription;

    /**
    /**
     * Creates a new instance.
     * Creates a new instance.
     */
     */
@@ -683,10 +678,6 @@ public class AccessibilityServiceInfo implements Parcelable {
                    com.android.internal.R.styleable.AccessibilityService_htmlDescription);
                    com.android.internal.R.styleable.AccessibilityService_htmlDescription);
            if (peekedValue != null) {
            if (peekedValue != null) {
                mHtmlDescriptionRes = peekedValue.resourceId;
                mHtmlDescriptionRes = peekedValue.resourceId;
                final CharSequence nonLocalizedHtmlDescription = peekedValue.coerceToString();
                if (nonLocalizedHtmlDescription != null) {
                    mNonLocalizedHtmlDescription = nonLocalizedHtmlDescription.toString().trim();
                }
            }
            }
            asAttributes.recycle();
            asAttributes.recycle();
        } catch (NameNotFoundException e) {
        } catch (NameNotFoundException e) {
@@ -919,7 +910,7 @@ public class AccessibilityServiceInfo implements Parcelable {
    @Nullable
    @Nullable
    public String loadHtmlDescription(@NonNull PackageManager packageManager) {
    public String loadHtmlDescription(@NonNull PackageManager packageManager) {
        if (mHtmlDescriptionRes == 0) {
        if (mHtmlDescriptionRes == 0) {
            return mNonLocalizedHtmlDescription;
            return null;
        }
        }


        final ServiceInfo serviceInfo = mResolveInfo.serviceInfo;
        final ServiceInfo serviceInfo = mResolveInfo.serviceInfo;
@@ -1017,7 +1008,6 @@ public class AccessibilityServiceInfo implements Parcelable {
        parcel.writeInt(mAnimatedImageRes);
        parcel.writeInt(mAnimatedImageRes);
        parcel.writeInt(mHtmlDescriptionRes);
        parcel.writeInt(mHtmlDescriptionRes);
        parcel.writeString(mNonLocalizedDescription);
        parcel.writeString(mNonLocalizedDescription);
        parcel.writeString(mNonLocalizedHtmlDescription);
    }
    }


    private void initFromParcel(Parcel parcel) {
    private void initFromParcel(Parcel parcel) {
@@ -1039,7 +1029,6 @@ public class AccessibilityServiceInfo implements Parcelable {
        mAnimatedImageRes = parcel.readInt();
        mAnimatedImageRes = parcel.readInt();
        mHtmlDescriptionRes = parcel.readInt();
        mHtmlDescriptionRes = parcel.readInt();
        mNonLocalizedDescription = parcel.readString();
        mNonLocalizedDescription = parcel.readString();
        mNonLocalizedHtmlDescription = parcel.readString();
    }
    }


    @Override
    @Override
+2 −2
Original line number Original line Diff line number Diff line
@@ -3774,7 +3774,7 @@
        <attr name="animatedImageDrawable" format="reference"/>
        <attr name="animatedImageDrawable" format="reference"/>
        <!-- Html description of the accessibility service, to help users understand
        <!-- Html description of the accessibility service, to help users understand
             how the service can help them.-->
             how the service can help them.-->
        <attr name="htmlDescription" format="string"/>
        <attr name="htmlDescription" format="reference"/>


        <!-- Short description of the accessibility service purpose or behavior.-->
        <!-- Short description of the accessibility service purpose or behavior.-->
        <attr name="description" />
        <attr name="description" />
@@ -3795,7 +3795,7 @@
        <attr name="animatedImageDrawable" format="reference"/>
        <attr name="animatedImageDrawable" format="reference"/>
        <!-- Html description of the target of accessibility shortcut purpose or behavior, to help
        <!-- Html description of the target of accessibility shortcut purpose or behavior, to help
             users understand how the target of accessibility shortcut can help them. -->
             users understand how the target of accessibility shortcut can help them. -->
        <attr name="htmlDescription" format="string"/>
        <attr name="htmlDescription" format="reference"/>
    </declare-styleable>
    </declare-styleable>


    <!-- Use <code>print-service</code> as the root tag of the XML resource that
    <!-- Use <code>print-service</code> as the root tag of the XML resource that