Stability fixes for Settings. Asynchronous callbacks causing NPEs.
Bug: 4598717 Change-Id: I7f1c5bf6e079bb36301e81085096c5b82615814b
This commit is contained in:
@@ -230,6 +230,7 @@ public class ManageAccountsSettings extends AccountPreferenceBase
|
||||
}
|
||||
|
||||
private void setBackgroundDataInt(boolean enabled) {
|
||||
if (getActivity() == null) return;
|
||||
final ConnectivityManager connManager = (ConnectivityManager)
|
||||
getActivity().getSystemService(Context.CONNECTIVITY_SERVICE);
|
||||
connManager.setBackgroundDataSetting(enabled);
|
||||
@@ -315,6 +316,7 @@ public class ManageAccountsSettings extends AccountPreferenceBase
|
||||
|
||||
@Override
|
||||
public void onAccountsUpdated(Account[] accounts) {
|
||||
if (getActivity() == null) return;
|
||||
mManageAccountsCategory.removeAll();
|
||||
for (int i = 0, n = accounts.length; i < n; i++) {
|
||||
final Account account = accounts[i];
|
||||
|
Reference in New Issue
Block a user