FileDocCategorySizeDatePackage
Debug.javaAPI DocAndroid 1.5 API3065Wed May 06 22:42:46 BST 2009com.android.email.activity

Debug

public class Debug extends android.app.Activity implements android.widget.CompoundButton.OnCheckedChangeListener

Fields Summary
private android.widget.TextView
mVersionView
private android.widget.CheckBox
mEnableDebugLoggingView
private android.widget.CheckBox
mEnableSensitiveLoggingView
private com.android.email.Preferences
mPreferences
Constructors Summary
Methods Summary
public voidonCheckedChanged(android.widget.CompoundButton buttonView, boolean isChecked)

        if (buttonView.getId() == R.id.debug_logging) {
            Email.DEBUG = isChecked;
            mPreferences.setEnableDebugLogging(Email.DEBUG);
        } else if (buttonView.getId() == R.id.sensitive_logging) {
            Email.DEBUG_SENSITIVE = isChecked;
            mPreferences.setEnableSensitiveLogging(Email.DEBUG_SENSITIVE);
        }
    
public voidonCreate(android.os.Bundle savedInstanceState)

        super.onCreate(savedInstanceState);

        setContentView(R.layout.debug);

        mPreferences = Preferences.getPreferences(this);

        mVersionView = (TextView)findViewById(R.id.version);
        mEnableDebugLoggingView = (CheckBox)findViewById(R.id.debug_logging);
        mEnableSensitiveLoggingView = (CheckBox)findViewById(R.id.sensitive_logging);

        mEnableDebugLoggingView.setOnCheckedChangeListener(this);
        mEnableSensitiveLoggingView.setOnCheckedChangeListener(this);

        mVersionView.setText(String.format(getString(R.string.debug_version_fmt).toString(),
                getString(R.string.build_number)));

        mEnableDebugLoggingView.setChecked(Email.DEBUG);
        mEnableSensitiveLoggingView.setChecked(Email.DEBUG_SENSITIVE);
    
public booleanonCreateOptionsMenu(android.view.Menu menu)

        super.onCreateOptionsMenu(menu);
        getMenuInflater().inflate(R.menu.debug_option, menu);
        return true;
    
public booleanonOptionsItemSelected(android.view.MenuItem item)

        int id = item.getItemId();
        if (id == R.id.dump_settings) {
            Preferences.getPreferences(this).dump();
            return true;
        }
        return super.onOptionsItemSelected(item);