Loading apex/statsd/framework/java/android/app/StatsManager.java +10 −10 Original line number Diff line number Diff line Loading @@ -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; Loading Loading @@ -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); Loading Loading @@ -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); Loading Loading @@ -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) { Loading Loading @@ -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); Loading Loading @@ -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) { Loading Loading @@ -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); Loading Loading @@ -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); Loading Loading @@ -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"); } Loading Loading @@ -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 { Loading apex/statsd/framework/java/android/os/StatsDimensionsValue.java +12 −12 Original line number Diff line number Diff line Loading @@ -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; Loading Loading @@ -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; } Loading @@ -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; } Loading @@ -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; } Loading @@ -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; } Loading @@ -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; } Loading @@ -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; } Loading @@ -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; } } Loading Loading @@ -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 ""; } Loading Loading @@ -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; } } Loading @@ -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; } } Loading apex/statsd/framework/java/android/util/StatsLog.java +6 −6 Original line number Diff line number Diff line Loading @@ -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; } Loading @@ -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; } Loading @@ -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; } Loading @@ -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; } Loading @@ -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; } Loading @@ -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; } Loading Loading
apex/statsd/framework/java/android/app/StatsManager.java +10 −10 Original line number Diff line number Diff line Loading @@ -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; Loading Loading @@ -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); Loading Loading @@ -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); Loading Loading @@ -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) { Loading Loading @@ -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); Loading Loading @@ -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) { Loading Loading @@ -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); Loading Loading @@ -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); Loading Loading @@ -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"); } Loading Loading @@ -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 { Loading
apex/statsd/framework/java/android/os/StatsDimensionsValue.java +12 −12 Original line number Diff line number Diff line Loading @@ -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; Loading Loading @@ -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; } Loading @@ -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; } Loading @@ -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; } Loading @@ -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; } Loading @@ -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; } Loading @@ -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; } Loading @@ -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; } } Loading Loading @@ -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 ""; } Loading Loading @@ -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; } } Loading @@ -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; } } Loading
apex/statsd/framework/java/android/util/StatsLog.java +6 −6 Original line number Diff line number Diff line Loading @@ -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; } Loading @@ -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; } Loading @@ -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; } Loading @@ -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; } Loading @@ -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; } Loading @@ -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; } Loading