Skip to content
Snippets Groups Projects
Commit 954f834a authored by Jiewen Lei's avatar Jiewen Lei Committed by Android (Google) Code Review
Browse files

Revert "Log verbose autofill logs with autofill tag" due to Jank regression.

This reverts commit 88d94ff9.

Reason for revert: b/336028252

Change-Id: I1dc999f3fc741afa8e516596434c4fdc07d9d9ab
parent 88d94ff9
No related branches found
No related tags found
No related merge requests found
......@@ -910,12 +910,6 @@ public class View implements Drawable.Callback, KeyEvent.Callback,
// set if a session is not started.
private static final String AUTOFILL_LOG_TAG = "View.Autofill";
 
/**
* The logging tag used by this class when logging verbose and chatty (high volume)
* autofill-related messages.
*/
private static final String AUTOFILL_CHATTY_LOG_TAG = "View.Autofill.Chatty";
/**
* The logging tag used by this class when logging content capture-related messages.
*/
......@@ -8697,8 +8691,8 @@ public class View implements Drawable.Callback, KeyEvent.Callback,
@CallSuper
protected void onFocusChanged(boolean gainFocus, @FocusDirection int direction,
@Nullable Rect previouslyFocusedRect) {
if (Log.isLoggable(AUTOFILL_CHATTY_LOG_TAG, Log.VERBOSE)) {
Log.v(AUTOFILL_CHATTY_LOG_TAG, "onFocusChanged() entered. gainFocus: "
if (DBG) {
Log.d(VIEW_LOG_TAG, "onFocusChanged() entered. gainFocus: "
+ gainFocus);
}
if (gainFocus) {
......@@ -8766,8 +8760,8 @@ public class View implements Drawable.Callback, KeyEvent.Callback,
if (canNotifyAutofillEnterExitEvent()) {
AutofillManager afm = getAutofillManager();
if (afm != null) {
if (Log.isLoggable(AUTOFILL_CHATTY_LOG_TAG, Log.VERBOSE)) {
Log.v(AUTOFILL_CHATTY_LOG_TAG, this + " afm is not null");
if (DBG) {
Log.d(VIEW_LOG_TAG, this + " afm is not null");
}
if (enter) {
// We have not been laid out yet, hence cannot evaluate
......@@ -8780,8 +8774,8 @@ public class View implements Drawable.Callback, KeyEvent.Callback,
// animation beginning. On the time, the view is not visible
// to the user. And then as the animation progresses, the view
// becomes visible to the user.
if (Log.isLoggable(AUTOFILL_CHATTY_LOG_TAG, Log.VERBOSE)) {
Log.v(AUTOFILL_CHATTY_LOG_TAG,
if (DBG) {
Log.d(VIEW_LOG_TAG,
"notifyEnterOrExitForAutoFillIfNeeded:"
+ " isLaidOut(): " + isLaidOut()
+ " isVisibleToUser(): " + isVisibleToUser()
......@@ -11013,28 +11007,28 @@ public class View implements Drawable.Callback, KeyEvent.Callback,
}
 
private boolean isAutofillable() {
if (Log.isLoggable(AUTOFILL_CHATTY_LOG_TAG, Log.VERBOSE)) {
Log.v(AUTOFILL_CHATTY_LOG_TAG, "isAutofillable() entered.");
if (DBG) {
Log.d(VIEW_LOG_TAG, "isAutofillable() entered.");
}
if (getAutofillType() == AUTOFILL_TYPE_NONE) {
if (Log.isLoggable(AUTOFILL_CHATTY_LOG_TAG, Log.VERBOSE)) {
Log.v(AUTOFILL_CHATTY_LOG_TAG, "getAutofillType() returns AUTOFILL_TYPE_NONE");
if (DBG) {
Log.d(VIEW_LOG_TAG, "getAutofillType() returns AUTOFILL_TYPE_NONE");
}
return false;
}
 
final AutofillManager afm = getAutofillManager();
if (afm == null) {
if (Log.isLoggable(AUTOFILL_CHATTY_LOG_TAG, Log.VERBOSE)) {
Log.v(AUTOFILL_CHATTY_LOG_TAG, "AutofillManager is null");
if (DBG) {
Log.d(VIEW_LOG_TAG, "AutofillManager is null");
}
return false;
}
 
// Check whether view is not part of an activity. If it's not, return false.
if (getAutofillViewId() <= LAST_APP_AUTOFILL_ID) {
if (Log.isLoggable(AUTOFILL_CHATTY_LOG_TAG, Log.VERBOSE)) {
Log.v(AUTOFILL_CHATTY_LOG_TAG, "getAutofillViewId()<=LAST_APP_AUTOFILL_ID");
if (DBG) {
Log.d(VIEW_LOG_TAG, "getAutofillViewId()<=LAST_APP_AUTOFILL_ID");
}
return false;
}
......@@ -11045,9 +11039,8 @@ public class View implements Drawable.Callback, KeyEvent.Callback,
if ((isImportantForAutofill() && afm.isTriggerFillRequestOnFilteredImportantViewsEnabled())
|| (!isImportantForAutofill()
&& afm.isTriggerFillRequestOnUnimportantViewEnabled())) {
if (Log.isLoggable(AUTOFILL_CHATTY_LOG_TAG, Log.VERBOSE)) {
Log.v(AUTOFILL_CHATTY_LOG_TAG,
"isImportantForAutofill(): " + isImportantForAutofill()
if (DBG) {
Log.d(VIEW_LOG_TAG, "isImportantForAutofill(): " + isImportantForAutofill()
+ "afm.isAutofillable(): " + afm.isAutofillable(this));
}
return afm.isAutofillable(this) ? true : notifyAugmentedAutofillIfNeeded(afm);
......@@ -11055,8 +11048,8 @@ public class View implements Drawable.Callback, KeyEvent.Callback,
 
// If the previous condition is not met, fall back to the previous way to trigger fill
// request based on autofill importance instead.
if (Log.isLoggable(AUTOFILL_CHATTY_LOG_TAG, Log.VERBOSE)) {
Log.v(AUTOFILL_CHATTY_LOG_TAG, "isImportantForAutofill(): " + isImportantForAutofill());
if (DBG) {
Log.d(VIEW_LOG_TAG, "isImportantForAutofill(): " + isImportantForAutofill());
}
return isImportantForAutofill() ? true : notifyAugmentedAutofillIfNeeded(afm);
}
......@@ -11072,8 +11065,8 @@ public class View implements Drawable.Callback, KeyEvent.Callback,
 
/** @hide */
public boolean canNotifyAutofillEnterExitEvent() {
if (Log.isLoggable(AUTOFILL_CHATTY_LOG_TAG, Log.VERBOSE)) {
Log.v(AUTOFILL_CHATTY_LOG_TAG, "canNotifyAutofillEnterExitEvent() entered. "
if (DBG) {
Log.d(VIEW_LOG_TAG, "canNotifyAutofillEnterExitEvent() entered. "
+ " isAutofillable(): " + isAutofillable()
+ " isAttachedToWindow(): " + isAttachedToWindow());
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment