diff options
author | Carlos Valdivia <carlosvaldivia@google.com> | 2012-05-08 16:39:15 -0700 |
---|---|---|
committer | Carlos Valdivia <carlosvaldivia@google.com> | 2012-05-08 16:39:15 -0700 |
commit | 13ade46b5320f3c1982e8e9bc39508bb7fc647db (patch) | |
tree | a50e434d5161411c77de3bcfe83e4c663b920508 /src/com/android/settings/accounts | |
parent | 98d262df0d0b6eb76b9ddbfb75cc5076a08301db (diff) | |
download | packages_apps_settings-13ade46b5320f3c1982e8e9bc39508bb7fc647db.zip packages_apps_settings-13ade46b5320f3c1982e8e9bc39508bb7fc647db.tar.gz packages_apps_settings-13ade46b5320f3c1982e8e9bc39508bb7fc647db.tar.bz2 |
Occlude syncs without provider info.
Bug: 934147
Change-Id: Ib3413efda07432cfc52cb5b1a20350ed5c7655a8
Diffstat (limited to 'src/com/android/settings/accounts')
-rw-r--r-- | src/com/android/settings/accounts/AccountSyncSettings.java | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/com/android/settings/accounts/AccountSyncSettings.java b/src/com/android/settings/accounts/AccountSyncSettings.java index 82f9844..4d9f80e 100644 --- a/src/com/android/settings/accounts/AccountSyncSettings.java +++ b/src/com/android/settings/accounts/AccountSyncSettings.java @@ -208,11 +208,13 @@ public class AccountSyncSettings extends AccountPreferenceBase { new SyncStateCheckBoxPreference(getActivity(), account, authority); item.setPersistent(false); final ProviderInfo providerInfo = getPackageManager().resolveContentProvider(authority, 0); - CharSequence providerLabel = providerInfo != null - ? providerInfo.loadLabel(getPackageManager()) : null; + if (providerInfo == null) { + return; + } + CharSequence providerLabel = providerInfo.loadLabel(getPackageManager()); if (TextUtils.isEmpty(providerLabel)) { Log.e(TAG, "Provider needs a label for authority '" + authority + "'"); - providerLabel = authority; + return; } String title = getString(R.string.sync_item_title, providerLabel); item.setTitle(title); |