Move some of the log constants from Email to Logging

Change-Id: If9f4e4e3adcdef897a0d6a4e153bb446a8b24fdd
This commit is contained in:
Makoto Onuki 2011-05-13 11:20:04 -07:00
parent 8c9167027f
commit bfac9f2e8a
28 changed files with 150 additions and 153 deletions

View File

@ -18,4 +18,28 @@ package com.android.emailcommon;
public class Logging {
public static final String LOG_TAG = "Email";
/**
* Set this to 'true' to enable as much Email logging as possible.
*/
public static final boolean LOGD;
/**
* If this is enabled then logging that normally hides sensitive information
* like passwords will show that information.
*/
public static final boolean DEBUG_SENSITIVE;
/**
* If true, logging regarding activity/fragment lifecycle will be enabled.
*/
public static final boolean DEBUG_LIFECYCLE;
static {
// Declare values here to avoid dead code warnings; it means we have some extra
// "if" statements in the byte code that always evaluate to "if (false)"
LOGD = false; // DO NOT CHECK IN WITH TRUE
DEBUG_SENSITIVE = false; // DO NOT CHECK IN WITH TRUE
DEBUG_LIFECYCLE = false; // DO NOT CHECK IN WITH TRUE
}
}

View File

@ -555,7 +555,7 @@ public class Controller {
}
if (accountId == -1) {
// probably the message was not found
if (Email.LOGD) {
if (Logging.LOGD) {
Email.log("no account found for message " + messageId);
}
return;

View File

@ -37,33 +37,6 @@ import android.database.Cursor;
import android.util.Log;
public class Email extends Application {
// TODO Move the various DEBUG_ fields to the Logging class
/**
* If true, logging regarding activity/fragment lifecycle will be enabled.
* Do not check in as "true".
*/
public static final boolean DEBUG_LIFECYCLE;
/**
* If this is enabled then logging that normally hides sensitive information
* like passwords will show that information.
*/
public static final boolean DEBUG_SENSITIVE;
/**
* Set this to 'true' to enable as much Email logging as possible.
* Do not check-in with it set to 'true'!
*/
public static final boolean LOGD;
static {
// Declare values here to avoid dead code warnings; it means we have some extra
// "if" statements in the byte code that always evaluate to "if (false)"
DEBUG_LIFECYCLE = false;
DEBUG_SENSITIVE = false;
LOGD = false;
}
/**
* If this is enabled there will be additional logging information sent to
* Log.d, including protocol dumps.

View File

@ -345,7 +345,7 @@ public class MessagingController implements Runnable {
// Clear authentication notification for this account
nc.cancelLoginFailedNotification(account.mId);
} catch (MessagingException e) {
if (Email.LOGD) {
if (Logging.LOGD) {
Log.v(Logging.LOG_TAG, "synchronizeMailbox", e);
}
if (e instanceof AuthenticationFailedException) {
@ -864,7 +864,7 @@ public class MessagingController implements Runnable {
processPendingActionsSynchronous(account);
}
catch (MessagingException me) {
if (Email.LOGD) {
if (Logging.LOGD) {
Log.v(Logging.LOG_TAG, "processPendingActions", me);
}
/*
@ -1683,7 +1683,7 @@ public class MessagingController implements Runnable {
mListeners.loadMessageForViewFinished(messageId);
} catch (MessagingException me) {
if (Email.LOGD) Log.v(Logging.LOG_TAG, "", me);
if (Logging.LOGD) Log.v(Logging.LOG_TAG, "", me);
mListeners.loadMessageForViewFailed(messageId, me.getMessage());
} catch (RuntimeException rte) {
mListeners.loadMessageForViewFailed(messageId, rte.getMessage());
@ -1781,7 +1781,7 @@ public class MessagingController implements Runnable {
mListeners.loadAttachmentFinished(accountId, messageId, attachmentId);
}
catch (MessagingException me) {
if (Email.LOGD) Log.v(Logging.LOG_TAG, "", me);
if (Logging.LOGD) Log.v(Logging.LOG_TAG, "", me);
mListeners.loadAttachmentFailed(
accountId, messageId, attachmentId, me, background);
} catch (IOException ioe) {

View File

@ -189,7 +189,7 @@ public class Preferences {
}
public void dump() {
if (Email.LOGD) {
if (Logging.LOGD) {
for (String key : mSharedPreferences.getAll().keySet()) {
Log.v(Logging.LOG_TAG, key + " = " + mSharedPreferences.getAll().get(key));
}

View File

@ -171,7 +171,7 @@ public class EmailActivity extends Activity implements View.OnClickListener {
@Override
protected void onCreate(Bundle savedInstanceState) {
if (Email.DEBUG_LIFECYCLE && Email.DEBUG) Log.d(Logging.LOG_TAG, "" + this + " onCreate");
if (Logging.DEBUG_LIFECYCLE && Email.DEBUG) Log.d(Logging.LOG_TAG, this + " onCreate");
// UIController is used in onPrepareOptionsMenu(), which can be called from within
// super.onCreate(), so we need to initialize it here.
@ -215,7 +215,7 @@ public class EmailActivity extends Activity implements View.OnClickListener {
final long accountId = i.getLongExtra(EXTRA_ACCOUNT_ID, -1);
final long mailboxId = i.getLongExtra(EXTRA_MAILBOX_ID, -1);
final long messageId = i.getLongExtra(EXTRA_MESSAGE_ID, -1);
if (Email.DEBUG_LIFECYCLE && Email.DEBUG) {
if (Logging.DEBUG_LIFECYCLE && Email.DEBUG) {
Log.d(Logging.LOG_TAG, String.format("initFromIntent: %d %d", accountId, mailboxId));
}
@ -226,8 +226,8 @@ public class EmailActivity extends Activity implements View.OnClickListener {
@Override
protected void onSaveInstanceState(Bundle outState) {
if (Email.DEBUG_LIFECYCLE && Email.DEBUG) {
Log.d(Logging.LOG_TAG, "" + this + " onSaveInstanceState");
if (Logging.DEBUG_LIFECYCLE && Email.DEBUG) {
Log.d(Logging.LOG_TAG, this + " onSaveInstanceState");
}
super.onSaveInstanceState(outState);
mUIController.onSaveInstanceState(outState);
@ -235,8 +235,8 @@ public class EmailActivity extends Activity implements View.OnClickListener {
@Override
public void onAttachFragment(Fragment fragment) {
if (Email.DEBUG_LIFECYCLE && Email.DEBUG) {
Log.d(Logging.LOG_TAG, "" + this + " onAttachFragment fragment=" + fragment);
if (Logging.DEBUG_LIFECYCLE && Email.DEBUG) {
Log.d(Logging.LOG_TAG, this + " onAttachFragment fragment=" + fragment);
}
super.onAttachFragment(fragment);
mUIController.onAttachFragment(fragment);
@ -244,7 +244,7 @@ public class EmailActivity extends Activity implements View.OnClickListener {
@Override
protected void onStart() {
if (Email.DEBUG_LIFECYCLE && Email.DEBUG) Log.d(Logging.LOG_TAG, "" + this + " onStart");
if (Logging.DEBUG_LIFECYCLE && Email.DEBUG) Log.d(Logging.LOG_TAG, this + " onStart");
super.onStart();
mUIController.onActivityStart();
@ -293,7 +293,7 @@ public class EmailActivity extends Activity implements View.OnClickListener {
@Override
protected void onResume() {
if (Email.DEBUG_LIFECYCLE && Email.DEBUG) Log.d(Logging.LOG_TAG, "" + this + " onResume");
if (Logging.DEBUG_LIFECYCLE && Email.DEBUG) Log.d(Logging.LOG_TAG, this + " onResume");
super.onResume();
mUIController.onActivityResume();
/**
@ -306,21 +306,21 @@ public class EmailActivity extends Activity implements View.OnClickListener {
@Override
protected void onPause() {
if (Email.DEBUG_LIFECYCLE && Email.DEBUG) Log.d(Logging.LOG_TAG, "" + this + " onPause");
if (Logging.DEBUG_LIFECYCLE && Email.DEBUG) Log.d(Logging.LOG_TAG, this + " onPause");
super.onPause();
mUIController.onActivityPause();
}
@Override
protected void onStop() {
if (Email.DEBUG_LIFECYCLE && Email.DEBUG) Log.d(Logging.LOG_TAG, "" + this + " onStop");
if (Logging.DEBUG_LIFECYCLE && Email.DEBUG) Log.d(Logging.LOG_TAG, this + " onStop");
super.onStop();
mUIController.onActivityStop();
}
@Override
protected void onDestroy() {
if (Email.DEBUG_LIFECYCLE && Email.DEBUG) Log.d(Logging.LOG_TAG, "" + this + " onDestroy");
if (Logging.DEBUG_LIFECYCLE && Email.DEBUG) Log.d(Logging.LOG_TAG, this + " onDestroy");
mController.removeResultCallback(mControllerResult);
mTaskTracker.cancellAllInterrupt();
mUIController.onActivityDestroy();
@ -329,8 +329,8 @@ public class EmailActivity extends Activity implements View.OnClickListener {
@Override
public void onBackPressed() {
if (Email.DEBUG_LIFECYCLE && Email.DEBUG) {
Log.d(Logging.LOG_TAG, "" + this + " onBackPressed");
if (Logging.DEBUG_LIFECYCLE && Email.DEBUG) {
Log.d(Logging.LOG_TAG, this + " onBackPressed");
}
if (!mUIController.onBackPressed(true)) {
// Not handled by UIController -- perform the default. i.e. close the app.

View File

@ -229,7 +229,7 @@ public class MailboxFinder {
}
return;
case RESULT_MAILBOX_FOUND:
if (Email.DEBUG_LIFECYCLE && Email.DEBUG) {
if (Logging.DEBUG_LIFECYCLE && Email.DEBUG) {
Log.d(Logging.LOG_TAG, "MailboxFinder: mailbox found: id=" + mailboxId);
}
try {

View File

@ -170,7 +170,7 @@ import android.widget.TextView;
* contained by this parent mailbox.
*/
public static Loader<Cursor> createLoader(Context context, long accountId, long parentKey) {
if (Email.DEBUG_LIFECYCLE && Email.DEBUG) {
if (Logging.DEBUG_LIFECYCLE && Email.DEBUG) {
Log.d(Logging.LOG_TAG, "MailboxFragmentAdapter#createLoader accountId=" + accountId);
}
if (accountId != Account.ACCOUNT_ID_COMBINED_VIEW) {

View File

@ -217,7 +217,7 @@ public class MailboxListFragment extends ListFragment implements OnItemClickList
*/
@Override
public void onCreate(Bundle savedInstanceState) {
if (Email.DEBUG_LIFECYCLE && Email.DEBUG) {
if (Logging.DEBUG_LIFECYCLE && Email.DEBUG) {
Log.d(Logging.LOG_TAG, "MailboxListFragment onCreate");
}
super.onCreate(savedInstanceState);
@ -243,7 +243,7 @@ public class MailboxListFragment extends ListFragment implements OnItemClickList
@Override
public void onActivityCreated(Bundle savedInstanceState) {
if (Email.DEBUG_LIFECYCLE && Email.DEBUG) {
if (Logging.DEBUG_LIFECYCLE && Email.DEBUG) {
Log.d(Logging.LOG_TAG, "MailboxListFragment onActivityCreated");
}
super.onActivityCreated(savedInstanceState);
@ -277,7 +277,7 @@ public class MailboxListFragment extends ListFragment implements OnItemClickList
*/
// STOPSHIP Make it private once phone activities are gone
void openMailboxes(long accountId, long parentMailboxId) {
if (Email.DEBUG_LIFECYCLE && Email.DEBUG) {
if (Logging.DEBUG_LIFECYCLE && Email.DEBUG) {
Log.d(Logging.LOG_TAG, "MailboxListFragment openMailboxes");
}
if (accountId == -1) {
@ -319,7 +319,7 @@ public class MailboxListFragment extends ListFragment implements OnItemClickList
*/
@Override
public void onStart() {
if (Email.DEBUG_LIFECYCLE && Email.DEBUG) {
if (Logging.DEBUG_LIFECYCLE && Email.DEBUG) {
Log.d(Logging.LOG_TAG, "MailboxListFragment onStart");
}
super.onStart();
@ -330,7 +330,7 @@ public class MailboxListFragment extends ListFragment implements OnItemClickList
*/
@Override
public void onResume() {
if (Email.DEBUG_LIFECYCLE && Email.DEBUG) {
if (Logging.DEBUG_LIFECYCLE && Email.DEBUG) {
Log.d(Logging.LOG_TAG, "MailboxListFragment onResume");
}
super.onResume();
@ -345,7 +345,7 @@ public class MailboxListFragment extends ListFragment implements OnItemClickList
@Override
public void onPause() {
if (Email.DEBUG_LIFECYCLE && Email.DEBUG) {
if (Logging.DEBUG_LIFECYCLE && Email.DEBUG) {
Log.d(Logging.LOG_TAG, "MailboxListFragment onPause");
}
mResumed = false;
@ -358,7 +358,7 @@ public class MailboxListFragment extends ListFragment implements OnItemClickList
*/
@Override
public void onStop() {
if (Email.DEBUG_LIFECYCLE && Email.DEBUG) {
if (Logging.DEBUG_LIFECYCLE && Email.DEBUG) {
Log.d(Logging.LOG_TAG, "MailboxListFragment onStop");
}
super.onStop();
@ -369,7 +369,7 @@ public class MailboxListFragment extends ListFragment implements OnItemClickList
*/
@Override
public void onDestroy() {
if (Email.DEBUG_LIFECYCLE && Email.DEBUG) {
if (Logging.DEBUG_LIFECYCLE && Email.DEBUG) {
Log.d(Logging.LOG_TAG, "MailboxListFragment onDestroy");
}
super.onDestroy();
@ -377,7 +377,7 @@ public class MailboxListFragment extends ListFragment implements OnItemClickList
@Override
public void onSaveInstanceState(Bundle outState) {
if (Email.DEBUG_LIFECYCLE && Email.DEBUG) {
if (Logging.DEBUG_LIFECYCLE && Email.DEBUG) {
Log.d(Logging.LOG_TAG, "MailboxListFragment onSaveInstanceState");
}
super.onSaveInstanceState(outState);
@ -386,7 +386,7 @@ public class MailboxListFragment extends ListFragment implements OnItemClickList
}
private void restoreInstanceState(Bundle savedInstanceState) {
if (Email.DEBUG_LIFECYCLE && Email.DEBUG) {
if (Logging.DEBUG_LIFECYCLE && Email.DEBUG) {
Log.d(Logging.LOG_TAG, "MailboxListFragment restoreInstanceState");
}
mSelectedMailboxId = savedInstanceState.getLong(BUNDLE_KEY_SELECTED_MAILBOX_ID);
@ -394,7 +394,7 @@ public class MailboxListFragment extends ListFragment implements OnItemClickList
}
private void startLoading() {
if (Email.DEBUG_LIFECYCLE && Email.DEBUG) {
if (Logging.DEBUG_LIFECYCLE && Email.DEBUG) {
Log.d(Logging.LOG_TAG, "MailboxListFragment startLoading");
}
// Clear the list. (ListFragment will show the "Loading" animation)
@ -411,7 +411,7 @@ public class MailboxListFragment extends ListFragment implements OnItemClickList
@Override
public Loader<Cursor> onCreateLoader(int id, Bundle args) {
if (Email.DEBUG_LIFECYCLE && Email.DEBUG) {
if (Logging.DEBUG_LIFECYCLE && Email.DEBUG) {
Log.d(Logging.LOG_TAG, "MailboxListFragment onCreateLoader");
}
mIsFirstLoad = true;
@ -420,7 +420,7 @@ public class MailboxListFragment extends ListFragment implements OnItemClickList
@Override
public void onLoadFinished(Loader<Cursor> loader, Cursor cursor) {
if (Email.DEBUG_LIFECYCLE && Email.DEBUG) {
if (Logging.DEBUG_LIFECYCLE && Email.DEBUG) {
Log.d(Logging.LOG_TAG, "MailboxListFragment onLoadFinished");
}
// Save list view state (primarily scroll position)

View File

@ -110,7 +110,7 @@ class MailboxMoveToAdapter extends CursorAdapter {
}
static Loader<Cursor> createLoader(Context context, long accountId) {
if (Email.DEBUG_LIFECYCLE && Email.DEBUG) {
if (Logging.DEBUG_LIFECYCLE && Email.DEBUG) {
Log.d(Logging.LOG_TAG, "MailboxDialogAdapter#createLoader accountId=" + accountId);
}
return new MailboxMoveToLoader(context, accountId);

View File

@ -65,7 +65,7 @@ public class MessageFileViewFragment extends MessageViewFragmentBase {
/** Called by activities with a URI to an EML file. */
public void openMessage(Uri fileEmailUri) {
if (Email.DEBUG_LIFECYCLE && Email.DEBUG) {
if (Logging.DEBUG_LIFECYCLE && Email.DEBUG) {
Log.d(Logging.LOG_TAG, "MessageFileViewFragment openMessage");
}
if (mFileEmailUri != null) {
@ -95,7 +95,7 @@ public class MessageFileViewFragment extends MessageViewFragmentBase {
*/
@Override
protected Message openMessageSync(Activity activity) {
if (Email.DEBUG_LIFECYCLE && Email.DEBUG) {
if (Logging.DEBUG_LIFECYCLE && Email.DEBUG) {
Log.d(Logging.LOG_TAG, "MessageFileViewFragment openMessageSync");
}
Uri messageUri = mFileEmailUri;

View File

@ -239,7 +239,7 @@ public class MessageListFragment extends ListFragment
@Override
public void onCreate(Bundle savedInstanceState) {
if (Email.DEBUG_LIFECYCLE && Email.DEBUG) {
if (Logging.DEBUG_LIFECYCLE && Email.DEBUG) {
Log.d(Logging.LOG_TAG, "MessageListFragment onCreate");
}
super.onCreate(savedInstanceState);
@ -262,7 +262,7 @@ public class MessageListFragment extends ListFragment
@Override
public void onActivityCreated(Bundle savedInstanceState) {
if (Email.DEBUG_LIFECYCLE && Email.DEBUG) {
if (Logging.DEBUG_LIFECYCLE && Email.DEBUG) {
Log.d(Logging.LOG_TAG, "MessageListFragment onActivityCreated");
}
super.onActivityCreated(savedInstanceState);
@ -293,7 +293,7 @@ public class MessageListFragment extends ListFragment
@Override
public void onStart() {
if (Email.DEBUG_LIFECYCLE && Email.DEBUG) {
if (Logging.DEBUG_LIFECYCLE && Email.DEBUG) {
Log.d(Logging.LOG_TAG, "MessageListFragment onStart");
}
super.onStart();
@ -301,7 +301,7 @@ public class MessageListFragment extends ListFragment
@Override
public void onResume() {
if (Email.DEBUG_LIFECYCLE && Email.DEBUG) {
if (Logging.DEBUG_LIFECYCLE && Email.DEBUG) {
Log.d(Logging.LOG_TAG, "MessageListFragment onResume");
}
super.onResume();
@ -317,7 +317,7 @@ public class MessageListFragment extends ListFragment
@Override
public void onPause() {
if (Email.DEBUG_LIFECYCLE && Email.DEBUG) {
if (Logging.DEBUG_LIFECYCLE && Email.DEBUG) {
Log.d(Logging.LOG_TAG, "MessageListFragment onPause");
}
mResumed = false;
@ -328,7 +328,7 @@ public class MessageListFragment extends ListFragment
@Override
public void onStop() {
if (Email.DEBUG_LIFECYCLE && Email.DEBUG) {
if (Logging.DEBUG_LIFECYCLE && Email.DEBUG) {
Log.d(Logging.LOG_TAG, "MessageListFragment onStop");
}
super.onStop();
@ -336,7 +336,7 @@ public class MessageListFragment extends ListFragment
@Override
public void onDestroy() {
if (Email.DEBUG_LIFECYCLE && Email.DEBUG) {
if (Logging.DEBUG_LIFECYCLE && Email.DEBUG) {
Log.d(Logging.LOG_TAG, "MessageListFragment onDestroy");
}
mTaskTracker.cancellAllInterrupt();
@ -352,7 +352,7 @@ public class MessageListFragment extends ListFragment
@Override
public void onSaveInstanceState(Bundle outState) {
if (Email.DEBUG_LIFECYCLE && Email.DEBUG) {
if (Logging.DEBUG_LIFECYCLE && Email.DEBUG) {
Log.d(Logging.LOG_TAG, "MessageListFragment onSaveInstanceState");
}
super.onSaveInstanceState(outState);
@ -363,7 +363,7 @@ public class MessageListFragment extends ListFragment
@VisibleForTesting
void restoreInstanceState(Bundle savedInstanceState) {
if (Email.DEBUG_LIFECYCLE && Email.DEBUG) {
if (Logging.DEBUG_LIFECYCLE && Email.DEBUG) {
Log.d(Logging.LOG_TAG, "MessageListFragment restoreInstanceState");
}
mListAdapter.loadState(savedInstanceState);
@ -416,7 +416,7 @@ public class MessageListFragment extends ListFragment
*/
// STOPSHIP Make it private once phone activities are gone
void openMailbox(long mailboxId) {
if (Email.DEBUG_LIFECYCLE && Email.DEBUG) {
if (Logging.DEBUG_LIFECYCLE && Email.DEBUG) {
Log.d(Logging.LOG_TAG, "MessageListFragment openMailbox");
}
if (mailboxId == -1) {
@ -1093,7 +1093,7 @@ public class MessageListFragment extends ListFragment
}
private void startLoading() {
if (Email.DEBUG_LIFECYCLE && Email.DEBUG) {
if (Logging.DEBUG_LIFECYCLE && Email.DEBUG) {
Log.d(Logging.LOG_TAG, "MessageListFragment startLoading");
}
mOpenRequested = false;
@ -1115,7 +1115,7 @@ public class MessageListFragment extends ListFragment
MailboxAccountLoader.Result> {
@Override
public Loader<MailboxAccountLoader.Result> onCreateLoader(int id, Bundle args) {
if (Email.DEBUG_LIFECYCLE && Email.DEBUG) {
if (Logging.DEBUG_LIFECYCLE && Email.DEBUG) {
Log.d(Logging.LOG_TAG,
"MessageListFragment onCreateLoader(mailbox) mailboxId=" + mMailboxId);
}
@ -1125,7 +1125,7 @@ public class MessageListFragment extends ListFragment
@Override
public void onLoadFinished(Loader<MailboxAccountLoader.Result> loader,
MailboxAccountLoader.Result result) {
if (Email.DEBUG_LIFECYCLE && Email.DEBUG) {
if (Logging.DEBUG_LIFECYCLE && Email.DEBUG) {
Log.d(Logging.LOG_TAG, "MessageListFragment onLoadFinished(mailbox) mailboxId="
+ mMailboxId);
}
@ -1156,7 +1156,7 @@ public class MessageListFragment extends ListFragment
@Override
public Loader<Cursor> onCreateLoader(int id, Bundle args) {
if (Email.DEBUG_LIFECYCLE && Email.DEBUG) {
if (Logging.DEBUG_LIFECYCLE && Email.DEBUG) {
Log.d(Logging.LOG_TAG,
"MessageListFragment onCreateLoader(messages) mailboxId=" + mMailboxId);
}
@ -1166,7 +1166,7 @@ public class MessageListFragment extends ListFragment
@Override
public void onLoadFinished(Loader<Cursor> loader, Cursor cursor) {
if (Email.DEBUG_LIFECYCLE && Email.DEBUG) {
if (Logging.DEBUG_LIFECYCLE && Email.DEBUG) {
Log.d(Logging.LOG_TAG,
"MessageListFragment onLoadFinished(messages) mailboxId=" + mMailboxId);
}

View File

@ -226,7 +226,7 @@ public class MessageViewFragment extends MessageViewFragmentBase
/** Called by activities to set an id of a message to open. */
// STOPSHIP Make it private once phone activities are gone
void openMessage(long messageId) {
if (Email.DEBUG_LIFECYCLE && Email.DEBUG) {
if (Logging.DEBUG_LIFECYCLE && Email.DEBUG) {
Log.d(Logging.LOG_TAG, "MessageViewFragment openMessage");
}
if (messageId == -1) {

View File

@ -257,7 +257,7 @@ public abstract class MessageViewFragmentBase extends Fragment implements View.O
@Override
public void onCreate(Bundle savedInstanceState) {
if (Email.DEBUG_LIFECYCLE && Email.DEBUG) {
if (Logging.DEBUG_LIFECYCLE && Email.DEBUG) {
Log.d(Logging.LOG_TAG, "MessageViewFragment onCreate");
}
super.onCreate(savedInstanceState);
@ -278,7 +278,7 @@ public abstract class MessageViewFragmentBase extends Fragment implements View.O
@Override
public View onCreateView(
LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
if (Email.DEBUG_LIFECYCLE && Email.DEBUG) {
if (Logging.DEBUG_LIFECYCLE && Email.DEBUG) {
Log.d(Logging.LOG_TAG, "MessageViewFragment onCreateView");
}
final View view = inflater.inflate(R.layout.message_view_fragment, container, false);
@ -329,7 +329,7 @@ public abstract class MessageViewFragmentBase extends Fragment implements View.O
@Override
public void onActivityCreated(Bundle savedInstanceState) {
if (Email.DEBUG_LIFECYCLE && Email.DEBUG) {
if (Logging.DEBUG_LIFECYCLE && Email.DEBUG) {
Log.d(Logging.LOG_TAG, "MessageViewFragment onActivityCreated");
}
super.onActivityCreated(savedInstanceState);
@ -338,7 +338,7 @@ public abstract class MessageViewFragmentBase extends Fragment implements View.O
@Override
public void onStart() {
if (Email.DEBUG_LIFECYCLE && Email.DEBUG) {
if (Logging.DEBUG_LIFECYCLE && Email.DEBUG) {
Log.d(Logging.LOG_TAG, "MessageViewFragment onStart");
}
super.onStart();
@ -346,7 +346,7 @@ public abstract class MessageViewFragmentBase extends Fragment implements View.O
@Override
public void onResume() {
if (Email.DEBUG_LIFECYCLE && Email.DEBUG) {
if (Logging.DEBUG_LIFECYCLE && Email.DEBUG) {
Log.d(Logging.LOG_TAG, "MessageViewFragment onResume");
}
super.onResume();
@ -369,7 +369,7 @@ public abstract class MessageViewFragmentBase extends Fragment implements View.O
@Override
public void onPause() {
if (Email.DEBUG_LIFECYCLE && Email.DEBUG) {
if (Logging.DEBUG_LIFECYCLE && Email.DEBUG) {
Log.d(Logging.LOG_TAG, "MessageViewFragment onPause");
}
mResumed = false;
@ -378,7 +378,7 @@ public abstract class MessageViewFragmentBase extends Fragment implements View.O
@Override
public void onStop() {
if (Email.DEBUG_LIFECYCLE && Email.DEBUG) {
if (Logging.DEBUG_LIFECYCLE && Email.DEBUG) {
Log.d(Logging.LOG_TAG, "MessageViewFragment onStop");
}
super.onStop();
@ -386,7 +386,7 @@ public abstract class MessageViewFragmentBase extends Fragment implements View.O
@Override
public void onDestroy() {
if (Email.DEBUG_LIFECYCLE && Email.DEBUG) {
if (Logging.DEBUG_LIFECYCLE && Email.DEBUG) {
Log.d(Logging.LOG_TAG, "MessageViewFragment onDestroy");
}
mCallback.onMessageViewGone();
@ -399,7 +399,7 @@ public abstract class MessageViewFragmentBase extends Fragment implements View.O
@Override
public void onSaveInstanceState(Bundle outState) {
if (Email.DEBUG_LIFECYCLE && Email.DEBUG) {
if (Logging.DEBUG_LIFECYCLE && Email.DEBUG) {
Log.d(Logging.LOG_TAG, "MessageViewFragment onSaveInstanceState");
}
super.onSaveInstanceState(outState);
@ -408,7 +408,7 @@ public abstract class MessageViewFragmentBase extends Fragment implements View.O
}
private void restoreInstanceState(Bundle state) {
if (Email.DEBUG_LIFECYCLE && Email.DEBUG) {
if (Logging.DEBUG_LIFECYCLE && Email.DEBUG) {
Log.d(Logging.LOG_TAG, "MessageViewFragment restoreInstanceState");
}
// At this point (in onCreate) no tabs are visible (because we don't know if the message has

View File

@ -216,7 +216,7 @@ import java.util.Set;
}
public static Loader<Cursor> createLoader(Context context, long mailboxId) {
if (Email.DEBUG_LIFECYCLE && Email.DEBUG) {
if (Logging.DEBUG_LIFECYCLE && Email.DEBUG) {
Log.d(Logging.LOG_TAG, "MessagesAdapter createLoader mailboxId=" + mailboxId);
}
return new MessagesCursorLoader(context, mailboxId);

View File

@ -94,7 +94,7 @@ public class MoveMessageToDialog extends DialogFragment implements DialogInterfa
@Override
public void onCreate(Bundle savedInstanceState) {
if (Email.DEBUG_LIFECYCLE && Email.DEBUG) {
if (Logging.DEBUG_LIFECYCLE && Email.DEBUG) {
Log.d(Logging.LOG_TAG, "" + this + " onCreate target=" + getTargetFragment());
}
super.onCreate(savedInstanceState);

View File

@ -110,7 +110,7 @@ abstract class UIControllerBase {
* the constructor.)
*/
public void onActivityViewReady() {
if (Email.DEBUG_LIFECYCLE && Email.DEBUG) {
if (Logging.DEBUG_LIFECYCLE && Email.DEBUG) {
Log.d(Logging.LOG_TAG, this + " onActivityViewReady");
}
}
@ -119,7 +119,7 @@ abstract class UIControllerBase {
* Called at the end of {@link EmailActivity#onCreate}.
*/
public void onActivityCreated() {
if (Email.DEBUG_LIFECYCLE && Email.DEBUG) {
if (Logging.DEBUG_LIFECYCLE && Email.DEBUG) {
Log.d(Logging.LOG_TAG, this + " onActivityCreated");
}
mRefreshManager.registerListener(mRefreshListener);
@ -129,7 +129,7 @@ abstract class UIControllerBase {
* Handles the {@link android.app.Activity#onStart} callback.
*/
public void onActivityStart() {
if (Email.DEBUG_LIFECYCLE && Email.DEBUG) {
if (Logging.DEBUG_LIFECYCLE && Email.DEBUG) {
Log.d(Logging.LOG_TAG, this + " onActivityStart");
}
}
@ -138,7 +138,7 @@ abstract class UIControllerBase {
* Handles the {@link android.app.Activity#onResume} callback.
*/
public void onActivityResume() {
if (Email.DEBUG_LIFECYCLE && Email.DEBUG) {
if (Logging.DEBUG_LIFECYCLE && Email.DEBUG) {
Log.d(Logging.LOG_TAG, this + " onActivityResume");
}
}
@ -147,7 +147,7 @@ abstract class UIControllerBase {
* Handles the {@link android.app.Activity#onPause} callback.
*/
public void onActivityPause() {
if (Email.DEBUG_LIFECYCLE && Email.DEBUG) {
if (Logging.DEBUG_LIFECYCLE && Email.DEBUG) {
Log.d(Logging.LOG_TAG, this + " onActivityPause");
}
}
@ -156,7 +156,7 @@ abstract class UIControllerBase {
* Handles the {@link android.app.Activity#onStop} callback.
*/
public void onActivityStop() {
if (Email.DEBUG_LIFECYCLE && Email.DEBUG) {
if (Logging.DEBUG_LIFECYCLE && Email.DEBUG) {
Log.d(Logging.LOG_TAG, this + " onActivityStop");
}
}
@ -165,7 +165,7 @@ abstract class UIControllerBase {
* Handles the {@link android.app.Activity#onDestroy} callback.
*/
public void onActivityDestroy() {
if (Email.DEBUG_LIFECYCLE && Email.DEBUG) {
if (Logging.DEBUG_LIFECYCLE && Email.DEBUG) {
Log.d(Logging.LOG_TAG, this + " onActivityDestroy");
}
mHoldFragmentInstallation = true; // No more fragment installation.
@ -179,7 +179,7 @@ abstract class UIControllerBase {
* Must be called at the end of {@link EmailActivity#onCreate}.
*/
public final void installRestoredFragments() {
if (Email.DEBUG_LIFECYCLE && Email.DEBUG) {
if (Logging.DEBUG_LIFECYCLE && Email.DEBUG) {
Log.d(Logging.LOG_TAG, this + " installRestoredFragments");
}
@ -196,7 +196,7 @@ abstract class UIControllerBase {
* Handles the {@link android.app.Activity#onSaveInstanceState} callback.
*/
public void onSaveInstanceState(Bundle outState) {
if (Email.DEBUG_LIFECYCLE && Email.DEBUG) {
if (Logging.DEBUG_LIFECYCLE && Email.DEBUG) {
Log.d(Logging.LOG_TAG, this + " onSaveInstanceState");
}
}
@ -205,7 +205,7 @@ abstract class UIControllerBase {
* Handles the {@link android.app.Activity#onRestoreInstanceState} callback.
*/
public void restoreInstanceState(Bundle savedInstanceState) {
if (Email.DEBUG_LIFECYCLE && Email.DEBUG) {
if (Logging.DEBUG_LIFECYCLE && Email.DEBUG) {
Log.d(Logging.LOG_TAG, this + " restoreInstanceState");
}
}
@ -227,7 +227,7 @@ abstract class UIControllerBase {
}
private void installFragment(Fragment fragment) {
if (Email.DEBUG_LIFECYCLE && Email.DEBUG) {
if (Logging.DEBUG_LIFECYCLE && Email.DEBUG) {
Log.d(Logging.LOG_TAG, this + " installFragment fragment=" + fragment);
}
if (fragment instanceof MailboxListFragment) {

View File

@ -360,7 +360,7 @@ class UIControllerOnePane extends UIControllerBase {
@Override
public void open(final long accountId, final long mailboxId, final long messageId) {
if (Email.DEBUG_LIFECYCLE && Email.DEBUG) {
if (Logging.DEBUG_LIFECYCLE && Email.DEBUG) {
Log.d(Logging.LOG_TAG, this + " open accountId=" + accountId
+ " mailboxId=" + mailboxId + " messageId=" + messageId);
}

View File

@ -127,7 +127,7 @@ class UIControllerTwoPane extends UIControllerBase implements
// MailboxFinder$Callback
@Override
public void onAccountNotFound() {
if (Email.DEBUG_LIFECYCLE && Email.DEBUG) {
if (Logging.DEBUG_LIFECYCLE && Email.DEBUG) {
Log.d(Logging.LOG_TAG, this + " onAccountNotFound()");
}
// Shouldn't happen
@ -135,7 +135,7 @@ class UIControllerTwoPane extends UIControllerBase implements
@Override
public void onAccountSecurityHold(long accountId) {
if (Email.DEBUG_LIFECYCLE && Email.DEBUG) {
if (Logging.DEBUG_LIFECYCLE && Email.DEBUG) {
Log.d(Logging.LOG_TAG, this + " onAccountSecurityHold()");
}
mActivity.startActivity(AccountSecurity.actionUpdateSecurityIntent(mActivity, accountId,
@ -144,7 +144,7 @@ class UIControllerTwoPane extends UIControllerBase implements
@Override
public void onMailboxFound(long accountId, long mailboxId) {
if (Email.DEBUG_LIFECYCLE && Email.DEBUG) {
if (Logging.DEBUG_LIFECYCLE && Email.DEBUG) {
Log.d(Logging.LOG_TAG, this + " onMailboxFound()");
}
updateMessageList(mailboxId, true, true);
@ -152,7 +152,7 @@ class UIControllerTwoPane extends UIControllerBase implements
@Override
public void onMailboxNotFound(long accountId) {
if (Email.DEBUG_LIFECYCLE && Email.DEBUG) {
if (Logging.DEBUG_LIFECYCLE && Email.DEBUG) {
Log.d(Logging.LOG_TAG, this + " onMailboxNotFound()");
}
// TODO: handle more gracefully.
@ -610,7 +610,7 @@ class UIControllerTwoPane extends UIControllerBase implements
*/
@Override
public void open(long accountId, long mailboxId, long messageId) {
if (Email.DEBUG_LIFECYCLE && Email.DEBUG) {
if (Logging.DEBUG_LIFECYCLE && Email.DEBUG) {
Log.d(Logging.LOG_TAG, this + " open accountId=" + accountId
+ " mailboxId=" + mailboxId + " messageId=" + messageId);
}
@ -674,7 +674,7 @@ class UIControllerTwoPane extends UIControllerBase implements
private void updateMailboxList(long accountId, long parentMailboxId,
boolean changeVisiblePane, boolean clearDependentPane) {
if (Email.DEBUG_LIFECYCLE && Email.DEBUG) {
if (Logging.DEBUG_LIFECYCLE && Email.DEBUG) {
Log.d(Logging.LOG_TAG, this + " updateMailboxList accountId=" + accountId
+ " parentMailboxId=" + parentMailboxId);
}
@ -730,7 +730,7 @@ class UIControllerTwoPane extends UIControllerBase implements
*/
private void updateMessageList(long mailboxId, boolean changeVisiblePane,
boolean clearDependentPane) {
if (Email.DEBUG_LIFECYCLE && Email.DEBUG) {
if (Logging.DEBUG_LIFECYCLE && Email.DEBUG) {
Log.d(Logging.LOG_TAG, this + " updateMessageList mMailboxId=" + mailboxId);
}
preFragmentTransactionCheck();
@ -767,7 +767,7 @@ class UIControllerTwoPane extends UIControllerBase implements
* @param messageId ID of the mailbox to load. Must never be {@link #NO_MESSAGE}.
*/
private void updateMessageView(long messageId) {
if (Email.DEBUG_LIFECYCLE && Email.DEBUG) {
if (Logging.DEBUG_LIFECYCLE && Email.DEBUG) {
Log.d(Logging.LOG_TAG, this + " updateMessageView messageId=" + messageId);
}
preFragmentTransactionCheck();

View File

@ -170,7 +170,7 @@ public class AccountSettingsFragment extends PreferenceFragment {
*/
@Override
public void onCreate(Bundle savedInstanceState) {
if (Email.DEBUG_LIFECYCLE && Email.DEBUG) {
if (Logging.DEBUG_LIFECYCLE && Email.DEBUG) {
Log.d(Logging.LOG_TAG, "AccountSettingsFragment onCreate");
}
super.onCreate(savedInstanceState);
@ -193,7 +193,7 @@ public class AccountSettingsFragment extends PreferenceFragment {
@Override
public void onActivityCreated(Bundle savedInstanceState) {
if (Email.DEBUG_LIFECYCLE && Email.DEBUG) {
if (Logging.DEBUG_LIFECYCLE && Email.DEBUG) {
Log.d(Logging.LOG_TAG, "AccountSettingsFragment onActivityCreated");
}
super.onActivityCreated(savedInstanceState);
@ -204,7 +204,7 @@ public class AccountSettingsFragment extends PreferenceFragment {
*/
@Override
public void onStart() {
if (Email.DEBUG_LIFECYCLE && Email.DEBUG) {
if (Logging.DEBUG_LIFECYCLE && Email.DEBUG) {
Log.d(Logging.LOG_TAG, "AccountSettingsFragment onStart");
}
super.onStart();
@ -223,7 +223,7 @@ public class AccountSettingsFragment extends PreferenceFragment {
*/
@Override
public void onResume() {
if (Email.DEBUG_LIFECYCLE && Email.DEBUG) {
if (Logging.DEBUG_LIFECYCLE && Email.DEBUG) {
Log.d(Logging.LOG_TAG, "AccountSettingsFragment onResume");
}
super.onResume();
@ -252,7 +252,7 @@ public class AccountSettingsFragment extends PreferenceFragment {
@Override
public void onPause() {
if (Email.DEBUG_LIFECYCLE && Email.DEBUG) {
if (Logging.DEBUG_LIFECYCLE && Email.DEBUG) {
Log.d(Logging.LOG_TAG, "AccountSettingsFragment onPause");
}
super.onPause();
@ -266,7 +266,7 @@ public class AccountSettingsFragment extends PreferenceFragment {
*/
@Override
public void onStop() {
if (Email.DEBUG_LIFECYCLE && Email.DEBUG) {
if (Logging.DEBUG_LIFECYCLE && Email.DEBUG) {
Log.d(Logging.LOG_TAG, "AccountSettingsFragment onStop");
}
super.onStop();
@ -278,7 +278,7 @@ public class AccountSettingsFragment extends PreferenceFragment {
*/
@Override
public void onDestroy() {
if (Email.DEBUG_LIFECYCLE && Email.DEBUG) {
if (Logging.DEBUG_LIFECYCLE && Email.DEBUG) {
Log.d(Logging.LOG_TAG, "AccountSettingsFragment onDestroy");
}
super.onDestroy();
@ -289,7 +289,7 @@ public class AccountSettingsFragment extends PreferenceFragment {
@Override
public void onSaveInstanceState(Bundle outState) {
if (Email.DEBUG_LIFECYCLE && Email.DEBUG) {
if (Logging.DEBUG_LIFECYCLE && Email.DEBUG) {
Log.d(Logging.LOG_TAG, "AccountSettingsFragment onSaveInstanceState");
}
super.onSaveInstanceState(outState);

View File

@ -78,7 +78,7 @@ public class AccountSetupExchangeFragment extends AccountServerBaseFragment
*/
@Override
public void onCreate(Bundle savedInstanceState) {
if (Email.DEBUG_LIFECYCLE && Email.DEBUG) {
if (Logging.DEBUG_LIFECYCLE && Email.DEBUG) {
Log.d(Logging.LOG_TAG, "AccountSetupExchangeFragment onCreate");
}
super.onCreate(savedInstanceState);
@ -93,7 +93,7 @@ public class AccountSetupExchangeFragment extends AccountServerBaseFragment
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
if (Email.DEBUG_LIFECYCLE && Email.DEBUG) {
if (Logging.DEBUG_LIFECYCLE && Email.DEBUG) {
Log.d(Logging.LOG_TAG, "AccountSetupExchangeFragment onCreateView");
}
int layoutId = mSettingsMode
@ -145,7 +145,7 @@ public class AccountSetupExchangeFragment extends AccountServerBaseFragment
@Override
public void onActivityCreated(Bundle savedInstanceState) {
if (Email.DEBUG_LIFECYCLE && Email.DEBUG) {
if (Logging.DEBUG_LIFECYCLE && Email.DEBUG) {
Log.d(Logging.LOG_TAG, "AccountSetupExchangeFragment onActivityCreated");
}
super.onActivityCreated(savedInstanceState);
@ -156,7 +156,7 @@ public class AccountSetupExchangeFragment extends AccountServerBaseFragment
*/
@Override
public void onStart() {
if (Email.DEBUG_LIFECYCLE && Email.DEBUG) {
if (Logging.DEBUG_LIFECYCLE && Email.DEBUG) {
Log.d(Logging.LOG_TAG, "AccountSetupExchangeFragment onStart");
}
super.onStart();
@ -169,7 +169,7 @@ public class AccountSetupExchangeFragment extends AccountServerBaseFragment
*/
@Override
public void onResume() {
if (Email.DEBUG_LIFECYCLE && Email.DEBUG) {
if (Logging.DEBUG_LIFECYCLE && Email.DEBUG) {
Log.d(Logging.LOG_TAG, "AccountSetupExchangeFragment onResume");
}
super.onResume();
@ -178,7 +178,7 @@ public class AccountSetupExchangeFragment extends AccountServerBaseFragment
@Override
public void onPause() {
if (Email.DEBUG_LIFECYCLE && Email.DEBUG) {
if (Logging.DEBUG_LIFECYCLE && Email.DEBUG) {
Log.d(Logging.LOG_TAG, "AccountSetupExchangeFragment onPause");
}
super.onPause();
@ -189,7 +189,7 @@ public class AccountSetupExchangeFragment extends AccountServerBaseFragment
*/
@Override
public void onStop() {
if (Email.DEBUG_LIFECYCLE && Email.DEBUG) {
if (Logging.DEBUG_LIFECYCLE && Email.DEBUG) {
Log.d(Logging.LOG_TAG, "AccountSetupExchangeFragment onStop");
}
super.onStop();
@ -201,7 +201,7 @@ public class AccountSetupExchangeFragment extends AccountServerBaseFragment
*/
@Override
public void onDestroy() {
if (Email.DEBUG_LIFECYCLE && Email.DEBUG) {
if (Logging.DEBUG_LIFECYCLE && Email.DEBUG) {
Log.d(Logging.LOG_TAG, "AccountSetupExchangeFragment onDestroy");
}
super.onDestroy();
@ -209,7 +209,7 @@ public class AccountSetupExchangeFragment extends AccountServerBaseFragment
@Override
public void onSaveInstanceState(Bundle outState) {
if (Email.DEBUG_LIFECYCLE && Email.DEBUG) {
if (Logging.DEBUG_LIFECYCLE && Email.DEBUG) {
Log.d(Logging.LOG_TAG, "AccountSetupExchangeFragment onSaveInstanceState");
}
super.onSaveInstanceState(outState);

View File

@ -87,7 +87,7 @@ public class AccountSetupIncomingFragment extends AccountServerBaseFragment {
*/
@Override
public void onCreate(Bundle savedInstanceState) {
if (Email.DEBUG_LIFECYCLE && Email.DEBUG) {
if (Logging.DEBUG_LIFECYCLE && Email.DEBUG) {
Log.d(Logging.LOG_TAG, "AccountSetupIncomingFragment onCreate");
}
super.onCreate(savedInstanceState);
@ -101,7 +101,7 @@ public class AccountSetupIncomingFragment extends AccountServerBaseFragment {
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
if (Email.DEBUG_LIFECYCLE && Email.DEBUG) {
if (Logging.DEBUG_LIFECYCLE && Email.DEBUG) {
Log.d(Logging.LOG_TAG, "AccountSetupIncomingFragment onCreateView");
}
int layoutId = mSettingsMode
@ -195,7 +195,7 @@ public class AccountSetupIncomingFragment extends AccountServerBaseFragment {
@Override
public void onActivityCreated(Bundle savedInstanceState) {
if (Email.DEBUG_LIFECYCLE && Email.DEBUG) {
if (Logging.DEBUG_LIFECYCLE && Email.DEBUG) {
Log.d(Logging.LOG_TAG, "AccountSetupIncomingFragment onActivityCreated");
}
super.onActivityCreated(savedInstanceState);
@ -206,7 +206,7 @@ public class AccountSetupIncomingFragment extends AccountServerBaseFragment {
*/
@Override
public void onStart() {
if (Email.DEBUG_LIFECYCLE && Email.DEBUG) {
if (Logging.DEBUG_LIFECYCLE && Email.DEBUG) {
Log.d(Logging.LOG_TAG, "AccountSetupIncomingFragment onStart");
}
super.onStart();
@ -220,7 +220,7 @@ public class AccountSetupIncomingFragment extends AccountServerBaseFragment {
*/
@Override
public void onResume() {
if (Email.DEBUG_LIFECYCLE && Email.DEBUG) {
if (Logging.DEBUG_LIFECYCLE && Email.DEBUG) {
Log.d(Logging.LOG_TAG, "AccountSetupIncomingFragment onResume");
}
super.onResume();
@ -229,7 +229,7 @@ public class AccountSetupIncomingFragment extends AccountServerBaseFragment {
@Override
public void onPause() {
if (Email.DEBUG_LIFECYCLE && Email.DEBUG) {
if (Logging.DEBUG_LIFECYCLE && Email.DEBUG) {
Log.d(Logging.LOG_TAG, "AccountSetupIncomingFragment onPause");
}
super.onPause();
@ -240,7 +240,7 @@ public class AccountSetupIncomingFragment extends AccountServerBaseFragment {
*/
@Override
public void onStop() {
if (Email.DEBUG_LIFECYCLE && Email.DEBUG) {
if (Logging.DEBUG_LIFECYCLE && Email.DEBUG) {
Log.d(Logging.LOG_TAG, "AccountSetupIncomingFragment onStop");
}
super.onStop();
@ -252,7 +252,7 @@ public class AccountSetupIncomingFragment extends AccountServerBaseFragment {
*/
@Override
public void onDestroy() {
if (Email.DEBUG_LIFECYCLE && Email.DEBUG) {
if (Logging.DEBUG_LIFECYCLE && Email.DEBUG) {
Log.d(Logging.LOG_TAG, "AccountSetupIncomingFragment onDestroy");
}
super.onDestroy();
@ -260,7 +260,7 @@ public class AccountSetupIncomingFragment extends AccountServerBaseFragment {
@Override
public void onSaveInstanceState(Bundle outState) {
if (Email.DEBUG_LIFECYCLE && Email.DEBUG) {
if (Logging.DEBUG_LIFECYCLE && Email.DEBUG) {
Log.d(Logging.LOG_TAG, "AccountSetupIncomingFragment onSaveInstanceState");
}
super.onSaveInstanceState(outState);

View File

@ -78,7 +78,7 @@ public class AccountSetupOutgoingFragment extends AccountServerBaseFragment
*/
@Override
public void onCreate(Bundle savedInstanceState) {
if (Email.DEBUG_LIFECYCLE && Email.DEBUG) {
if (Logging.DEBUG_LIFECYCLE && Email.DEBUG) {
Log.d(Logging.LOG_TAG, "AccountSetupOutgoingFragment onCreate");
}
super.onCreate(savedInstanceState);
@ -92,7 +92,7 @@ public class AccountSetupOutgoingFragment extends AccountServerBaseFragment
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
if (Email.DEBUG_LIFECYCLE && Email.DEBUG) {
if (Logging.DEBUG_LIFECYCLE && Email.DEBUG) {
Log.d(Logging.LOG_TAG, "AccountSetupOutgoingFragment onCreateView");
}
int layoutId = mSettingsMode
@ -164,7 +164,7 @@ public class AccountSetupOutgoingFragment extends AccountServerBaseFragment
@Override
public void onActivityCreated(Bundle savedInstanceState) {
if (Email.DEBUG_LIFECYCLE && Email.DEBUG) {
if (Logging.DEBUG_LIFECYCLE && Email.DEBUG) {
Log.d(Logging.LOG_TAG, "AccountSetupOutgoingFragment onActivityCreated");
}
super.onActivityCreated(savedInstanceState);
@ -175,7 +175,7 @@ public class AccountSetupOutgoingFragment extends AccountServerBaseFragment
*/
@Override
public void onStart() {
if (Email.DEBUG_LIFECYCLE && Email.DEBUG) {
if (Logging.DEBUG_LIFECYCLE && Email.DEBUG) {
Log.d(Logging.LOG_TAG, "AccountSetupOutgoingFragment onStart");
}
super.onStart();
@ -188,7 +188,7 @@ public class AccountSetupOutgoingFragment extends AccountServerBaseFragment
*/
@Override
public void onResume() {
if (Email.DEBUG_LIFECYCLE && Email.DEBUG) {
if (Logging.DEBUG_LIFECYCLE && Email.DEBUG) {
Log.d(Logging.LOG_TAG, "AccountSetupOutgoingFragment onResume");
}
super.onResume();
@ -197,7 +197,7 @@ public class AccountSetupOutgoingFragment extends AccountServerBaseFragment
@Override
public void onPause() {
if (Email.DEBUG_LIFECYCLE && Email.DEBUG) {
if (Logging.DEBUG_LIFECYCLE && Email.DEBUG) {
Log.d(Logging.LOG_TAG, "AccountSetupOutgoingFragment onPause");
}
super.onPause();
@ -208,7 +208,7 @@ public class AccountSetupOutgoingFragment extends AccountServerBaseFragment
*/
@Override
public void onStop() {
if (Email.DEBUG_LIFECYCLE && Email.DEBUG) {
if (Logging.DEBUG_LIFECYCLE && Email.DEBUG) {
Log.d(Logging.LOG_TAG, "AccountSetupOutgoingFragment onStop");
}
super.onStop();
@ -220,7 +220,7 @@ public class AccountSetupOutgoingFragment extends AccountServerBaseFragment
*/
@Override
public void onDestroy() {
if (Email.DEBUG_LIFECYCLE && Email.DEBUG) {
if (Logging.DEBUG_LIFECYCLE && Email.DEBUG) {
Log.d(Logging.LOG_TAG, "AccountSetupOutgoingFragment onDestroy");
}
super.onDestroy();
@ -228,7 +228,7 @@ public class AccountSetupOutgoingFragment extends AccountServerBaseFragment
@Override
public void onSaveInstanceState(Bundle outState) {
if (Email.DEBUG_LIFECYCLE && Email.DEBUG) {
if (Logging.DEBUG_LIFECYCLE && Email.DEBUG) {
Log.d(Logging.LOG_TAG, "AccountSetupOutgoingFragment onSaveInstanceState");
}
super.onSaveInstanceState(outState);

View File

@ -52,7 +52,7 @@ public class DebugFragment extends Fragment implements OnCheckedChangeListener,
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
if (Email.DEBUG_LIFECYCLE && Email.DEBUG) {
if (Logging.DEBUG_LIFECYCLE && Email.DEBUG) {
Log.d(Logging.LOG_TAG, "AccountSetupBasicsFragment onCreateView");
}
View view = inflater.inflate(R.layout.debug, container, false);

View File

@ -566,7 +566,7 @@ class ImapFolder extends Folder {
try {
parseBodyStructure(bs, message, ImapConstants.TEXT);
} catch (MessagingException e) {
if (Email.LOGD) {
if (Logging.LOGD) {
Log.v(Logging.LOG_TAG, "Error handling message", e);
}
message.setBody(null);

View File

@ -292,7 +292,7 @@ public class MailTransport implements Transport {
*/
public void writeLine(String s, String sensitiveReplacement) throws IOException {
if (Email.DEBUG) {
if (sensitiveReplacement != null && !Email.DEBUG_SENSITIVE) {
if (sensitiveReplacement != null && !Logging.DEBUG_SENSITIVE) {
Log.d(Logging.LOG_TAG, ">>> " + sensitiveReplacement);
} else {
Log.d(Logging.LOG_TAG, ">>> " + s);

View File

@ -16,7 +16,6 @@
package com.android.email.mail.transport;
import com.android.email.Email;
import com.android.emailcommon.Logging;
import android.util.Log;
@ -36,7 +35,7 @@ public class StatusOutputStream extends FilterOutputStream {
public void write(int oneByte) throws IOException {
super.write(oneByte);
mCount++;
if (Email.LOGD) {
if (Logging.LOGD) {
if (mCount % 1024 == 0) {
Log.v(Logging.LOG_TAG, "# " + mCount);
}

View File

@ -20,6 +20,7 @@ import com.android.email.Email;
import com.android.email.provider.ContentCache.CacheToken;
import com.android.email.service.AttachmentDownloadService;
import com.android.emailcommon.AccountManagerTypes;
import com.android.emailcommon.Logging;
import com.android.emailcommon.provider.EmailContent;
import com.android.emailcommon.provider.EmailContent.Account;
import com.android.emailcommon.provider.EmailContent.AccountColumns;
@ -368,7 +369,7 @@ public class EmailProvider extends ContentProvider {
int match = sURIMatcher.match(uri);
if (match < 0) {
throw new IllegalArgumentException("Unknown uri: " + uri);
} else if (Email.LOGD) {
} else if (Logging.LOGD) {
Log.v(TAG, methodName + ": uri=" + uri + ", match is " + match);
}
return match;