A tool to detect energy leaks in Android applications