Remove SuppressWarning("unused") wherever possible
Change-Id: Ie799f02ab39a7d020af1fb98b6bac45fc0fd1298
This commit is contained in:
parent
a830547adf
commit
76061eba14
|
@ -182,8 +182,7 @@ public abstract class Folder {
|
|||
* This is not abstract because most folders do not require this functionality and do not
|
||||
* need to implement it.
|
||||
*/
|
||||
@SuppressWarnings("unused")
|
||||
public void localFolderSetupComplete(Folder localFolder) throws MessagingException {
|
||||
public void localFolderSetupComplete(Folder localFolder) {
|
||||
// Do nothing - return immediately
|
||||
}
|
||||
|
||||
|
|
|
@ -37,6 +37,33 @@ 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.
|
||||
|
@ -49,30 +76,12 @@ public class Email extends Application {
|
|||
*
|
||||
* TODO: rename this to sUserDebug, and rename LOGD below to DEBUG.
|
||||
*/
|
||||
public static boolean DEBUG = false;
|
||||
|
||||
/**
|
||||
* If true, logging regarding activity/fragment lifecycle will be enabled.
|
||||
* Do not check in as "true".
|
||||
*/
|
||||
public static final boolean DEBUG_LIFECYCLE = false;
|
||||
|
||||
/**
|
||||
* If this is enabled then logging that normally hides sensitive information
|
||||
* like passwords will show that information.
|
||||
*/
|
||||
public static final boolean DEBUG_SENSITIVE = false;
|
||||
|
||||
/**
|
||||
* 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 = false;
|
||||
public static boolean DEBUG;
|
||||
|
||||
// Exchange debugging flags (passed to Exchange, when available, via EmailServiceProxy)
|
||||
public static boolean DEBUG_EXCHANGE = false;
|
||||
public static boolean DEBUG_EXCHANGE_VERBOSE = false;
|
||||
public static boolean DEBUG_EXCHANGE_FILE = false;
|
||||
public static boolean DEBUG_EXCHANGE;
|
||||
public static boolean DEBUG_EXCHANGE_VERBOSE;
|
||||
public static boolean DEBUG_EXCHANGE_FILE;
|
||||
|
||||
/**
|
||||
* If true, inhibit hardware graphics acceleration in UI (for a/b testing)
|
||||
|
|
|
@ -215,7 +215,6 @@ public class MailboxListFragment extends ListFragment implements OnItemClickList
|
|||
* Called to do initial creation of a fragment. This is called after
|
||||
* {@link #onAttach(Activity)} and before {@link #onActivityCreated(Bundle)}.
|
||||
*/
|
||||
@SuppressWarnings("unused")
|
||||
@Override
|
||||
public void onCreate(Bundle savedInstanceState) {
|
||||
if (Email.DEBUG_LIFECYCLE && Email.DEBUG) {
|
||||
|
@ -242,7 +241,6 @@ public class MailboxListFragment extends ListFragment implements OnItemClickList
|
|||
return inflater.inflate(R.layout.mailbox_list_fragment, container, false);
|
||||
}
|
||||
|
||||
@SuppressWarnings("unused")
|
||||
@Override
|
||||
public void onActivityCreated(Bundle savedInstanceState) {
|
||||
if (Email.DEBUG_LIFECYCLE && Email.DEBUG) {
|
||||
|
@ -278,7 +276,6 @@ public class MailboxListFragment extends ListFragment implements OnItemClickList
|
|||
* Otherwise, only load the list of top-level mailboxes if the account changes.
|
||||
*/
|
||||
// STOPSHIP Make it private once phone activities are gone
|
||||
@SuppressWarnings("unused")
|
||||
void openMailboxes(long accountId, long parentMailboxId) {
|
||||
if (Email.DEBUG_LIFECYCLE && Email.DEBUG) {
|
||||
Log.d(Logging.LOG_TAG, "MailboxListFragment openMailboxes");
|
||||
|
@ -320,7 +317,6 @@ public class MailboxListFragment extends ListFragment implements OnItemClickList
|
|||
/**
|
||||
* Called when the Fragment is visible to the user.
|
||||
*/
|
||||
@SuppressWarnings("unused")
|
||||
@Override
|
||||
public void onStart() {
|
||||
if (Email.DEBUG_LIFECYCLE && Email.DEBUG) {
|
||||
|
@ -332,7 +328,6 @@ public class MailboxListFragment extends ListFragment implements OnItemClickList
|
|||
/**
|
||||
* Called when the fragment is visible to the user and actively running.
|
||||
*/
|
||||
@SuppressWarnings("unused")
|
||||
@Override
|
||||
public void onResume() {
|
||||
if (Email.DEBUG_LIFECYCLE && Email.DEBUG) {
|
||||
|
@ -348,7 +343,6 @@ public class MailboxListFragment extends ListFragment implements OnItemClickList
|
|||
}
|
||||
}
|
||||
|
||||
@SuppressWarnings("unused")
|
||||
@Override
|
||||
public void onPause() {
|
||||
if (Email.DEBUG_LIFECYCLE && Email.DEBUG) {
|
||||
|
@ -362,7 +356,6 @@ public class MailboxListFragment extends ListFragment implements OnItemClickList
|
|||
/**
|
||||
* Called when the Fragment is no longer started.
|
||||
*/
|
||||
@SuppressWarnings("unused")
|
||||
@Override
|
||||
public void onStop() {
|
||||
if (Email.DEBUG_LIFECYCLE && Email.DEBUG) {
|
||||
|
@ -374,7 +367,6 @@ public class MailboxListFragment extends ListFragment implements OnItemClickList
|
|||
/**
|
||||
* Called when the fragment is no longer in use.
|
||||
*/
|
||||
@SuppressWarnings("unused")
|
||||
@Override
|
||||
public void onDestroy() {
|
||||
if (Email.DEBUG_LIFECYCLE && Email.DEBUG) {
|
||||
|
@ -383,7 +375,6 @@ public class MailboxListFragment extends ListFragment implements OnItemClickList
|
|||
super.onDestroy();
|
||||
}
|
||||
|
||||
@SuppressWarnings("unused")
|
||||
@Override
|
||||
public void onSaveInstanceState(Bundle outState) {
|
||||
if (Email.DEBUG_LIFECYCLE && Email.DEBUG) {
|
||||
|
@ -394,7 +385,6 @@ public class MailboxListFragment extends ListFragment implements OnItemClickList
|
|||
outState.putParcelable(BUNDLE_LIST_STATE, getListView().onSaveInstanceState());
|
||||
}
|
||||
|
||||
@SuppressWarnings("unused")
|
||||
private void restoreInstanceState(Bundle savedInstanceState) {
|
||||
if (Email.DEBUG_LIFECYCLE && Email.DEBUG) {
|
||||
Log.d(Logging.LOG_TAG, "MailboxListFragment restoreInstanceState");
|
||||
|
@ -403,7 +393,6 @@ public class MailboxListFragment extends ListFragment implements OnItemClickList
|
|||
mSavedListState = savedInstanceState.getParcelable(BUNDLE_LIST_STATE);
|
||||
}
|
||||
|
||||
@SuppressWarnings("unused")
|
||||
private void startLoading() {
|
||||
if (Email.DEBUG_LIFECYCLE && Email.DEBUG) {
|
||||
Log.d(Logging.LOG_TAG, "MailboxListFragment startLoading");
|
||||
|
@ -420,7 +409,6 @@ public class MailboxListFragment extends ListFragment implements OnItemClickList
|
|||
private class MailboxListLoaderCallbacks implements LoaderCallbacks<Cursor> {
|
||||
private boolean mIsFirstLoad;
|
||||
|
||||
@SuppressWarnings("unused")
|
||||
@Override
|
||||
public Loader<Cursor> onCreateLoader(int id, Bundle args) {
|
||||
if (Email.DEBUG_LIFECYCLE && Email.DEBUG) {
|
||||
|
@ -430,7 +418,6 @@ public class MailboxListFragment extends ListFragment implements OnItemClickList
|
|||
return MailboxFragmentAdapter.createLoader(getActivity(), mAccountId, mParentMailboxId);
|
||||
}
|
||||
|
||||
@SuppressWarnings("unused")
|
||||
@Override
|
||||
public void onLoadFinished(Loader<Cursor> loader, Cursor cursor) {
|
||||
if (Email.DEBUG_LIFECYCLE && Email.DEBUG) {
|
||||
|
|
|
@ -237,7 +237,6 @@ public class MessageListFragment extends ListFragment
|
|||
return instance;
|
||||
}
|
||||
|
||||
@SuppressWarnings("unused")
|
||||
@Override
|
||||
public void onCreate(Bundle savedInstanceState) {
|
||||
if (Email.DEBUG_LIFECYCLE && Email.DEBUG) {
|
||||
|
@ -261,7 +260,6 @@ public class MessageListFragment extends ListFragment
|
|||
return root;
|
||||
}
|
||||
|
||||
@SuppressWarnings("unused")
|
||||
@Override
|
||||
public void onActivityCreated(Bundle savedInstanceState) {
|
||||
if (Email.DEBUG_LIFECYCLE && Email.DEBUG) {
|
||||
|
@ -293,7 +291,6 @@ public class MessageListFragment extends ListFragment
|
|||
}
|
||||
}
|
||||
|
||||
@SuppressWarnings("unused")
|
||||
@Override
|
||||
public void onStart() {
|
||||
if (Email.DEBUG_LIFECYCLE && Email.DEBUG) {
|
||||
|
@ -302,7 +299,6 @@ public class MessageListFragment extends ListFragment
|
|||
super.onStart();
|
||||
}
|
||||
|
||||
@SuppressWarnings("unused")
|
||||
@Override
|
||||
public void onResume() {
|
||||
if (Email.DEBUG_LIFECYCLE && Email.DEBUG) {
|
||||
|
@ -319,7 +315,6 @@ public class MessageListFragment extends ListFragment
|
|||
}
|
||||
}
|
||||
|
||||
@SuppressWarnings("unused")
|
||||
@Override
|
||||
public void onPause() {
|
||||
if (Email.DEBUG_LIFECYCLE && Email.DEBUG) {
|
||||
|
@ -331,7 +326,6 @@ public class MessageListFragment extends ListFragment
|
|||
adjustMessageNotification(true);
|
||||
}
|
||||
|
||||
@SuppressWarnings("unused")
|
||||
@Override
|
||||
public void onStop() {
|
||||
if (Email.DEBUG_LIFECYCLE && Email.DEBUG) {
|
||||
|
@ -340,7 +334,6 @@ public class MessageListFragment extends ListFragment
|
|||
super.onStop();
|
||||
}
|
||||
|
||||
@SuppressWarnings("unused")
|
||||
@Override
|
||||
public void onDestroy() {
|
||||
if (Email.DEBUG_LIFECYCLE && Email.DEBUG) {
|
||||
|
@ -357,7 +350,6 @@ public class MessageListFragment extends ListFragment
|
|||
super.onDestroy();
|
||||
}
|
||||
|
||||
@SuppressWarnings("unused")
|
||||
@Override
|
||||
public void onSaveInstanceState(Bundle outState) {
|
||||
if (Email.DEBUG_LIFECYCLE && Email.DEBUG) {
|
||||
|
@ -369,7 +361,6 @@ public class MessageListFragment extends ListFragment
|
|||
outState.putLong(BUNDLE_KEY_SELECTED_MESSAGE_ID, mSelectedMessageId);
|
||||
}
|
||||
|
||||
@SuppressWarnings("unused")
|
||||
@VisibleForTesting
|
||||
void restoreInstanceState(Bundle savedInstanceState) {
|
||||
if (Email.DEBUG_LIFECYCLE && Email.DEBUG) {
|
||||
|
@ -424,7 +415,6 @@ public class MessageListFragment extends ListFragment
|
|||
* {@link Mailbox#QUERY_ALL_INBOXES}. -1 is not allowed.
|
||||
*/
|
||||
// STOPSHIP Make it private once phone activities are gone
|
||||
@SuppressWarnings("unused")
|
||||
void openMailbox(long mailboxId) {
|
||||
if (Email.DEBUG_LIFECYCLE && Email.DEBUG) {
|
||||
Log.d(Logging.LOG_TAG, "MessageListFragment openMailbox");
|
||||
|
@ -1102,7 +1092,6 @@ public class MessageListFragment extends ListFragment
|
|||
}
|
||||
}
|
||||
|
||||
@SuppressWarnings("unused")
|
||||
private void startLoading() {
|
||||
if (Email.DEBUG_LIFECYCLE && Email.DEBUG) {
|
||||
Log.d(Logging.LOG_TAG, "MessageListFragment startLoading");
|
||||
|
@ -1124,7 +1113,6 @@ public class MessageListFragment extends ListFragment
|
|||
*/
|
||||
private class MailboxAccountLoaderCallback implements LoaderManager.LoaderCallbacks<
|
||||
MailboxAccountLoader.Result> {
|
||||
@SuppressWarnings("unused")
|
||||
@Override
|
||||
public Loader<MailboxAccountLoader.Result> onCreateLoader(int id, Bundle args) {
|
||||
if (Email.DEBUG_LIFECYCLE && Email.DEBUG) {
|
||||
|
@ -1134,7 +1122,6 @@ public class MessageListFragment extends ListFragment
|
|||
return new MailboxAccountLoader(getActivity().getApplicationContext(), mMailboxId);
|
||||
}
|
||||
|
||||
@SuppressWarnings("unused")
|
||||
@Override
|
||||
public void onLoadFinished(Loader<MailboxAccountLoader.Result> loader,
|
||||
MailboxAccountLoader.Result result) {
|
||||
|
@ -1167,7 +1154,6 @@ public class MessageListFragment extends ListFragment
|
|||
private class MessagesLoaderCallback implements LoaderManager.LoaderCallbacks<Cursor> {
|
||||
private boolean mIsFirstLoad;
|
||||
|
||||
@SuppressWarnings("unused")
|
||||
@Override
|
||||
public Loader<Cursor> onCreateLoader(int id, Bundle args) {
|
||||
if (Email.DEBUG_LIFECYCLE && Email.DEBUG) {
|
||||
|
@ -1178,7 +1164,6 @@ public class MessageListFragment extends ListFragment
|
|||
return MessagesAdapter.createLoader(getActivity(), mMailboxId);
|
||||
}
|
||||
|
||||
@SuppressWarnings("unused")
|
||||
@Override
|
||||
public void onLoadFinished(Loader<Cursor> loader, Cursor cursor) {
|
||||
if (Email.DEBUG_LIFECYCLE && Email.DEBUG) {
|
||||
|
|
|
@ -455,13 +455,11 @@ public class ThreePaneLayout extends LinearLayout implements View.OnClickListene
|
|||
private static final String PROP_MAILBOX_LIST_LEFT = "mailboxListLeftAnim";
|
||||
private static final String PROP_MESSAGE_LIST_WIDTH = "messageListWidthAnim";
|
||||
|
||||
@SuppressWarnings("unused")
|
||||
public void setMailboxListLeftAnim(int value) {
|
||||
((ViewGroup.MarginLayoutParams) mLeftPane.getLayoutParams()).leftMargin = value;
|
||||
requestLayout();
|
||||
}
|
||||
|
||||
@SuppressWarnings("unused")
|
||||
public void setMessageListWidthAnim(int value) {
|
||||
setViewWidth(mMiddlePane, value);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue