Merge "Fix Settings NPE" into jb-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
beb3d8b1e0
@@ -439,6 +439,10 @@ public class Settings extends PreferenceActivity
|
|||||||
List<Header> accountHeaders = new ArrayList<Header>(accountTypes.length);
|
List<Header> accountHeaders = new ArrayList<Header>(accountTypes.length);
|
||||||
for (String accountType : accountTypes) {
|
for (String accountType : accountTypes) {
|
||||||
CharSequence label = mAuthenticatorHelper.getLabelForType(this, accountType);
|
CharSequence label = mAuthenticatorHelper.getLabelForType(this, accountType);
|
||||||
|
if (label == null) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
Account[] accounts = AccountManager.get(this).getAccountsByType(accountType);
|
Account[] accounts = AccountManager.get(this).getAccountsByType(accountType);
|
||||||
boolean skipToAccount = accounts.length == 1
|
boolean skipToAccount = accounts.length == 1
|
||||||
&& !mAuthenticatorHelper.hasAccountPreferences(accountType);
|
&& !mAuthenticatorHelper.hasAccountPreferences(accountType);
|
||||||
@@ -689,7 +693,7 @@ public class Settings extends PreferenceActivity
|
|||||||
mWifiEnabler.resume();
|
mWifiEnabler.resume();
|
||||||
mBluetoothEnabler.resume();
|
mBluetoothEnabler.resume();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void pause() {
|
public void pause() {
|
||||||
mWifiEnabler.pause();
|
mWifiEnabler.pause();
|
||||||
mBluetoothEnabler.pause();
|
mBluetoothEnabler.pause();
|
||||||
|
Reference in New Issue
Block a user