Remove more Slog usages in statsd apex
Slog.* --> Log.* Bug: 149128236 Test: m Change-Id: I926f292dd5562af132774670c35fe2ca4e853bf8
This commit is contained in:
@@ -32,7 +32,7 @@ import android.os.IStatsd;
|
||||
import android.os.RemoteException;
|
||||
import android.os.StatsFrameworkInitializer;
|
||||
import android.util.AndroidException;
|
||||
import android.util.Slog;
|
||||
import android.util.Log;
|
||||
import android.util.StatsEvent;
|
||||
import android.util.StatsEventParcel;
|
||||
|
||||
@@ -155,7 +155,7 @@ public final class StatsManager {
|
||||
// can throw IllegalArgumentException
|
||||
service.addConfiguration(configKey, config, mContext.getOpPackageName());
|
||||
} catch (RemoteException e) {
|
||||
Slog.e(TAG, "Failed to connect to statsmanager when adding configuration");
|
||||
Log.e(TAG, "Failed to connect to statsmanager when adding configuration");
|
||||
throw new StatsUnavailableException("could not connect", e);
|
||||
} catch (SecurityException e) {
|
||||
throw new StatsUnavailableException(e.getMessage(), e);
|
||||
@@ -191,7 +191,7 @@ public final class StatsManager {
|
||||
IStatsManagerService service = getIStatsManagerServiceLocked();
|
||||
service.removeConfiguration(configKey, mContext.getOpPackageName());
|
||||
} catch (RemoteException e) {
|
||||
Slog.e(TAG, "Failed to connect to statsmanager when removing configuration");
|
||||
Log.e(TAG, "Failed to connect to statsmanager when removing configuration");
|
||||
throw new StatsUnavailableException("could not connect", e);
|
||||
} catch (SecurityException e) {
|
||||
throw new StatsUnavailableException(e.getMessage(), e);
|
||||
@@ -258,7 +258,7 @@ public final class StatsManager {
|
||||
mContext.getOpPackageName());
|
||||
}
|
||||
} catch (RemoteException e) {
|
||||
Slog.e(TAG, "Failed to connect to statsmanager when adding broadcast subscriber",
|
||||
Log.e(TAG, "Failed to connect to statsmanager when adding broadcast subscriber",
|
||||
e);
|
||||
throw new StatsUnavailableException("could not connect", e);
|
||||
} catch (SecurityException e) {
|
||||
@@ -311,7 +311,7 @@ public final class StatsManager {
|
||||
}
|
||||
|
||||
} catch (RemoteException e) {
|
||||
Slog.e(TAG, "Failed to connect to statsmanager when registering data listener.");
|
||||
Log.e(TAG, "Failed to connect to statsmanager when registering data listener.");
|
||||
throw new StatsUnavailableException("could not connect", e);
|
||||
} catch (SecurityException e) {
|
||||
throw new StatsUnavailableException(e.getMessage(), e);
|
||||
@@ -348,7 +348,7 @@ public final class StatsManager {
|
||||
}
|
||||
|
||||
} catch (RemoteException e) {
|
||||
Slog.e(TAG, "Failed to connect to statsmanager "
|
||||
Log.e(TAG, "Failed to connect to statsmanager "
|
||||
+ "when registering active configs listener.");
|
||||
throw new StatsUnavailableException("could not connect", e);
|
||||
} catch (SecurityException e) {
|
||||
@@ -387,7 +387,7 @@ public final class StatsManager {
|
||||
IStatsManagerService service = getIStatsManagerServiceLocked();
|
||||
return service.getData(configKey, mContext.getOpPackageName());
|
||||
} catch (RemoteException e) {
|
||||
Slog.e(TAG, "Failed to connect to statsmanager when getting data");
|
||||
Log.e(TAG, "Failed to connect to statsmanager when getting data");
|
||||
throw new StatsUnavailableException("could not connect", e);
|
||||
} catch (SecurityException e) {
|
||||
throw new StatsUnavailableException(e.getMessage(), e);
|
||||
@@ -424,7 +424,7 @@ public final class StatsManager {
|
||||
IStatsManagerService service = getIStatsManagerServiceLocked();
|
||||
return service.getMetadata(mContext.getOpPackageName());
|
||||
} catch (RemoteException e) {
|
||||
Slog.e(TAG, "Failed to connect to statsmanager when getting metadata");
|
||||
Log.e(TAG, "Failed to connect to statsmanager when getting metadata");
|
||||
throw new StatsUnavailableException("could not connect", e);
|
||||
} catch (SecurityException e) {
|
||||
throw new StatsUnavailableException(e.getMessage(), e);
|
||||
@@ -464,7 +464,7 @@ public final class StatsManager {
|
||||
return service.getRegisteredExperimentIds();
|
||||
} catch (RemoteException e) {
|
||||
if (DEBUG) {
|
||||
Slog.d(TAG,
|
||||
Log.d(TAG,
|
||||
"Failed to connect to StatsManagerService when getting "
|
||||
+ "registered experiment IDs");
|
||||
}
|
||||
@@ -555,7 +555,7 @@ public final class StatsManager {
|
||||
try {
|
||||
resultReceiver.pullFinished(atomTag, success, parcels);
|
||||
} catch (RemoteException e) {
|
||||
Slog.w(TAG, "StatsPullResultReceiver failed for tag " + mAtomId);
|
||||
Log.w(TAG, "StatsPullResultReceiver failed for tag " + mAtomId);
|
||||
}
|
||||
});
|
||||
} finally {
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
package android.os;
|
||||
|
||||
import android.annotation.SystemApi;
|
||||
import android.util.Slog;
|
||||
import android.util.Log;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
@@ -129,7 +129,7 @@ public final class StatsDimensionsValue implements Parcelable {
|
||||
mValue = values;
|
||||
break;
|
||||
default:
|
||||
Slog.w(TAG, "StatsDimensionsValueParcel contains bad valueType: " + mValueType);
|
||||
Log.w(TAG, "StatsDimensionsValueParcel contains bad valueType: " + mValueType);
|
||||
mValue = null;
|
||||
break;
|
||||
}
|
||||
@@ -155,7 +155,7 @@ public final class StatsDimensionsValue implements Parcelable {
|
||||
try {
|
||||
if (mValueType == STRING_VALUE_TYPE) return (String) mValue;
|
||||
} catch (ClassCastException e) {
|
||||
Slog.w(TAG, "Failed to successfully get value", e);
|
||||
Log.w(TAG, "Failed to successfully get value", e);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
@@ -169,7 +169,7 @@ public final class StatsDimensionsValue implements Parcelable {
|
||||
try {
|
||||
if (mValueType == INT_VALUE_TYPE) return (Integer) mValue;
|
||||
} catch (ClassCastException e) {
|
||||
Slog.w(TAG, "Failed to successfully get value", e);
|
||||
Log.w(TAG, "Failed to successfully get value", e);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
@@ -183,7 +183,7 @@ public final class StatsDimensionsValue implements Parcelable {
|
||||
try {
|
||||
if (mValueType == LONG_VALUE_TYPE) return (Long) mValue;
|
||||
} catch (ClassCastException e) {
|
||||
Slog.w(TAG, "Failed to successfully get value", e);
|
||||
Log.w(TAG, "Failed to successfully get value", e);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
@@ -198,7 +198,7 @@ public final class StatsDimensionsValue implements Parcelable {
|
||||
try {
|
||||
if (mValueType == BOOLEAN_VALUE_TYPE) return (Boolean) mValue;
|
||||
} catch (ClassCastException e) {
|
||||
Slog.w(TAG, "Failed to successfully get value", e);
|
||||
Log.w(TAG, "Failed to successfully get value", e);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
@@ -212,7 +212,7 @@ public final class StatsDimensionsValue implements Parcelable {
|
||||
try {
|
||||
if (mValueType == FLOAT_VALUE_TYPE) return (Float) mValue;
|
||||
} catch (ClassCastException e) {
|
||||
Slog.w(TAG, "Failed to successfully get value", e);
|
||||
Log.w(TAG, "Failed to successfully get value", e);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
@@ -238,7 +238,7 @@ public final class StatsDimensionsValue implements Parcelable {
|
||||
}
|
||||
return copy;
|
||||
} catch (ClassCastException e) {
|
||||
Slog.w(TAG, "Failed to successfully get value", e);
|
||||
Log.w(TAG, "Failed to successfully get value", e);
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@@ -297,7 +297,7 @@ public final class StatsDimensionsValue implements Parcelable {
|
||||
}
|
||||
return sb.toString();
|
||||
} catch (ClassCastException e) {
|
||||
Slog.w(TAG, "Failed to successfully get value", e);
|
||||
Log.w(TAG, "Failed to successfully get value", e);
|
||||
}
|
||||
return "";
|
||||
}
|
||||
@@ -357,11 +357,11 @@ public final class StatsDimensionsValue implements Parcelable {
|
||||
return true;
|
||||
}
|
||||
default:
|
||||
Slog.w(TAG, "readValue of an impossible type " + valueType);
|
||||
Log.w(TAG, "readValue of an impossible type " + valueType);
|
||||
return false;
|
||||
}
|
||||
} catch (ClassCastException e) {
|
||||
Slog.w(TAG, "writeValue cast failed", e);
|
||||
Log.w(TAG, "writeValue cast failed", e);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -388,7 +388,7 @@ public final class StatsDimensionsValue implements Parcelable {
|
||||
return values;
|
||||
}
|
||||
default:
|
||||
Slog.w(TAG, "readValue of an impossible type " + valueType);
|
||||
Log.w(TAG, "readValue of an impossible type " + valueType);
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -59,7 +59,7 @@ public final class StatsLog {
|
||||
IStatsd service = getIStatsdLocked();
|
||||
if (service == null) {
|
||||
if (DEBUG) {
|
||||
Slog.d(TAG, "Failed to find statsd when logging start");
|
||||
Log.d(TAG, "Failed to find statsd when logging start");
|
||||
}
|
||||
return false;
|
||||
}
|
||||
@@ -69,7 +69,7 @@ public final class StatsLog {
|
||||
} catch (RemoteException e) {
|
||||
sService = null;
|
||||
if (DEBUG) {
|
||||
Slog.d(TAG, "Failed to connect to statsd when logging start");
|
||||
Log.d(TAG, "Failed to connect to statsd when logging start");
|
||||
}
|
||||
return false;
|
||||
}
|
||||
@@ -88,7 +88,7 @@ public final class StatsLog {
|
||||
IStatsd service = getIStatsdLocked();
|
||||
if (service == null) {
|
||||
if (DEBUG) {
|
||||
Slog.d(TAG, "Failed to find statsd when logging stop");
|
||||
Log.d(TAG, "Failed to find statsd when logging stop");
|
||||
}
|
||||
return false;
|
||||
}
|
||||
@@ -98,7 +98,7 @@ public final class StatsLog {
|
||||
} catch (RemoteException e) {
|
||||
sService = null;
|
||||
if (DEBUG) {
|
||||
Slog.d(TAG, "Failed to connect to statsd when logging stop");
|
||||
Log.d(TAG, "Failed to connect to statsd when logging stop");
|
||||
}
|
||||
return false;
|
||||
}
|
||||
@@ -117,7 +117,7 @@ public final class StatsLog {
|
||||
IStatsd service = getIStatsdLocked();
|
||||
if (service == null) {
|
||||
if (DEBUG) {
|
||||
Slog.d(TAG, "Failed to find statsd when logging event");
|
||||
Log.d(TAG, "Failed to find statsd when logging event");
|
||||
}
|
||||
return false;
|
||||
}
|
||||
@@ -127,7 +127,7 @@ public final class StatsLog {
|
||||
} catch (RemoteException e) {
|
||||
sService = null;
|
||||
if (DEBUG) {
|
||||
Slog.d(TAG, "Failed to connect to statsd when logging event");
|
||||
Log.d(TAG, "Failed to connect to statsd when logging event");
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user