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

Commit 72dfaf89 authored by jasonwshsu's avatar jasonwshsu
Browse files

Allow one of description or htmlDescription attribute provided for AccessibilityShortcutInfo

* Only two of them are empty should throw parser error

Bug: 154092127
Test: manual test
Change-Id: I038dbb054f4302b9f5e2c3246fb9539c77533339
parent cbea226a
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -153,7 +153,7 @@ public final class AccessibilityShortcutInfo {
                    com.android.internal.R.styleable.AccessibilityShortcutTarget_settingsActivity);
            asAttributes.recycle();

            if (mDescriptionResId == 0 || mSummaryResId == 0) {
            if ((mDescriptionResId == 0 && mHtmlDescriptionRes == 0) || mSummaryResId == 0) {
                throw new XmlPullParserException("No description or summary in meta-data");
            }
        } catch (PackageManager.NameNotFoundException e) {