From 28b7b21694045824ddf59f2d88043c0ca48dfc93 Mon Sep 17 00:00:00 2001 From: Wink Saville Date: Mon, 28 Feb 2011 15:32:41 -0800 Subject: [PATCH] Fixing the write of BackgroundData setting, DO NOT MERGE. I outsmarted myself trying to minimize writes and caused no writes to occur. bug:3485934 Change-Id: I43b6ebbed3f13277edfb2e28f09cf7b98ea66776 --- .../java/com/android/server/ConnectivityService.java | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/services/java/com/android/server/ConnectivityService.java b/services/java/com/android/server/ConnectivityService.java index e689654110..2f12a95644 100644 --- a/services/java/com/android/server/ConnectivityService.java +++ b/services/java/com/android/server/ConnectivityService.java @@ -989,13 +989,11 @@ public class ConnectivityService extends IConnectivityManager.Stub { } private void handleSetBackgroundData(boolean enabled) { - if (enabled != getBackgroundDataSetting()) { - Settings.Secure.putInt(mContext.getContentResolver(), - Settings.Secure.BACKGROUND_DATA, enabled ? 1 : 0); - Intent broadcast = new Intent( - ConnectivityManager.ACTION_BACKGROUND_DATA_SETTING_CHANGED); - mContext.sendBroadcast(broadcast); - } + Settings.Secure.putInt(mContext.getContentResolver(), + Settings.Secure.BACKGROUND_DATA, enabled ? 1 : 0); + Intent broadcast = new Intent( + ConnectivityManager.ACTION_BACKGROUND_DATA_SETTING_CHANGED); + mContext.sendBroadcast(broadcast); } /**