summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Daniel Lehmann <lehmannd@google.com> 2012-03-12 18:24:41 -0700
committer Android Git Automerger <android-git-automerger@android.com> 2012-03-12 18:24:41 -0700
commitf0533f9462275eff04491a1a27ee4cb1f4afd581 (patch)
tree75b721c1080f9b14d1985905423f5971065d6e9e
parent442612a273981a1b21fdb2e9c19a887ab710224d (diff)
parent0e87370077b322b3a88c345a44c6bf3d56617071 (diff)
am 0e873700: Remove the country detector logging
* commit '0e87370077b322b3a88c345a44c6bf3d56617071': Remove the country detector logging
-rw-r--r--services/java/com/android/server/CountryDetectorService.java5
-rwxr-xr-xservices/java/com/android/server/location/ComprehensiveCountryDetector.java4
2 files changed, 7 insertions, 2 deletions
diff --git a/services/java/com/android/server/CountryDetectorService.java b/services/java/com/android/server/CountryDetectorService.java
index ab61a3c003b8..3112b50d84ec 100644
--- a/services/java/com/android/server/CountryDetectorService.java
+++ b/services/java/com/android/server/CountryDetectorService.java
@@ -81,6 +81,9 @@ public class CountryDetectorService extends ICountryDetector.Stub implements Run
private final static String TAG = "CountryDetector";
+ /** Whether to dump the state of the country detector service to bugreports */
+ private static final boolean DEBUG = false;
+
private final HashMap<IBinder, Receiver> mReceivers;
private final Context mContext;
private ComprehensiveCountryDetector mCountryDetector;
@@ -206,8 +209,10 @@ public class CountryDetectorService extends ICountryDetector.Stub implements Run
return mSystemReady;
}
+ @SuppressWarnings("unused")
@Override
protected void dump(FileDescriptor fd, PrintWriter fout, String[] args) {
+ if (!DEBUG) return;
try {
final Printer p = new PrintWriterPrinter(fout);
p.println("CountryDetectorService state:");
diff --git a/services/java/com/android/server/location/ComprehensiveCountryDetector.java b/services/java/com/android/server/location/ComprehensiveCountryDetector.java
index 2d6a148012de..1026a0d9af6f 100755
--- a/services/java/com/android/server/location/ComprehensiveCountryDetector.java
+++ b/services/java/com/android/server/location/ComprehensiveCountryDetector.java
@@ -202,7 +202,7 @@ public class ComprehensiveCountryDetector extends CountryDetectorBase {
if (mDebugLogs.size() >= MAX_LENGTH_DEBUG_LOGS) {
mDebugLogs.poll();
}
- if (Log.isLoggable(TAG, Log.DEBUG)) {
+ if (DEBUG) {
Slog.d(TAG, country.toString());
}
mDebugLogs.add(country);
@@ -394,7 +394,7 @@ public class ComprehensiveCountryDetector extends CountryDetectorBase {
private void notifyIfCountryChanged(final Country country, final Country detectedCountry) {
if (detectedCountry != null && mListener != null
&& (country == null || !country.equals(detectedCountry))) {
- if (Log.isLoggable(TAG, Log.DEBUG)) {
+ if (DEBUG) {
Slog.d(TAG, "" + country + " --> " + detectedCountry);
}
notifyListener(detectedCountry);