Merge "Fix recording of battery history tags" into tm-dev