diff options
author | Dianne Hackborn <hackbod@google.com> | 2009-06-16 15:11:24 -0700 |
---|---|---|
committer | Dianne Hackborn <hackbod@google.com> | 2009-06-16 15:11:24 -0700 |
commit | 9ad40ce969487ebee38a6fa74ead8a352d41e7e5 (patch) | |
tree | 7e2278bd979d81e4e3a9579ff3dd7889e944309c | |
parent | 0d7f0197e6c9d3603c67dbe19006a3ebc904bc77 (diff) | |
download | GoogleSubscribedFeedsProvider-9ad40ce969487ebee38a6fa74ead8a352d41e7e5.tar.gz |
Fix bug #1851635 and #1912470.
The SyncSettings activity was throwing an NPE back to the system that
was causing various problems.
-rw-r--r-- | src/com/android/settings/SyncSettings.java | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/com/android/settings/SyncSettings.java b/src/com/android/settings/SyncSettings.java index 930d11d..483db9b 100644 --- a/src/com/android/settings/SyncSettings.java +++ b/src/com/android/settings/SyncSettings.java @@ -35,6 +35,7 @@ import android.content.pm.ProviderInfo; import android.net.ConnectivityManager; import android.net.Uri; import android.os.Bundle; +import android.os.Handler; import android.os.RemoteException; import android.text.format.DateFormat; import android.preference.CheckBoxPreference; @@ -71,6 +72,8 @@ public class SyncSettings extends PreferenceActivity { java.text.DateFormat mDateFormat; java.text.DateFormat mTimeFormat; + final Handler mHandler = new Handler(); + private static final String SYNC_CONNECTION_SETTING_CHANGED = "com.android.sync.SYNC_CONN_STATUS_CHANGED"; @@ -420,7 +423,7 @@ public class SyncSettings extends PreferenceActivity { private ISyncStatusObserver mSyncStatusObserver = new ISyncStatusObserver.Stub() { public void onStatusChanged(int which) throws RemoteException { - getWindow().getDecorView().getHandler().post(new Runnable() { + mHandler.post(new Runnable() { public void run() { onSyncStateUpdated(); } |