summaryrefslogtreecommitdiffstats
path: root/src/com/android/settings/widget
diff options
context:
space:
mode:
authorDianne Hackborn <hackbod@google.com>2010-10-06 14:28:23 -0700
committerDianne Hackborn <hackbod@google.com>2010-10-06 14:28:23 -0700
commit4b21f7cd9424eeb83838071a4419912ee5d5e41d (patch)
treecb177af4484e3ad9520500022ac069ff656fbb02 /src/com/android/settings/widget
parent84c8c175c8ee797f61121211c3ef8638d127cdf6 (diff)
downloadpackages_apps_Settings-4b21f7cd9424eeb83838071a4419912ee5d5e41d.tar.gz
packages_apps_Settings-4b21f7cd9424eeb83838071a4419912ee5d5e41d.tar.bz2
packages_apps_Settings-4b21f7cd9424eeb83838071a4419912ee5d5e41d.zip
Fix issue #3062691: GPS enable bypass via com.android.settings.widget.SettingsAppWidgetProvider
Make the receiver private. Also fix to correctly update when sync status changes. Change-Id: I35481bf5b473196b00427da4df49aa76f691d38b
Diffstat (limited to 'src/com/android/settings/widget')
-rw-r--r--src/com/android/settings/widget/SettingsAppWidgetProvider.java12
1 files changed, 3 insertions, 9 deletions
diff --git a/src/com/android/settings/widget/SettingsAppWidgetProvider.java b/src/com/android/settings/widget/SettingsAppWidgetProvider.java
index 533b5e4ed..8f17e05e6 100644
--- a/src/com/android/settings/widget/SettingsAppWidgetProvider.java
+++ b/src/com/android/settings/widget/SettingsAppWidgetProvider.java
@@ -23,8 +23,8 @@ import android.bluetooth.BluetoothAdapter;
import android.content.ComponentName;
import android.content.ContentResolver;
import android.content.Context;
-import android.content.IContentService;
import android.content.Intent;
+import android.content.SyncStorageEngine;
import android.content.pm.PackageManager;
import android.location.LocationManager;
import android.net.ConnectivityManager;
@@ -538,9 +538,6 @@ public class SettingsAppWidgetProvider extends AppWidgetProvider {
@Override
public void onActualStateChange(Context context, Intent unused) {
- // Well, ACTION_CLOSE_SYSTEM_DIALOGS fired. So _maybe_
- // the Sync settings changed.
- // TODO: find something more reliable.
setCurrentState(context, getActualState(context));
}
@@ -713,11 +710,8 @@ public class SettingsAppWidgetProvider extends AppWidgetProvider {
sBluetoothState.onActualStateChange(context, intent);
} else if (LocationManager.PROVIDERS_CHANGED_ACTION.equals(action)) {
sGpsState.onActualStateChange(context, intent);
- } else if (Intent.ACTION_CLOSE_SYSTEM_DIALOGS.equals(action)) {
- // Sadly, for lack of a "sync settings changed" intent,
- // this is where we check where sync is enabled or not.
- // It's not 100% reliable though as there are paths where
- // this doesn't fire.
+ } else if (SyncStorageEngine.SYNC_CONNECTION_SETTING_CHANGED_INTENT.getAction()
+ .equals(action)) {
sSyncState.onActualStateChange(context, intent);
} else if (intent.hasCategory(Intent.CATEGORY_ALTERNATIVE)) {
Uri data = intent.getData();