diff options
| author | 2023-05-12 01:27:46 +0000 | |
|---|---|---|
| committer | 2023-05-12 01:27:46 +0000 | |
| commit | 1f664c79ddfcc69e707b6f64b745f2b61ba1ce00 (patch) | |
| tree | 78d7ae76f4b8e192bd1245f43799a5772f110404 | |
| parent | f68288e4b8af9c1ef3e7f1dbb0c3d42921973777 (diff) | |
| parent | d4460ca5cc45cf12ef876e9c4c748bf9a97bac31 (diff) | |
Merge "[Autofill PCC] Restrict complete logging to debug bulids" into udc-dev am: d4460ca5cc
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/23156537
Change-Id: I8cde0447d2255b92aaf2c0e731dc091fbf270755
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
| -rw-r--r-- | services/autofill/java/com/android/server/autofill/RemoteFieldClassificationService.java | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/services/autofill/java/com/android/server/autofill/RemoteFieldClassificationService.java b/services/autofill/java/com/android/server/autofill/RemoteFieldClassificationService.java index b8bac61b346b..ea31074ff5d2 100644 --- a/services/autofill/java/com/android/server/autofill/RemoteFieldClassificationService.java +++ b/services/autofill/java/com/android/server/autofill/RemoteFieldClassificationService.java @@ -28,6 +28,7 @@ import android.content.Context; import android.content.Intent; import android.content.pm.PackageManager; import android.content.pm.ServiceInfo; +import android.os.Build; import android.os.ICancellationSignal; import android.os.RemoteException; import android.os.SystemClock; @@ -155,7 +156,19 @@ final class RemoteFieldClassificationService public void onSuccess(FieldClassificationResponse response) { logLatency(startTime); if (sDebug) { - Log.d(TAG, "onSuccess Response: " + response); + if (Build.IS_DEBUGGABLE) { + Slog.d(TAG, "onSuccess Response: " + response); + } else { + String msg = ""; + if (response == null + || response.getClassifications() == null) { + msg = "null response"; + } else { + msg = "size: " + + response.getClassifications().size(); + } + Slog.d(TAG, "onSuccess " + msg); + } } fieldClassificationServiceCallbacks .onClassificationRequestSuccess(response); @@ -165,7 +178,7 @@ final class RemoteFieldClassificationService public void onFailure() { logLatency(startTime); if (sDebug) { - Log.d(TAG, "onFailure"); + Slog.d(TAG, "onFailure"); } fieldClassificationServiceCallbacks .onClassificationRequestFailure(0, null); |