Merge "GPS: Disable verbose logging" into gingerbread

This commit is contained in:
Mike Lockwood
2010-10-25 13:49:13 -07:00
committed by Android (Google) Code Review
2 changed files with 7 additions and 5 deletions

View File

@ -89,7 +89,7 @@ import java.util.Set;
*/ */
public class LocationManagerService extends ILocationManager.Stub implements Runnable { public class LocationManagerService extends ILocationManager.Stub implements Runnable {
private static final String TAG = "LocationManagerService"; private static final String TAG = "LocationManagerService";
private static final boolean LOCAL_LOGV = true; private static final boolean LOCAL_LOGV = false;
// The last time a location was written, by provider name. // The last time a location was written, by provider name.
private HashMap<String,Long> mLastWriteTime = new HashMap<String,Long>(); private HashMap<String,Long> mLastWriteTime = new HashMap<String,Long>();
@ -1674,6 +1674,9 @@ public class LocationManagerService extends ILocationManager.Stub implements Run
} }
public Location getLastKnownLocation(String provider) { public Location getLastKnownLocation(String provider) {
if (LOCAL_LOGV) {
Slog.v(TAG, "getLastKnownLocation: " + provider);
}
try { try {
synchronized (mLock) { synchronized (mLock) {
return _getLastKnownLocationLocked(provider); return _getLastKnownLocationLocked(provider);

View File

@ -82,7 +82,7 @@ public class GpsLocationProvider implements LocationProviderInterface {
private static final String TAG = "GpsLocationProvider"; private static final String TAG = "GpsLocationProvider";
private static final boolean DEBUG = true; private static final boolean DEBUG = false;
private static final boolean VERBOSE = false; private static final boolean VERBOSE = false;
// these need to match GpsPositionMode enum in gps.h // these need to match GpsPositionMode enum in gps.h
@ -1250,7 +1250,7 @@ public class GpsLocationProvider implements LocationProviderInterface {
native_agps_data_conn_failed(); native_agps_data_conn_failed();
} }
} else if (result == Phone.APN_REQUEST_STARTED) { } else if (result == Phone.APN_REQUEST_STARTED) {
if (DEBUG) Log.d(TAG, "Phone.APN_ALREADYAPN_REQUEST_STARTED_ACTIVE"); if (DEBUG) Log.d(TAG, "Phone.APN_REQUEST_STARTED");
// Nothing to do here // Nothing to do here
} else { } else {
if (DEBUG) Log.d(TAG, "startUsingNetworkFeature failed"); if (DEBUG) Log.d(TAG, "startUsingNetworkFeature failed");
@ -1492,8 +1492,7 @@ public class GpsLocationProvider implements LocationProviderInterface {
private final class ProviderHandler extends Handler { private final class ProviderHandler extends Handler {
@Override @Override
public void handleMessage(Message msg) public void handleMessage(Message msg) {
{
int message = msg.what; int message = msg.what;
switch (message) { switch (message) {
case ENABLE: case ENABLE: