diff options
author | Brian Attwell <brianattwell@google.com> | 2015-05-29 11:21:32 -0700 |
---|---|---|
committer | Brian Attwell <brianattwell@google.com> | 2015-06-02 20:56:19 +0000 |
commit | 3c4d041b925bd45da88d20a88f819b8d02ef9aa5 (patch) | |
tree | c325f0eecfee8eaca8c11c6e9def8a3821aee6f6 | |
parent | 83056011c9c529546e6a98817dee3be04423b3b9 (diff) | |
download | packages_apps_Contacts-3c4d041b925bd45da88d20a88f819b8d02ef9aa5.tar.gz packages_apps_Contacts-3c4d041b925bd45da88d20a88f819b8d02ef9aa5.tar.bz2 packages_apps_Contacts-3c4d041b925bd45da88d20a88f819b8d02ef9aa5.zip |
Use new definitions of ProviderStatus
And rebundle Contacts again.
Bug: 21090207
Change-Id: I7e93e36ad0c0d667ac56983c76acb1b97bd8755c
-rw-r--r-- | Android.mk | 2 | ||||
-rw-r--r-- | res/values/strings.xml | 3 | ||||
-rw-r--r-- | src/com/android/contacts/list/ContactsUnavailableFragment.java | 16 | ||||
-rw-r--r-- | src/com/android/contacts/list/ProviderStatusWatcher.java | 6 |
4 files changed, 8 insertions, 19 deletions
diff --git a/Android.mk b/Android.mk index 10178fb01..8f34bb902 100644 --- a/Android.mk +++ b/Android.mk @@ -36,6 +36,8 @@ LOCAL_PRIVILEGED_MODULE := true LOCAL_PROGUARD_FLAG_FILES := proguard.flags +LOCAL_SDK_VERSION := current + include $(BUILD_PACKAGE) # Use the folloing include to make our test apk. diff --git a/res/values/strings.xml b/res/values/strings.xml index 55e182d10..7dbe6c10b 100644 --- a/res/values/strings.xml +++ b/res/values/strings.xml @@ -415,9 +415,6 @@ <!-- An option in the 'Contact photo' dialog, if there is already a photo [CHAR LIMIT=50] --> <string name="pick_new_photo">Select new photo</string> - <!-- Text shown in the contacts app while the background process updates contacts after a locale change [CHAR LIMIT=300] --> - <string name="locale_change_in_progress">Contact list is being updated to reflect the change of language.</string> - <!-- Text shown in the contacts app while the background process updates contacts after a system upgrade [CHAR LIMIT=300] --> <string name="upgrade_in_progress">Contact list is being updated.</string> diff --git a/src/com/android/contacts/list/ContactsUnavailableFragment.java b/src/com/android/contacts/list/ContactsUnavailableFragment.java index 48c4e9efd..c1b2c410f 100644 --- a/src/com/android/contacts/list/ContactsUnavailableFragment.java +++ b/src/com/android/contacts/list/ContactsUnavailableFragment.java @@ -88,7 +88,7 @@ public class ContactsUnavailableFragment extends Fragment implements OnClickList return; } switch (providerStatus) { - case ProviderStatus.STATUS_NO_ACCOUNTS_NO_CONTACTS: + case ProviderStatus.STATUS_EMPTY: setMessageText(mNoContactsMsgResId, mNSecNoContactsMsgResId); mCreateContactButton.setVisibility(View.VISIBLE); mAddAccountButton.setVisibility(View.VISIBLE); @@ -96,17 +96,7 @@ public class ContactsUnavailableFragment extends Fragment implements OnClickList mProgress.setVisibility(View.GONE); break; - case ProviderStatus.STATUS_CHANGING_LOCALE: - mMessageView.setText(R.string.locale_change_in_progress); - mMessageView.setGravity(Gravity.CENTER_HORIZONTAL); - mMessageView.setVisibility(View.VISIBLE); - mCreateContactButton.setVisibility(View.GONE); - mAddAccountButton.setVisibility(View.GONE); - mImportContactsButton.setVisibility(View.GONE); - mProgress.setVisibility(View.VISIBLE); - break; - - case ProviderStatus.STATUS_UPGRADING: + case ProviderStatus.STATUS_BUSY: mMessageView.setText(R.string.upgrade_in_progress); mMessageView.setGravity(Gravity.CENTER_HORIZONTAL); mMessageView.setVisibility(View.VISIBLE); @@ -144,7 +134,7 @@ public class ContactsUnavailableFragment extends Fragment implements OnClickList mNoContactsMsgResId = resId; mNSecNoContactsMsgResId = secResId; if ((mMessageView != null) && (mProviderStatus != null) && - (mProviderStatus.equals(ProviderStatus.STATUS_NO_ACCOUNTS_NO_CONTACTS))) { + (mProviderStatus.equals(ProviderStatus.STATUS_EMPTY))) { if (resId != -1) { mMessageView.setText(mNoContactsMsgResId); mMessageView.setGravity(Gravity.CENTER_HORIZONTAL); diff --git a/src/com/android/contacts/list/ProviderStatusWatcher.java b/src/com/android/contacts/list/ProviderStatusWatcher.java index 23ae4d5b4..f42bc3e96 100644 --- a/src/com/android/contacts/list/ProviderStatusWatcher.java +++ b/src/com/android/contacts/list/ProviderStatusWatcher.java @@ -167,16 +167,16 @@ public class ProviderStatusWatcher extends ContentObserver { * provider?) this may still cause ANRs. * * In order to avoid that, if we can't load the status within {@link #LOAD_WAIT_TIMEOUT_MS}, - * we'll give up and just returns {@link ProviderStatus#STATUS_UPGRADING} in order to unblock + * we'll give up and just returns {@link ProviderStatus#STATUS_BUSY} in order to unblock * the UI thread. The actual result will be delivered later via {@link ProviderStatusListener}. - * (If {@link ProviderStatus#STATUS_UPGRADING} is returned, the app (should) shows an according + * (If {@link ProviderStatus#STATUS_BUSY} is returned, the app (should) shows an according * message, like "contacts are being updated".) */ public int getProviderStatus() { waitForLoaded(); if (mProviderStatus == null) { - return ProviderStatus.STATUS_UPGRADING; + return ProviderStatus.STATUS_BUSY; } return mProviderStatus; |