Fix debug logging controls

* Assign "enable exchange parser logging" from Eas.PARSER_LOG instead
  of from EAS.USER_LOG.
* Reorder setup to assign listeners last;  This avoids unnecessary calls
  to Email.updateLoggingFlags() during setup.

Note:  The bug exists as far back as eclair, but the fix will need to be
made in a different file in earlier versions (pre DebugFragment)

Bug: 3003813
Change-Id: I5d8f66747a86139dd593ac16ea421ab1e33b8795
This commit is contained in:
Andrew Stadler 2010-09-15 11:06:03 -07:00
parent cc91619b6a
commit e36b6ff4fa
1 changed files with 7 additions and 3 deletions

View File

@ -58,16 +58,20 @@ public class DebugFragment extends Fragment implements OnCheckedChangeListener {
context.getString(R.string.build_number)));
mEnableDebugLoggingView = (CheckBox) view.findViewById(R.id.debug_logging);
mEnableDebugLoggingView.setOnCheckedChangeListener(this);
mEnableDebugLoggingView.setChecked(Email.DEBUG);
//EXCHANGE-REMOVE-SECTION-START
mEnableExchangeLoggingView = (CheckBox) view.findViewById(R.id.exchange_logging);
mEnableExchangeFileLoggingView = (CheckBox) view.findViewById(R.id.exchange_file_logging);
mEnableExchangeLoggingView.setChecked(Eas.PARSER_LOG);
mEnableExchangeFileLoggingView.setChecked(Eas.FILE_LOG);
//EXCHANGE-REMOVE-SECTION-END
// Note: To prevent recursion while presetting checkboxes, assign all listeners last
mEnableDebugLoggingView.setOnCheckedChangeListener(this);
//EXCHANGE-REMOVE-SECTION-START
mEnableExchangeLoggingView.setOnCheckedChangeListener(this);
mEnableExchangeFileLoggingView.setOnCheckedChangeListener(this);
mEnableExchangeLoggingView.setChecked(Eas.USER_LOG);
mEnableExchangeFileLoggingView.setChecked(Eas.FILE_LOG);
//EXCHANGE-REMOVE-SECTION-END
return view;