Remove the country detector logging
Bug:6156714 Change-Id: Id0ff60b0530142e2bce055ee8cf8dde94e974aa5
This commit is contained in:
@@ -81,6 +81,9 @@ public class CountryDetectorService extends ICountryDetector.Stub implements Run
|
|||||||
|
|
||||||
private final static String TAG = "CountryDetector";
|
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 HashMap<IBinder, Receiver> mReceivers;
|
||||||
private final Context mContext;
|
private final Context mContext;
|
||||||
private ComprehensiveCountryDetector mCountryDetector;
|
private ComprehensiveCountryDetector mCountryDetector;
|
||||||
@@ -206,8 +209,10 @@ public class CountryDetectorService extends ICountryDetector.Stub implements Run
|
|||||||
return mSystemReady;
|
return mSystemReady;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@SuppressWarnings("unused")
|
||||||
@Override
|
@Override
|
||||||
protected void dump(FileDescriptor fd, PrintWriter fout, String[] args) {
|
protected void dump(FileDescriptor fd, PrintWriter fout, String[] args) {
|
||||||
|
if (!DEBUG) return;
|
||||||
try {
|
try {
|
||||||
final Printer p = new PrintWriterPrinter(fout);
|
final Printer p = new PrintWriterPrinter(fout);
|
||||||
p.println("CountryDetectorService state:");
|
p.println("CountryDetectorService state:");
|
||||||
|
|||||||
@@ -202,7 +202,7 @@ public class ComprehensiveCountryDetector extends CountryDetectorBase {
|
|||||||
if (mDebugLogs.size() >= MAX_LENGTH_DEBUG_LOGS) {
|
if (mDebugLogs.size() >= MAX_LENGTH_DEBUG_LOGS) {
|
||||||
mDebugLogs.poll();
|
mDebugLogs.poll();
|
||||||
}
|
}
|
||||||
if (Log.isLoggable(TAG, Log.DEBUG)) {
|
if (DEBUG) {
|
||||||
Slog.d(TAG, country.toString());
|
Slog.d(TAG, country.toString());
|
||||||
}
|
}
|
||||||
mDebugLogs.add(country);
|
mDebugLogs.add(country);
|
||||||
@@ -394,7 +394,7 @@ public class ComprehensiveCountryDetector extends CountryDetectorBase {
|
|||||||
private void notifyIfCountryChanged(final Country country, final Country detectedCountry) {
|
private void notifyIfCountryChanged(final Country country, final Country detectedCountry) {
|
||||||
if (detectedCountry != null && mListener != null
|
if (detectedCountry != null && mListener != null
|
||||||
&& (country == null || !country.equals(detectedCountry))) {
|
&& (country == null || !country.equals(detectedCountry))) {
|
||||||
if (Log.isLoggable(TAG, Log.DEBUG)) {
|
if (DEBUG) {
|
||||||
Slog.d(TAG, "" + country + " --> " + detectedCountry);
|
Slog.d(TAG, "" + country + " --> " + detectedCountry);
|
||||||
}
|
}
|
||||||
notifyListener(detectedCountry);
|
notifyListener(detectedCountry);
|
||||||
|
|||||||
Reference in New Issue
Block a user