Loading core/java/android/inputmethodservice/InputMethodService.java +1 −0 Original line number Diff line number Diff line Loading @@ -4640,6 +4640,7 @@ public class InputMethodService extends AbstractInputMethodService { + " touchableRegion=" + mTmpInsets.touchableRegion); p.println(" mSettingsObserver=" + mSettingsObserver); p.println(" mNavigationBarController=" + mNavigationBarController.toDebugString()); p.println(" mBackCallbackRegistered=" + mBackCallbackRegistered); } private final ImeTracing.ServiceDumper mDumper = new ImeTracing.ServiceDumper() { Loading core/java/android/window/ImeOnBackInvokedDispatcher.java +31 −3 Original line number Diff line number Diff line Loading @@ -79,6 +79,11 @@ public class ImeOnBackInvokedDispatcher implements OnBackInvokedDispatcher, Parc /** Set receiving dispatcher to consume queued receiving events. */ public void updateReceivingDispatcher(@NonNull WindowOnBackInvokedDispatcher dispatcher) { if (!mQueuedReceive.isEmpty()) { //TODO(b/407224281): Remove this log again once b/407224281 is resolved Log.d(TAG, "updateReceivingDispatcher (mQueuedReceive.size=" + mQueuedReceive.size() + ")"); } while (!mQueuedReceive.isEmpty()) { final Pair<Integer, Bundle> queuedMessage = mQueuedReceive.poll(); receive(queuedMessage.first, queuedMessage.second, dispatcher); Loading Loading @@ -118,6 +123,9 @@ public class ImeOnBackInvokedDispatcher implements OnBackInvokedDispatcher, Parc bundle.putInt(RESULT_KEY_PRIORITY, priority); bundle.putInt(RESULT_KEY_ID, callback.hashCode()); mResultReceiver.send(RESULT_CODE_REGISTER, bundle); //TODO(b/407224281): Remove this log again once b/407224281 is resolved Log.d(TAG, "Send callback registration id=" + callback.hashCode() + " priority=" + priority); } @Override Loading @@ -126,6 +134,8 @@ public class ImeOnBackInvokedDispatcher implements OnBackInvokedDispatcher, Parc Bundle bundle = new Bundle(); bundle.putInt(RESULT_KEY_ID, callback.hashCode()); mResultReceiver.send(RESULT_CODE_UNREGISTER, bundle); //TODO(b/407224281): Remove this log again once b/407224281 is resolved Log.d(TAG, "Send callback unregistration id=" + callback.hashCode()); } @Override Loading Loading @@ -187,12 +197,16 @@ public class ImeOnBackInvokedDispatcher implements OnBackInvokedDispatcher, Parc + "reregistering. (callbackId: " + callbackId + " current callbacks: " + mImeCallbacks.size() + ")"); } //TODO(b/407224281): Remove this log again once b/407224281 is resolved Log.d(TAG, "Register received callback id=" + callbackId + " priority=" + priority); mImeCallbacks.add(imeCallback); receivingDispatcher.registerOnBackInvokedCallbackUnchecked(imeCallback, priority); } private void unregisterReceivedCallback( int callbackId, @NonNull OnBackInvokedDispatcher receivingDispatcher) { //TODO(b/407224281): Remove this log again once b/407224281 is resolved Log.d(TAG, "Unregister received callback id=" + callbackId); if (!unregisterCallback(callbackId, receivingDispatcher)) { Log.w(TAG, "Ime callback not found. Ignoring unregisterReceivedCallback. " + "callbackId: " + callbackId Loading Loading @@ -223,6 +237,8 @@ public class ImeOnBackInvokedDispatcher implements OnBackInvokedDispatcher, Parc * {@link ImeOnBackInvokedDispatcher#undoPreliminaryClear()}. */ public void preliminaryClear() { //TODO(b/407224281): Remove this log again once b/407224281 is resolved Log.d(TAG, "Preliminary clear (mImeCallbacks.size=" + mImeCallbacks.size() + ")"); // Unregister previously registered callbacks if there's any. if (getReceivingDispatcher() != null) { for (ImeOnBackInvokedCallback callback : mImeCallbacks) { Loading @@ -237,6 +253,8 @@ public class ImeOnBackInvokedDispatcher implements OnBackInvokedDispatcher, Parc * animation is interrupted causing the IME to reappear. */ public void undoPreliminaryClear() { //TODO(b/407224281): Remove this log again once b/407224281 is resolved Log.d(TAG, "Undo preliminary clear (mImeCallbacks.size=" + mImeCallbacks.size() + ")"); if (getReceivingDispatcher() != null) { for (ImeOnBackInvokedCallback callback : mImeCallbacks) { getReceivingDispatcher().registerOnBackInvokedCallbackUnchecked(callback, Loading @@ -247,6 +265,8 @@ public class ImeOnBackInvokedDispatcher implements OnBackInvokedDispatcher, Parc /** Clears all registered callbacks on the instance. */ public void clear() { //TODO(b/407224281): Remove this log again once b/407224281 is resolved Log.d(TAG, "Clear (mImeCallbacks.size=" + mImeCallbacks.size() + ")"); // Unregister previously registered callbacks if there's any. if (getReceivingDispatcher() != null) { for (ImeOnBackInvokedCallback callback : mImeCallbacks) { Loading Loading @@ -277,12 +297,12 @@ public class ImeOnBackInvokedDispatcher implements OnBackInvokedDispatcher, Parc @VisibleForTesting(visibility = PACKAGE) public static class ImeOnBackInvokedCallback implements OnBackAnimationCallback { @NonNull private final IOnBackInvokedCallback mIOnBackInvokedCallback; protected final IOnBackInvokedCallback mIOnBackInvokedCallback; /** * The hashcode of the callback instance in the IME process, used as a unique id to * identify the callback when it's passed between processes. */ private final int mId; protected final int mId; private final int mPriority; ImeOnBackInvokedCallback(@NonNull IOnBackInvokedCallback iCallback, int id, Loading Loading @@ -348,7 +368,7 @@ public class ImeOnBackInvokedDispatcher implements OnBackInvokedDispatcher, Parc @Override public String toString() { return "ImeCallback=ImeOnBackInvokedCallback@" + mId return "ImeOnBackInvokedCallback@" + mId + " Callback=" + mIOnBackInvokedCallback; } } Loading @@ -363,6 +383,12 @@ public class ImeOnBackInvokedDispatcher implements OnBackInvokedDispatcher, Parc int priority) { super(iCallback, id, priority); } @Override public String toString() { return "DefaultImeOnBackAnimationCallback@" + mId + " Callback=" + mIOnBackInvokedCallback; } } /** Loading @@ -373,6 +399,8 @@ public class ImeOnBackInvokedDispatcher implements OnBackInvokedDispatcher, Parc * @param current the currently focused {@link ViewRootImpl}. */ public void switchRootView(ViewRootImpl previous, ViewRootImpl current) { //TODO(b/407224281): Remove this log again once b/407224281 is resolved Log.d(TAG, "switch root view (mImeCallbacks.size=" + mImeCallbacks.size() + ")"); for (ImeOnBackInvokedCallback imeCallback : mImeCallbacks) { if (previous != null) { previous.getOnBackInvokedDispatcher().unregisterOnBackInvokedCallback(imeCallback); Loading Loading
core/java/android/inputmethodservice/InputMethodService.java +1 −0 Original line number Diff line number Diff line Loading @@ -4640,6 +4640,7 @@ public class InputMethodService extends AbstractInputMethodService { + " touchableRegion=" + mTmpInsets.touchableRegion); p.println(" mSettingsObserver=" + mSettingsObserver); p.println(" mNavigationBarController=" + mNavigationBarController.toDebugString()); p.println(" mBackCallbackRegistered=" + mBackCallbackRegistered); } private final ImeTracing.ServiceDumper mDumper = new ImeTracing.ServiceDumper() { Loading
core/java/android/window/ImeOnBackInvokedDispatcher.java +31 −3 Original line number Diff line number Diff line Loading @@ -79,6 +79,11 @@ public class ImeOnBackInvokedDispatcher implements OnBackInvokedDispatcher, Parc /** Set receiving dispatcher to consume queued receiving events. */ public void updateReceivingDispatcher(@NonNull WindowOnBackInvokedDispatcher dispatcher) { if (!mQueuedReceive.isEmpty()) { //TODO(b/407224281): Remove this log again once b/407224281 is resolved Log.d(TAG, "updateReceivingDispatcher (mQueuedReceive.size=" + mQueuedReceive.size() + ")"); } while (!mQueuedReceive.isEmpty()) { final Pair<Integer, Bundle> queuedMessage = mQueuedReceive.poll(); receive(queuedMessage.first, queuedMessage.second, dispatcher); Loading Loading @@ -118,6 +123,9 @@ public class ImeOnBackInvokedDispatcher implements OnBackInvokedDispatcher, Parc bundle.putInt(RESULT_KEY_PRIORITY, priority); bundle.putInt(RESULT_KEY_ID, callback.hashCode()); mResultReceiver.send(RESULT_CODE_REGISTER, bundle); //TODO(b/407224281): Remove this log again once b/407224281 is resolved Log.d(TAG, "Send callback registration id=" + callback.hashCode() + " priority=" + priority); } @Override Loading @@ -126,6 +134,8 @@ public class ImeOnBackInvokedDispatcher implements OnBackInvokedDispatcher, Parc Bundle bundle = new Bundle(); bundle.putInt(RESULT_KEY_ID, callback.hashCode()); mResultReceiver.send(RESULT_CODE_UNREGISTER, bundle); //TODO(b/407224281): Remove this log again once b/407224281 is resolved Log.d(TAG, "Send callback unregistration id=" + callback.hashCode()); } @Override Loading Loading @@ -187,12 +197,16 @@ public class ImeOnBackInvokedDispatcher implements OnBackInvokedDispatcher, Parc + "reregistering. (callbackId: " + callbackId + " current callbacks: " + mImeCallbacks.size() + ")"); } //TODO(b/407224281): Remove this log again once b/407224281 is resolved Log.d(TAG, "Register received callback id=" + callbackId + " priority=" + priority); mImeCallbacks.add(imeCallback); receivingDispatcher.registerOnBackInvokedCallbackUnchecked(imeCallback, priority); } private void unregisterReceivedCallback( int callbackId, @NonNull OnBackInvokedDispatcher receivingDispatcher) { //TODO(b/407224281): Remove this log again once b/407224281 is resolved Log.d(TAG, "Unregister received callback id=" + callbackId); if (!unregisterCallback(callbackId, receivingDispatcher)) { Log.w(TAG, "Ime callback not found. Ignoring unregisterReceivedCallback. " + "callbackId: " + callbackId Loading Loading @@ -223,6 +237,8 @@ public class ImeOnBackInvokedDispatcher implements OnBackInvokedDispatcher, Parc * {@link ImeOnBackInvokedDispatcher#undoPreliminaryClear()}. */ public void preliminaryClear() { //TODO(b/407224281): Remove this log again once b/407224281 is resolved Log.d(TAG, "Preliminary clear (mImeCallbacks.size=" + mImeCallbacks.size() + ")"); // Unregister previously registered callbacks if there's any. if (getReceivingDispatcher() != null) { for (ImeOnBackInvokedCallback callback : mImeCallbacks) { Loading @@ -237,6 +253,8 @@ public class ImeOnBackInvokedDispatcher implements OnBackInvokedDispatcher, Parc * animation is interrupted causing the IME to reappear. */ public void undoPreliminaryClear() { //TODO(b/407224281): Remove this log again once b/407224281 is resolved Log.d(TAG, "Undo preliminary clear (mImeCallbacks.size=" + mImeCallbacks.size() + ")"); if (getReceivingDispatcher() != null) { for (ImeOnBackInvokedCallback callback : mImeCallbacks) { getReceivingDispatcher().registerOnBackInvokedCallbackUnchecked(callback, Loading @@ -247,6 +265,8 @@ public class ImeOnBackInvokedDispatcher implements OnBackInvokedDispatcher, Parc /** Clears all registered callbacks on the instance. */ public void clear() { //TODO(b/407224281): Remove this log again once b/407224281 is resolved Log.d(TAG, "Clear (mImeCallbacks.size=" + mImeCallbacks.size() + ")"); // Unregister previously registered callbacks if there's any. if (getReceivingDispatcher() != null) { for (ImeOnBackInvokedCallback callback : mImeCallbacks) { Loading Loading @@ -277,12 +297,12 @@ public class ImeOnBackInvokedDispatcher implements OnBackInvokedDispatcher, Parc @VisibleForTesting(visibility = PACKAGE) public static class ImeOnBackInvokedCallback implements OnBackAnimationCallback { @NonNull private final IOnBackInvokedCallback mIOnBackInvokedCallback; protected final IOnBackInvokedCallback mIOnBackInvokedCallback; /** * The hashcode of the callback instance in the IME process, used as a unique id to * identify the callback when it's passed between processes. */ private final int mId; protected final int mId; private final int mPriority; ImeOnBackInvokedCallback(@NonNull IOnBackInvokedCallback iCallback, int id, Loading Loading @@ -348,7 +368,7 @@ public class ImeOnBackInvokedDispatcher implements OnBackInvokedDispatcher, Parc @Override public String toString() { return "ImeCallback=ImeOnBackInvokedCallback@" + mId return "ImeOnBackInvokedCallback@" + mId + " Callback=" + mIOnBackInvokedCallback; } } Loading @@ -363,6 +383,12 @@ public class ImeOnBackInvokedDispatcher implements OnBackInvokedDispatcher, Parc int priority) { super(iCallback, id, priority); } @Override public String toString() { return "DefaultImeOnBackAnimationCallback@" + mId + " Callback=" + mIOnBackInvokedCallback; } } /** Loading @@ -373,6 +399,8 @@ public class ImeOnBackInvokedDispatcher implements OnBackInvokedDispatcher, Parc * @param current the currently focused {@link ViewRootImpl}. */ public void switchRootView(ViewRootImpl previous, ViewRootImpl current) { //TODO(b/407224281): Remove this log again once b/407224281 is resolved Log.d(TAG, "switch root view (mImeCallbacks.size=" + mImeCallbacks.size() + ")"); for (ImeOnBackInvokedCallback imeCallback : mImeCallbacks) { if (previous != null) { previous.getOnBackInvokedDispatcher().unregisterOnBackInvokedCallback(imeCallback); Loading