Merge "Remove verbose logcat messages in TextViewOnReceiveContentListener" into sc-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
75dc1f16e3
@@ -183,15 +183,9 @@ public final class TextViewOnReceiveContentListener implements OnReceiveContentL
|
|||||||
*/
|
*/
|
||||||
private static boolean isUsageOfImeCommitContentEnabled(@NonNull View view) {
|
private static boolean isUsageOfImeCommitContentEnabled(@NonNull View view) {
|
||||||
if (view.getReceiveContentMimeTypes() != null) {
|
if (view.getReceiveContentMimeTypes() != null) {
|
||||||
if (Log.isLoggable(LOG_TAG, Log.VERBOSE)) {
|
|
||||||
Log.v(LOG_TAG, "Fallback to commitContent disabled (custom callback is set)");
|
|
||||||
}
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if (Compatibility.isChangeEnabled(AUTOFILL_NON_TEXT_REQUIRES_ON_RECEIVE_CONTENT_LISTENER)) {
|
if (Compatibility.isChangeEnabled(AUTOFILL_NON_TEXT_REQUIRES_ON_RECEIVE_CONTENT_LISTENER)) {
|
||||||
if (Log.isLoggable(LOG_TAG, Log.VERBOSE)) {
|
|
||||||
Log.v(LOG_TAG, "Fallback to commitContent disabled (target SDK is above S)");
|
|
||||||
}
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
@@ -222,10 +216,6 @@ public final class TextViewOnReceiveContentListener implements OnReceiveContentL
|
|||||||
*/
|
*/
|
||||||
void setInputConnectionInfo(@NonNull TextView view, @NonNull InputConnection ic,
|
void setInputConnectionInfo(@NonNull TextView view, @NonNull InputConnection ic,
|
||||||
@NonNull EditorInfo editorInfo) {
|
@NonNull EditorInfo editorInfo) {
|
||||||
if (Log.isLoggable(LOG_TAG, Log.VERBOSE)) {
|
|
||||||
Log.v(LOG_TAG, "setInputConnectionInfo: "
|
|
||||||
+ Arrays.toString(editorInfo.contentMimeTypes));
|
|
||||||
}
|
|
||||||
if (!isUsageOfImeCommitContentEnabled(view)) {
|
if (!isUsageOfImeCommitContentEnabled(view)) {
|
||||||
mInputConnectionInfo = null;
|
mInputConnectionInfo = null;
|
||||||
return;
|
return;
|
||||||
@@ -243,9 +233,6 @@ public final class TextViewOnReceiveContentListener implements OnReceiveContentL
|
|||||||
* callback instance.
|
* callback instance.
|
||||||
*/
|
*/
|
||||||
void clearInputConnectionInfo() {
|
void clearInputConnectionInfo() {
|
||||||
if (Log.isLoggable(LOG_TAG, Log.VERBOSE)) {
|
|
||||||
Log.v(LOG_TAG, "clearInputConnectionInfo: " + mInputConnectionInfo);
|
|
||||||
}
|
|
||||||
mInputConnectionInfo = null;
|
mInputConnectionInfo = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -265,17 +252,9 @@ public final class TextViewOnReceiveContentListener implements OnReceiveContentL
|
|||||||
}
|
}
|
||||||
final InputConnectionInfo icInfo = mInputConnectionInfo;
|
final InputConnectionInfo icInfo = mInputConnectionInfo;
|
||||||
if (icInfo == null) {
|
if (icInfo == null) {
|
||||||
if (Log.isLoggable(LOG_TAG, Log.VERBOSE)) {
|
|
||||||
Log.v(LOG_TAG, "getEditorInfoMimeTypes: No usable EditorInfo");
|
|
||||||
}
|
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
final String[] editorInfoContentMimeTypes = icInfo.mEditorInfoContentMimeTypes;
|
return icInfo.mEditorInfoContentMimeTypes;
|
||||||
if (Log.isLoggable(LOG_TAG, Log.VERBOSE)) {
|
|
||||||
Log.v(LOG_TAG, "getEditorInfoMimeTypes: "
|
|
||||||
+ Arrays.toString(editorInfoContentMimeTypes));
|
|
||||||
}
|
|
||||||
return editorInfoContentMimeTypes;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user