Use new definitions of ProviderStatus
And rebundle Contacts again.
Bug: 21090207
Change-Id: I7e93e36ad0c0d667ac56983c76acb1b97bd8755c
diff --git a/Android.mk b/Android.mk
index 10178fb..8f34bb9 100644
--- a/Android.mk
+++ b/Android.mk
@@ -36,6 +36,8 @@
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 55e182d..7dbe6c1 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 48c4e9e..c1b2c41 100644
--- a/src/com/android/contacts/list/ContactsUnavailableFragment.java
+++ b/src/com/android/contacts/list/ContactsUnavailableFragment.java
@@ -88,7 +88,7 @@
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 @@
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 @@
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 23ae4d5..f42bc3e 100644
--- a/src/com/android/contacts/list/ProviderStatusWatcher.java
+++ b/src/com/android/contacts/list/ProviderStatusWatcher.java
@@ -167,16 +167,16 @@
* 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;