Enhance battery usage refresh content log for performance testing

Fixes: 194021631
Test: make SettingsRoboTests
Change-Id: If013befb7a9aaf590762cec10035269e66588ab7
(cherry picked from commit 8c4f097592)
This commit is contained in:
ykhung
2021-07-19 12:34:09 +08:00
committed by YUKAI HUNG
parent 623d86d121
commit 512fcfc73b

View File

@@ -332,9 +332,12 @@ public class BatteryChartPreferenceController extends AbstractPreferenceControll
mTrapezoidIndex = trapezoidIndex; mTrapezoidIndex = trapezoidIndex;
mHandler.post(() -> { mHandler.post(() -> {
final long start = System.currentTimeMillis();
removeAndCacheAllPrefs(); removeAndCacheAllPrefs();
addAllPreferences(); addAllPreferences();
refreshCategoryTitle(); refreshCategoryTitle();
Log.d(TAG, String.format("refreshUi is finished in %d/ms",
(System.currentTimeMillis() - start)));
}); });
return true; return true;
} }