Merge "Improve IMF visibility log (4/N)"
This commit is contained in:
@@ -44,6 +44,12 @@ option java_package android.view
|
||||
32007 imf_ime_anim_finish (token|3),(animation type|1),(alpha|5),(shown|1),(insets|3)
|
||||
# IME animation is canceled.
|
||||
32008 imf_ime_anim_cancel (token|3),(animation type|1),(pending insets|3)
|
||||
# IME remote animation is started.
|
||||
32009 imf_ime_remote_anim_start (token|3),(displayId|1),(direction|1),(alpha|5),(startY|5),(endY|5),(leash|3),(insets|3),(surface position|3),(ime frame|3)
|
||||
# IME remote animation is end.
|
||||
32010 imf_ime_remote_anim_end (token|3),(displayId|1),(direction|1),(endY|5),(leash|3),(insets|3),(surface position|3),(ime frame|3)
|
||||
# IME remote animation is canceled.
|
||||
32011 imf_ime_remote_anim_cancel (token|3),(displayId|1),(insets|3)
|
||||
|
||||
# 62000 - 62199 reserved for inputflinger
|
||||
|
||||
|
||||
@@ -16,6 +16,12 @@
|
||||
|
||||
package com.android.wm.shell.common;
|
||||
|
||||
import static android.view.EventLogTags.IMF_IME_REMOTE_ANIM_CANCEL;
|
||||
import static android.view.EventLogTags.IMF_IME_REMOTE_ANIM_END;
|
||||
import static android.view.EventLogTags.IMF_IME_REMOTE_ANIM_START;
|
||||
import static android.view.inputmethod.ImeTracker.DEBUG_IME_VISIBILITY;
|
||||
import static android.view.inputmethod.ImeTracker.TOKEN_NONE;
|
||||
|
||||
import android.animation.Animator;
|
||||
import android.animation.AnimatorListenerAdapter;
|
||||
import android.animation.ValueAnimator;
|
||||
@@ -26,6 +32,7 @@ import android.content.res.Configuration;
|
||||
import android.graphics.Point;
|
||||
import android.graphics.Rect;
|
||||
import android.os.RemoteException;
|
||||
import android.util.EventLog;
|
||||
import android.util.Slog;
|
||||
import android.util.SparseArray;
|
||||
import android.view.IDisplayWindowInsetsController;
|
||||
@@ -47,6 +54,7 @@ import androidx.annotation.VisibleForTesting;
|
||||
import com.android.wm.shell.sysui.ShellInit;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Objects;
|
||||
import java.util.concurrent.Executor;
|
||||
|
||||
/**
|
||||
@@ -469,6 +477,15 @@ public class DisplayImeController implements DisplayController.OnDisplaysChanged
|
||||
ImeTracker.PHASE_WM_ANIMATION_RUNNING);
|
||||
t.show(mImeSourceControl.getLeash());
|
||||
}
|
||||
if (DEBUG_IME_VISIBILITY) {
|
||||
EventLog.writeEvent(IMF_IME_REMOTE_ANIM_START,
|
||||
statsToken != null ? statsToken.getTag() : TOKEN_NONE,
|
||||
mDisplayId, mAnimationDirection, alpha, startY , endY,
|
||||
Objects.toString(mImeSourceControl.getLeash()),
|
||||
Objects.toString(mImeSourceControl.getInsetsHint()),
|
||||
Objects.toString(mImeSourceControl.getSurfacePosition()),
|
||||
Objects.toString(mImeFrame));
|
||||
}
|
||||
t.apply();
|
||||
mTransactionPool.release(t);
|
||||
}
|
||||
@@ -476,6 +493,11 @@ public class DisplayImeController implements DisplayController.OnDisplaysChanged
|
||||
@Override
|
||||
public void onAnimationCancel(Animator animation) {
|
||||
mCancelled = true;
|
||||
if (DEBUG_IME_VISIBILITY) {
|
||||
EventLog.writeEvent(IMF_IME_REMOTE_ANIM_CANCEL,
|
||||
statsToken != null ? statsToken.getTag() : TOKEN_NONE, mDisplayId,
|
||||
Objects.toString(mImeSourceControl.getInsetsHint()));
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -499,6 +521,15 @@ public class DisplayImeController implements DisplayController.OnDisplaysChanged
|
||||
ImeTracker.get().onCancelled(mStatsToken,
|
||||
ImeTracker.PHASE_WM_ANIMATION_RUNNING);
|
||||
}
|
||||
if (DEBUG_IME_VISIBILITY) {
|
||||
EventLog.writeEvent(IMF_IME_REMOTE_ANIM_END,
|
||||
statsToken != null ? statsToken.getTag() : TOKEN_NONE,
|
||||
mDisplayId, mAnimationDirection, endY,
|
||||
Objects.toString(mImeSourceControl.getLeash()),
|
||||
Objects.toString(mImeSourceControl.getInsetsHint()),
|
||||
Objects.toString(mImeSourceControl.getSurfacePosition()),
|
||||
Objects.toString(mImeFrame));
|
||||
}
|
||||
t.apply();
|
||||
mTransactionPool.release(t);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user