summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorScott Kennedy <skennedy@google.com>2013-06-06 10:10:50 -0700
committerScott Kennedy <skennedy@google.com>2013-06-06 10:16:00 -0700
commit942b7d73f2f5b3d6c651e39463e615fe6902a910 (patch)
tree23fdad6ab807a8e9563a340e74781570fb13cd71 /tests
parent1d51a1dc64cbcdfa10cbc0712bd2601815bd8300 (diff)
downloadandroid_packages_apps_Exchange-942b7d73f2f5b3d6c651e39463e615fe6902a910.tar.gz
android_packages_apps_Exchange-942b7d73f2f5b3d6c651e39463e615fe6902a910.tar.bz2
android_packages_apps_Exchange-942b7d73f2f5b3d6c651e39463e615fe6902a910.zip
Unify LogTag
There is now only one LogTag class. The static initializer of GmailApplication (existing), EmailApplication (new), and Exchange (existing) will now set the log tag to "Gmail" and "Email", respectively. Up until that code is run, it will be "UnifiedEmail". "setprop log.tag.Gmail VERBOSE" (or .Email, .Exchange) will trigger all logs to be printed as long as they go through LogUtils, regardless of what tag is used by that individual log. This lets us still turn on logging everywhere in one command, but also lets us use more descriptive tags (like the class name). And since we no longer have three com.android.mail.utils.LogTag classes, builds will be much easier. Also, we now use LogUtils everywhere. Change-Id: Ib565414fae51d0c3367370db9717aece45f7eb36
Diffstat (limited to 'tests')
-rw-r--r--tests/src/com/android/exchange/CalendarSyncEnablerTest.java5
-rw-r--r--tests/src/com/android/exchange/utility/CalendarUtilitiesTests.java6
2 files changed, 6 insertions, 5 deletions
diff --git a/tests/src/com/android/exchange/CalendarSyncEnablerTest.java b/tests/src/com/android/exchange/CalendarSyncEnablerTest.java
index 2c90dbb9..b70d308b 100644
--- a/tests/src/com/android/exchange/CalendarSyncEnablerTest.java
+++ b/tests/src/com/android/exchange/CalendarSyncEnablerTest.java
@@ -29,16 +29,17 @@ import android.provider.CalendarContract;
import android.test.MoreAsserts;
import android.test.suitebuilder.annotation.MediumTest;
import android.text.TextUtils;
-import android.util.Log;
import com.android.emailcommon.Logging;
import com.android.exchange.utility.ExchangeTestCase;
+import com.android.mail.utils.LogUtils;
import java.io.IOException;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashMap;
import java.util.HashSet;
+
@MediumTest
public class CalendarSyncEnablerTest extends ExchangeTestCase {
@@ -178,7 +179,7 @@ public class CalendarSyncEnablerTest extends ExchangeTestCase {
// set up on the device. Otherwise there'll be no difference from
// testEnableEasCalendarSync.
if (AccountManager.get(getContext()).getAccountsByType(EAT).length > 0) {
- Log.w(Logging.LOG_TAG, "testEnableEasCalendarSyncWithNoExchangeAccounts skipped:"
+ LogUtils.w(Logging.LOG_TAG, "testEnableEasCalendarSyncWithNoExchangeAccounts skipped:"
+ " It only runs when there's no Exchange account on the device.");
return;
}
diff --git a/tests/src/com/android/exchange/utility/CalendarUtilitiesTests.java b/tests/src/com/android/exchange/utility/CalendarUtilitiesTests.java
index 77820a52..fc9eb34d 100644
--- a/tests/src/com/android/exchange/utility/CalendarUtilitiesTests.java
+++ b/tests/src/com/android/exchange/utility/CalendarUtilitiesTests.java
@@ -22,7 +22,6 @@ import android.content.res.Resources;
import android.provider.CalendarContract.Attendees;
import android.provider.CalendarContract.Events;
import android.test.suitebuilder.annotation.MediumTest;
-import android.util.Log;
import com.android.emailcommon.mail.Address;
import com.android.emailcommon.provider.Account;
@@ -36,6 +35,7 @@ import com.android.exchange.adapter.Parser;
import com.android.exchange.adapter.Serializer;
import com.android.exchange.adapter.SyncAdapterTestCase;
import com.android.exchange.adapter.Tags;
+import com.android.mail.utils.LogUtils;
import java.io.BufferedReader;
import java.io.ByteArrayInputStream;
@@ -880,10 +880,10 @@ public class CalendarUtilitiesTests extends SyncAdapterTestCase<CalendarSyncAdap
nodst++;
}
}
- Log.d("TimeZoneGeneration",
+ LogUtils.d("TimeZoneGeneration",
"Rule: " + rule + ", No DST: " + nodst + ", No rule: " + norule);
for (String nr: norulelist) {
- Log.d("TimeZoneGeneration", "No rule: " + nr);
+ LogUtils.d("TimeZoneGeneration", "No rule: " + nr);
}
// This is an empirical sanity test; we shouldn't have too many time zones with DST and
// without a rule.