Merge "profcollect: Add verbose logging for ota status updates" into sc-dev am: 03951c2a33

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15356790

Change-Id: I41804b60cb74e386606de3db5f934f260a3e7b34
This commit is contained in:
TreeHugger Robot
2021-07-22 19:00:21 +00:00
committed by Automerger Merge Worker

View File

@@ -59,9 +59,7 @@ public final class ProfcollectForwardingService extends SystemService {
private static final boolean DEBUG = Log.isLoggable(LOG_TAG, Log.DEBUG);
private static final long BG_PROCESS_PERIOD = DEBUG
? TimeUnit.MINUTES.toMillis(1)
: TimeUnit.DAYS.toMillis(1);
private static final long BG_PROCESS_PERIOD = TimeUnit.DAYS.toMillis(1); // every 1 day.
private IProfCollectd mIProfcollect;
private static ProfcollectForwardingService sSelfService;
@@ -286,6 +284,11 @@ public final class ProfcollectForwardingService extends SystemService {
updateEngine.bind(new UpdateEngineCallback() {
@Override
public void onStatusUpdate(int status, float percent) {
if (DEBUG) {
Log.d(LOG_TAG, "Received OTA status update, status: " + status + ", percent: "
+ percent);
}
if (status == UpdateEngine.UpdateStatusConstants.UPDATED_NEED_REBOOT) {
packProfileReport();
}