Loading src/com/android/settings/DataUsageSummary.java +5 −1 Original line number Diff line number Diff line Loading @@ -553,7 +553,11 @@ public class DataUsageSummary extends Fragment { return true; } case R.id.data_usage_menu_auto_sync: { if (ActivityManager.isUserAMonkey()) { Log.d("SyncState", "ignoring monkey's attempt to flip global sync state"); } else { ConfirmAutoSyncChangeFragment.show(this, !item.isChecked()); } return true; } } Loading src/com/android/settings/accounts/SyncSettings.java +6 −1 Original line number Diff line number Diff line Loading @@ -20,6 +20,7 @@ import android.accounts.Account; import android.accounts.AccountManager; import android.accounts.OnAccountsUpdateListener; import android.app.Activity; import android.app.ActivityManager; import android.content.ContentResolver; import android.content.Intent; import android.graphics.drawable.Drawable; Loading Loading @@ -56,7 +57,11 @@ public class SyncSettings extends AccountPreferenceBase mAutoSyncPreference.setOnPreferenceChangeListener(new OnPreferenceChangeListener() { @Override public boolean onPreferenceChange(Preference preference, Object newValue) { if (ActivityManager.isUserAMonkey()) { Log.d("SyncSettings", "ignoring monkey's attempt to flip sync state"); } else { ContentResolver.setMasterSyncAutomatically((Boolean) newValue); } return true; } }); Loading src/com/android/settings/accounts/SyncStateCheckBoxPreference.java +7 −1 Original line number Diff line number Diff line Loading @@ -17,9 +17,11 @@ package com.android.settings.accounts; import android.accounts.Account; import android.app.ActivityManager; import android.content.Context; import android.preference.CheckBoxPreference; import android.util.AttributeSet; import android.util.Log; import android.view.View; import android.widget.TextView; Loading Loading @@ -131,9 +133,13 @@ public class SyncStateCheckBoxPreference extends CheckBoxPreference { // When we're in one-time sync mode, we don't want a click to change the // checkbox state if (!mOneTimeSyncMode) { if (ActivityManager.isUserAMonkey()) { Log.d("SyncState", "ignoring monkey's attempt to flip sync state"); } else { super.onClick(); } } } public Account getAccount() { return mAccount; Loading Loading
src/com/android/settings/DataUsageSummary.java +5 −1 Original line number Diff line number Diff line Loading @@ -553,7 +553,11 @@ public class DataUsageSummary extends Fragment { return true; } case R.id.data_usage_menu_auto_sync: { if (ActivityManager.isUserAMonkey()) { Log.d("SyncState", "ignoring monkey's attempt to flip global sync state"); } else { ConfirmAutoSyncChangeFragment.show(this, !item.isChecked()); } return true; } } Loading
src/com/android/settings/accounts/SyncSettings.java +6 −1 Original line number Diff line number Diff line Loading @@ -20,6 +20,7 @@ import android.accounts.Account; import android.accounts.AccountManager; import android.accounts.OnAccountsUpdateListener; import android.app.Activity; import android.app.ActivityManager; import android.content.ContentResolver; import android.content.Intent; import android.graphics.drawable.Drawable; Loading Loading @@ -56,7 +57,11 @@ public class SyncSettings extends AccountPreferenceBase mAutoSyncPreference.setOnPreferenceChangeListener(new OnPreferenceChangeListener() { @Override public boolean onPreferenceChange(Preference preference, Object newValue) { if (ActivityManager.isUserAMonkey()) { Log.d("SyncSettings", "ignoring monkey's attempt to flip sync state"); } else { ContentResolver.setMasterSyncAutomatically((Boolean) newValue); } return true; } }); Loading
src/com/android/settings/accounts/SyncStateCheckBoxPreference.java +7 −1 Original line number Diff line number Diff line Loading @@ -17,9 +17,11 @@ package com.android.settings.accounts; import android.accounts.Account; import android.app.ActivityManager; import android.content.Context; import android.preference.CheckBoxPreference; import android.util.AttributeSet; import android.util.Log; import android.view.View; import android.widget.TextView; Loading Loading @@ -131,9 +133,13 @@ public class SyncStateCheckBoxPreference extends CheckBoxPreference { // When we're in one-time sync mode, we don't want a click to change the // checkbox state if (!mOneTimeSyncMode) { if (ActivityManager.isUserAMonkey()) { Log.d("SyncState", "ignoring monkey's attempt to flip sync state"); } else { super.onClick(); } } } public Account getAccount() { return mAccount; Loading