summaryrefslogtreecommitdiffstats
path: root/src/com
diff options
context:
space:
mode:
authorGilles Debunne <debunne@google.com>2011-07-07 15:59:18 -0700
committerAndroid (Google) Code Review <android-gerrit@google.com>2011-07-07 15:59:18 -0700
commit8b3c13bf48148d322274a81b73351d2c1c4f4151 (patch)
tree308a3d2599b312de346ce46ff3eb92be795dafea /src/com
parent890e352d5f897b533c216f56e7604cdd2fd67eda (diff)
parentab189bd9a6bb023e0574e52a129f86c2b12b4d93 (diff)
downloadpackages_apps_settings-8b3c13bf48148d322274a81b73351d2c1c4f4151.zip
packages_apps_settings-8b3c13bf48148d322274a81b73351d2c1c4f4151.tar.gz
packages_apps_settings-8b3c13bf48148d322274a81b73351d2c1c4f4151.tar.bz2
Merge "Fixed intents to start Settings activities"
Diffstat (limited to 'src/com')
-rw-r--r--src/com/android/settings/Settings.java3
-rw-r--r--src/com/android/settings/accounts/AccountSyncSettings.java28
2 files changed, 21 insertions, 10 deletions
diff --git a/src/com/android/settings/Settings.java b/src/com/android/settings/Settings.java
index 16531e3..b982606 100644
--- a/src/com/android/settings/Settings.java
+++ b/src/com/android/settings/Settings.java
@@ -567,4 +567,7 @@ public class Settings extends PreferenceActivity implements ButtonBarHandler {
public static class CryptKeeperSettingsActivity extends Settings { /* empty */ }
public static class DeviceAdminSettingsActivity extends Settings { /* empty */ }
public static class DataUsageSummaryActivity extends Settings { /* empty */ }
+ public static class AdvancedWifiSettingsActivity extends Settings { /* empty */ }
+ public static class AdvancedBluetoothSettingsActivity extends Settings { /* empty */ }
+ public static class TextToSpeechSettingsActivity extends Settings { /* empty */ }
}
diff --git a/src/com/android/settings/accounts/AccountSyncSettings.java b/src/com/android/settings/accounts/AccountSyncSettings.java
index 9ef0481..547b0e1 100644
--- a/src/com/android/settings/accounts/AccountSyncSettings.java
+++ b/src/com/android/settings/accounts/AccountSyncSettings.java
@@ -16,10 +16,6 @@
package com.android.settings.accounts;
-import com.android.settings.R;
-import com.google.android.collect.Lists;
-import com.google.android.collect.Maps;
-
import android.accounts.Account;
import android.accounts.AccountManager;
import android.accounts.AccountManagerCallback;
@@ -53,6 +49,10 @@ import android.view.ViewGroup;
import android.widget.ImageView;
import android.widget.TextView;
+import com.android.settings.R;
+import com.google.android.collect.Lists;
+import com.google.android.collect.Maps;
+
import java.io.IOException;
import java.util.ArrayList;
import java.util.Collections;
@@ -175,7 +175,13 @@ public class AccountSyncSettings extends AccountPreferenceBase {
mDateFormat = DateFormat.getDateFormat(activity);
mTimeFormat = DateFormat.getTimeFormat(activity);
- mAccount = (Account) getArguments().getParcelable(ACCOUNT_KEY);
+ Bundle arguments = getArguments();
+ if (arguments == null) {
+ Log.e(TAG, "No arguments provided when starting intent. ACCOUNT_KEY needed.");
+ return;
+ }
+
+ mAccount = (Account) arguments.getParcelable(ACCOUNT_KEY);
if (mAccount != null) {
if (Log.isLoggable(TAG, Log.VERBOSE)) Log.v(TAG, "Got account: " + mAccount);
mUserId.setText(mAccount.name);
@@ -486,11 +492,13 @@ public class AccountSyncSettings extends AccountPreferenceBase {
protected void onAuthDescriptionsUpdated() {
super.onAuthDescriptionsUpdated();
getPreferenceScreen().removeAll();
- mProviderIcon.setImageDrawable(getDrawableForType(mAccount.type));
- mProviderId.setText(getLabelForType(mAccount.type));
- PreferenceScreen prefs = addPreferencesForType(mAccount.type);
- if (prefs != null) {
- updatePreferenceIntents(prefs);
+ if (mAccount != null) {
+ mProviderIcon.setImageDrawable(getDrawableForType(mAccount.type));
+ mProviderId.setText(getLabelForType(mAccount.type));
+ PreferenceScreen prefs = addPreferencesForType(mAccount.type);
+ if (prefs != null) {
+ updatePreferenceIntents(prefs);
+ }
}
addPreferencesFromResource(R.xml.account_sync_settings);
}