Merge "Change the attribute format of htmlDescription."
This commit is contained in:
@@ -550,11 +550,6 @@ public class AccessibilityServiceInfo implements Parcelable {
|
||||
*/
|
||||
private int mHtmlDescriptionRes;
|
||||
|
||||
/**
|
||||
* Non localized html description of the accessibility service.
|
||||
*/
|
||||
private String mNonLocalizedHtmlDescription;
|
||||
|
||||
/**
|
||||
* Creates a new instance.
|
||||
*/
|
||||
@@ -683,10 +678,6 @@ public class AccessibilityServiceInfo implements Parcelable {
|
||||
com.android.internal.R.styleable.AccessibilityService_htmlDescription);
|
||||
if (peekedValue != null) {
|
||||
mHtmlDescriptionRes = peekedValue.resourceId;
|
||||
final CharSequence nonLocalizedHtmlDescription = peekedValue.coerceToString();
|
||||
if (nonLocalizedHtmlDescription != null) {
|
||||
mNonLocalizedHtmlDescription = nonLocalizedHtmlDescription.toString().trim();
|
||||
}
|
||||
}
|
||||
asAttributes.recycle();
|
||||
} catch (NameNotFoundException e) {
|
||||
@@ -919,7 +910,7 @@ public class AccessibilityServiceInfo implements Parcelable {
|
||||
@Nullable
|
||||
public String loadHtmlDescription(@NonNull PackageManager packageManager) {
|
||||
if (mHtmlDescriptionRes == 0) {
|
||||
return mNonLocalizedHtmlDescription;
|
||||
return null;
|
||||
}
|
||||
|
||||
final ServiceInfo serviceInfo = mResolveInfo.serviceInfo;
|
||||
@@ -1017,7 +1008,6 @@ public class AccessibilityServiceInfo implements Parcelable {
|
||||
parcel.writeInt(mAnimatedImageRes);
|
||||
parcel.writeInt(mHtmlDescriptionRes);
|
||||
parcel.writeString(mNonLocalizedDescription);
|
||||
parcel.writeString(mNonLocalizedHtmlDescription);
|
||||
}
|
||||
|
||||
private void initFromParcel(Parcel parcel) {
|
||||
@@ -1039,7 +1029,6 @@ public class AccessibilityServiceInfo implements Parcelable {
|
||||
mAnimatedImageRes = parcel.readInt();
|
||||
mHtmlDescriptionRes = parcel.readInt();
|
||||
mNonLocalizedDescription = parcel.readString();
|
||||
mNonLocalizedHtmlDescription = parcel.readString();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -3774,7 +3774,7 @@
|
||||
<attr name="animatedImageDrawable" format="reference"/>
|
||||
<!-- Html description of the accessibility service, to help users understand
|
||||
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.-->
|
||||
<attr name="description" />
|
||||
@@ -3795,7 +3795,7 @@
|
||||
<attr name="animatedImageDrawable" format="reference"/>
|
||||
<!-- Html description of the target of accessibility shortcut purpose or behavior, to help
|
||||
users understand how the target of accessibility shortcut can help them. -->
|
||||
<attr name="htmlDescription" format="string"/>
|
||||
<attr name="htmlDescription" format="reference"/>
|
||||
</declare-styleable>
|
||||
|
||||
<!-- Use <code>print-service</code> as the root tag of the XML resource that
|
||||
|
||||
Reference in New Issue
Block a user