Methods Summary |
---|
private static void | append(int type, java.lang.String msg)
synchronized(MSGS) {
TIMES[sNext] = System.currentTimeMillis();
TYPES[sNext] = type;
MSGS[sNext] = msg;
sNext = (sNext + 1) % SIZE;
if (sSize < SIZE) {
sSize++;
}
}
if (DEBUG) Slog.d(TAG, typeToString(type) + ": " + msg);
|
private static java.lang.String | componentToString(android.content.ComponentName component)
return component != null ? component.toShortString() : null;
|
public static void | dump(java.io.PrintWriter pw, java.lang.String prefix)
synchronized(MSGS) {
final int start = (sNext - sSize + SIZE) % SIZE;
for (int i = 0; i < sSize; i++) {
final int j = (start + i) % SIZE;
pw.print(prefix);
pw.print(FORMAT.format(new Date(TIMES[j])));
pw.print(' ");
pw.print(typeToString(TYPES[j]));
pw.print(": ");
pw.println(MSGS[j]);
}
}
|
private static java.lang.String | ringerModeToString(int ringerMode)
switch (ringerMode) {
case AudioManager.RINGER_MODE_SILENT: return "silent";
case AudioManager.RINGER_MODE_VIBRATE: return "vibrate";
case AudioManager.RINGER_MODE_NORMAL: return "normal";
default: return "unknown";
}
|
private static java.lang.String | subscribeResult(android.service.notification.IConditionProvider provider, android.os.RemoteException e)
return provider == null ? "no provider" : e != null ? e.getMessage() : "ok";
|
public static void | traceConfig(android.service.notification.ZenModeConfig oldConfig, android.service.notification.ZenModeConfig newConfig)
append(TYPE_CONFIG, newConfig != null ? newConfig.toString() : null);
|
public static void | traceDisableEffects(NotificationRecord record, java.lang.String reason)
append(TYPE_DISABLE_EFFECTS, record.getKey() + "," + reason);
|
public static void | traceDowntimeAutotrigger(java.lang.String result)
append(TYPE_DOWNTIME, result);
|
public static void | traceExitCondition(android.service.notification.Condition c, android.content.ComponentName component, java.lang.String reason)
append(TYPE_EXIT_CONDITION, c + "," + componentToString(component) + "," + reason);
|
public static void | traceIntercepted(NotificationRecord record, java.lang.String reason)
if (record != null && record.isIntercepted()) return; // already logged
append(TYPE_INTERCEPTED, record.getKey() + "," + reason);
|
public static void | traceNotIntercepted(NotificationRecord record, java.lang.String reason)
if (record != null && record.isUpdate) return; // already logged
append(TYPE_NOT_INTERCEPTED, record.getKey() + "," + reason);
|
public static void | traceSetRingerModeExternal(int ringerModeOld, int ringerModeNew, java.lang.String caller, int ringerModeInternalIn, int ringerModeInternalOut)
append(TYPE_SET_RINGER_MODE_EXTERNAL, caller + ",e:" +
ringerModeToString(ringerModeOld) + "->" +
ringerModeToString(ringerModeNew) + ",i:" +
ringerModeToString(ringerModeInternalIn) + "->" +
ringerModeToString(ringerModeInternalOut));
|
public static void | traceSetRingerModeInternal(int ringerModeOld, int ringerModeNew, java.lang.String caller, int ringerModeExternalIn, int ringerModeExternalOut)
append(TYPE_SET_RINGER_MODE_INTERNAL, caller + ",i:" +
ringerModeToString(ringerModeOld) + "->" +
ringerModeToString(ringerModeNew) + ",e:" +
ringerModeToString(ringerModeExternalIn) + "->" +
ringerModeToString(ringerModeExternalOut));
|
public static void | traceSetZenMode(int zenMode, java.lang.String reason)
append(TYPE_SET_ZEN_MODE, zenModeToString(zenMode) + "," + reason);
|
public static void | traceSubscribe(android.net.Uri uri, android.service.notification.IConditionProvider provider, android.os.RemoteException e)
append(TYPE_SUBSCRIBE, uri + "," + subscribeResult(provider, e));
|
public static void | traceUnsubscribe(android.net.Uri uri, android.service.notification.IConditionProvider provider, android.os.RemoteException e)
append(TYPE_UNSUBSCRIBE, uri + "," + subscribeResult(provider, e));
|
public static void | traceUpdateZenMode(int fromMode, int toMode)
append(TYPE_UPDATE_ZEN_MODE, zenModeToString(fromMode) + " -> " + zenModeToString(toMode));
|
private static java.lang.String | typeToString(int type)
switch (type) {
case TYPE_INTERCEPTED: return "intercepted";
case TYPE_ALLOW_DISABLE: return "allow_disable";
case TYPE_SET_RINGER_MODE_EXTERNAL: return "set_ringer_mode_external";
case TYPE_SET_RINGER_MODE_INTERNAL: return "set_ringer_mode_internal";
case TYPE_DOWNTIME: return "downtime";
case TYPE_SET_ZEN_MODE: return "set_zen_mode";
case TYPE_UPDATE_ZEN_MODE: return "update_zen_mode";
case TYPE_EXIT_CONDITION: return "exit_condition";
case TYPE_SUBSCRIBE: return "subscribe";
case TYPE_UNSUBSCRIBE: return "unsubscribe";
case TYPE_CONFIG: return "config";
case TYPE_NOT_INTERCEPTED: return "not_intercepted";
case TYPE_DISABLE_EFFECTS: return "disable_effects";
default: return "unknown";
}
|
private static java.lang.String | zenModeToString(int zenMode)
switch (zenMode) {
case Global.ZEN_MODE_OFF: return "off";
case Global.ZEN_MODE_IMPORTANT_INTERRUPTIONS: return "important_interruptions";
case Global.ZEN_MODE_NO_INTERRUPTIONS: return "no_interruptions";
default: return "unknown";
}
|