如在OTA升级后应用未更新问题分析文章中介绍,当怀疑和系统设置里面的system/global/secure里面的设置项有关联的时候,可以打开如下:
DEBUG点:把DEBUG开关设置为true
源代码里面已经有现成的开关:
除了在query/udpate/delete/insert方法都有debug,具体值的地方也有打印,以global为例子
private boolean updateGlobalSetting(String name, String value, String tag,
boolean makeDefault, int requestingUserId, boolean forceNotify) {
if (DEBUG) {
Slog.v(LOG_TAG, "updateGlobalSetting(" + name + ", " + value + ", "
+ ", " + tag + ", " + makeDefault + ", " + requestingUserId
+ ", " + forceNotify + ")");
}
return mutateGlobalSetting(name, value, tag, makeDefault, requestingUserId,
MUTATION_OPERATION_UPDATE, forceNotify, 0);
}
private boolean insertGlobalSetting(String name, String value, String tag,
boolean makeDefault, int requestingUserId, boolean forceNotify) {
if (DEBUG) {
Slog.v(LOG_TAG, "insertGlobalSetting(" + name + ", " + value + ", "
+ ", " + tag + ", " + makeDefault + ", " + requestingUserId
+ ", " + forceNotify + ")");
}
return mutateGlobalSetting(name, value, tag, makeDefault, requestingUserId,
MUTATION_OPERATION_INSERT, forceNotify, 0);
}
private boolean deleteGlobalSetting(String name, int requestingUserId, boolean forceNotify) {
if (DEBUG) {
Slog.v(LOG_TAG, "deleteGlobalSetting(" + name + ", " + requestingUserId
+ ", " + forceNotify + ")");
}
return mutateGlobalSetting(name, null, null, false, requestingUserId,
MUTATION_OPERATION_DELETE, forceNotify, 0);
}
private void resetGlobalSetting(int requestingUserId, int mode, String tag) {
if (DEBUG) {
Slog.v(LOG_TAG, "resetGlobalSetting(" + requestingUserId + ", "
+ mode + ", " + tag + ")");
}
mutateGlobalSetting(null, null, tag, false, requestingUserId,
MUTATION_OPERATION_RESET, false, mode);
}