profcollect: Add verbose logging for ota status updates

Test: presubmit
Bug: 178561556
Change-Id: I4cd6b9bdb15fec4e115fefbef69c0c1e687d2392
Merged-In: I4cd6b9bdb15fec4e115fefbef69c0c1e687d2392
(cherry picked from commit d316cc49ae)
This commit is contained in:
Yi Kong
2021-07-21 15:15:06 +08:00
parent 0492d8febe
commit 83d9b454e9

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();
}