From: Tim Kilbourn Date: Thu, 11 Jun 2015 23:43:59 +0000 (-0700) Subject: Show correct text for app link domains. X-Git-Tag: android-x86-6.0-r1~25^2~157 X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=49983b991c01af0bc958eee1ddad144b7bde44ec;p=android-x86%2Fpackages-apps-Settings.git Show correct text for app link domains. The user's preferences were not queried on the app listing, making it look like an app would open links even after the user disabled app links for the app. Bug: 21093152 Change-Id: I133ff229bb5e289ebec8df06924936fb3177f095 --- diff --git a/src/com/android/settings/applications/ManageApplications.java b/src/com/android/settings/applications/ManageApplications.java index 0a09133ffb..6099af1542 100644 --- a/src/com/android/settings/applications/ManageApplications.java +++ b/src/com/android/settings/applications/ManageApplications.java @@ -1045,6 +1045,14 @@ public class ManageApplications extends InstrumentedFragment } private CharSequence getDomainsSummary(String packageName) { + // If the user has explicitly said "no" for this package, that's the + // string we should show. + int domainStatus = mPm.getIntentVerificationStatus(packageName, UserHandle.myUserId()); + if (domainStatus == PackageManager.INTENT_FILTER_DOMAIN_VERIFICATION_STATUS_NEVER) { + return mContext.getString(R.string.domain_urls_summary_none); + } + // Otherwise, ask package manager for the domains for this package, + // and show the first one (or none if there aren't any). ArraySet result = Utils.getHandledDomains(mPm, packageName); if (result.size() == 0) { return mContext.getString(R.string.domain_urls_summary_none);