am ec7f2fda: Import revised translations. DO NOT MERGE
* commit 'ec7f2fdad6c5a6da88ef0d43d9772f73f0b58d7a':
Import revised translations. DO NOT MERGE
diff --git a/src/com/android/settings/AccountPreferenceBase.java b/src/com/android/settings/AccountPreferenceBase.java
index 520b9d7..c1b3c41 100644
--- a/src/com/android/settings/AccountPreferenceBase.java
+++ b/src/com/android/settings/AccountPreferenceBase.java
@@ -31,6 +31,7 @@
import android.content.SyncAdapterType;
import android.content.SyncStatusObserver;
import android.content.pm.PackageManager;
+import android.content.res.Resources;
import android.graphics.drawable.Drawable;
import android.os.Bundle;
import android.os.Handler;
@@ -132,12 +133,16 @@
protected Drawable getDrawableForType(final String accountType) {
Drawable icon = null;
if (mTypeToAuthDescription.containsKey(accountType)) {
+ AuthenticatorDescription desc = null;
try {
- AuthenticatorDescription desc = (AuthenticatorDescription)
- mTypeToAuthDescription.get(accountType);
- Context authContext = createPackageContext(desc.packageName, 0);
- icon = authContext.getResources().getDrawable(desc.iconId);
+ desc = (AuthenticatorDescription)mTypeToAuthDescription.get(accountType);
+ if (desc != null) {
+ Context authContext = createPackageContext(desc.packageName, 0);
+ icon = authContext.getResources().getDrawable(desc.iconId);
+ }
} catch (PackageManager.NameNotFoundException e) {
+ Log.w(TAG, "failed createPackageContext for account type " + accountType);
+ } catch (Resources.NotFoundException e) {
// TODO: place holder icon for missing account icons?
Log.w(TAG, "No icon for account type " + accountType);
}
@@ -153,14 +158,18 @@
protected CharSequence getLabelForType(final String accountType) {
CharSequence label = null;
if (mTypeToAuthDescription.containsKey(accountType)) {
- try {
- AuthenticatorDescription desc = (AuthenticatorDescription)
- mTypeToAuthDescription.get(accountType);
- Context authContext = createPackageContext(desc.packageName, 0);
- label = authContext.getResources().getText(desc.labelId);
- } catch (PackageManager.NameNotFoundException e) {
- Log.w(TAG, "No label for account type " + ", type " + accountType);
- }
+ AuthenticatorDescription desc = null;
+ try {
+ desc = (AuthenticatorDescription)mTypeToAuthDescription.get(accountType);
+ if (desc != null) {
+ Context authContext = createPackageContext(desc.packageName, 0);
+ label = authContext.getResources().getText(desc.labelId);
+ }
+ } catch (PackageManager.NameNotFoundException e) {
+ Log.w(TAG, "failed createPackageContext for account type " + accountType);
+ } catch (Resources.NotFoundException e) {
+ Log.w(TAG, "No label for account type " + accountType);
+ }
}
return label;
}
diff --git a/src/com/android/settings/AccountSyncSettings.java b/src/com/android/settings/AccountSyncSettings.java
index 3200a13..d6c9920 100644
--- a/src/com/android/settings/AccountSyncSettings.java
+++ b/src/com/android/settings/AccountSyncSettings.java
@@ -59,7 +59,6 @@
public class AccountSyncSettings extends AccountPreferenceBase implements OnClickListener {
private static final String ACCOUNT_KEY = "account";
private static final String TAG = "AccountSettings";
- private static final String CHANGE_PASSWORD_KEY = "changePassword";
private static final int MENU_SYNC_NOW_ID = Menu.FIRST;
private static final int MENU_SYNC_CANCEL_ID = Menu.FIRST + 1;
private static final int REALLY_REMOVE_DIALOG = 100;
@@ -73,7 +72,6 @@
protected View mRemoveAccountArea;
private java.text.DateFormat mDateFormat;
private java.text.DateFormat mTimeFormat;
- private Preference mAuthenticatorPreferences;
private Account mAccount;
// List of all accounts, updated when accounts are added/removed
// We need to re-scan the accounts on sync events, in case sync state changes.
diff --git a/src/com/android/settings/AddAccountSettings.java b/src/com/android/settings/AddAccountSettings.java
index 3481172..50c95a9 100644
--- a/src/com/android/settings/AddAccountSettings.java
+++ b/src/com/android/settings/AddAccountSettings.java
@@ -107,11 +107,9 @@
private AccountManagerCallback<Bundle> mCallback = new AccountManagerCallback<Bundle>() {
public void run(AccountManagerFuture<Bundle> future) {
- boolean accountAdded = false;
try {
Bundle bundle = future.getResult();
bundle.keySet();
- accountAdded = true;
if (LDEBUG) Log.d(TAG, "account added: " + bundle);
} catch (OperationCanceledException e) {
if (LDEBUG) Log.d(TAG, "addAccount was canceled");
diff --git a/src/com/android/settings/SyncActivityTooManyDeletes.java b/src/com/android/settings/SyncActivityTooManyDeletes.java
index d122640..1ffaa0a 100644
--- a/src/com/android/settings/SyncActivityTooManyDeletes.java
+++ b/src/com/android/settings/SyncActivityTooManyDeletes.java
@@ -107,8 +107,8 @@
setContentView(ll);
}
- public void onItemClick(AdapterView parent, View view, int position, long id) {
- // the contants for position correspond to the items options array in onCreate()
+ public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
+ // the constants for position correspond to the items options array in onCreate()
if (position == 0) startSyncReallyDelete();
else if (position == 1) startSyncUndoDeletes();
finish();