Loading core/java/android/view/InsetsController.java +7 −15 Original line number Diff line number Diff line Loading @@ -1816,13 +1816,12 @@ public class InsetsController implements WindowInsetsController, InsetsAnimation cancelAnimation(runner, true /* invokeCallback */); } } if (type == ime()) { abortPendingImeControlRequest(); } if (consumer.getType() != ime()) { if (type != ime()) { // IME consumer should always be there since we need to communicate with // InputMethodManager no matter we have the control or not. // InputMethodManager no matter if we have the control or not. mSourceConsumers.remove(consumer.getId()); } else { abortPendingImeControlRequest(); } } Loading Loading @@ -1901,20 +1900,13 @@ public class InsetsController implements WindowInsetsController, InsetsAnimation } @VisibleForTesting public @NonNull InsetsSourceConsumer getSourceConsumer(int id, int type) { @NonNull public final InsetsSourceConsumer getSourceConsumer(int id, @InsetsType int type) { InsetsSourceConsumer consumer = mSourceConsumers.get(id); if (consumer != null) { return consumer; } // ImeSourceConsumer is created using getSourceConsumer, so it is initially null here. if (type == ime() && mImeSourceConsumer != null) { // WindowInsets.Type.ime() should be only provided by one source. mSourceConsumers.remove(mImeSourceConsumer.getId()); consumer = mImeSourceConsumer; consumer.setId(id); } else { consumer = mConsumerCreator.apply(this, id, type); } mSourceConsumers.put(id, consumer); return consumer; } Loading core/java/android/view/InsetsSourceConsumer.java +1 −5 Original line number Diff line number Diff line Loading @@ -87,7 +87,7 @@ public class InsetsSourceConsumer { protected final InsetsController mController; protected final InsetsState mState; private int mId; private final int mId; @InsetsType private final int mType; Loading Loading @@ -235,10 +235,6 @@ public class InsetsSourceConsumer { return mId; } void setId(int id) { mId = id; } @InsetsType int getType() { return mType; } Loading Loading
core/java/android/view/InsetsController.java +7 −15 Original line number Diff line number Diff line Loading @@ -1816,13 +1816,12 @@ public class InsetsController implements WindowInsetsController, InsetsAnimation cancelAnimation(runner, true /* invokeCallback */); } } if (type == ime()) { abortPendingImeControlRequest(); } if (consumer.getType() != ime()) { if (type != ime()) { // IME consumer should always be there since we need to communicate with // InputMethodManager no matter we have the control or not. // InputMethodManager no matter if we have the control or not. mSourceConsumers.remove(consumer.getId()); } else { abortPendingImeControlRequest(); } } Loading Loading @@ -1901,20 +1900,13 @@ public class InsetsController implements WindowInsetsController, InsetsAnimation } @VisibleForTesting public @NonNull InsetsSourceConsumer getSourceConsumer(int id, int type) { @NonNull public final InsetsSourceConsumer getSourceConsumer(int id, @InsetsType int type) { InsetsSourceConsumer consumer = mSourceConsumers.get(id); if (consumer != null) { return consumer; } // ImeSourceConsumer is created using getSourceConsumer, so it is initially null here. if (type == ime() && mImeSourceConsumer != null) { // WindowInsets.Type.ime() should be only provided by one source. mSourceConsumers.remove(mImeSourceConsumer.getId()); consumer = mImeSourceConsumer; consumer.setId(id); } else { consumer = mConsumerCreator.apply(this, id, type); } mSourceConsumers.put(id, consumer); return consumer; } Loading
core/java/android/view/InsetsSourceConsumer.java +1 −5 Original line number Diff line number Diff line Loading @@ -87,7 +87,7 @@ public class InsetsSourceConsumer { protected final InsetsController mController; protected final InsetsState mState; private int mId; private final int mId; @InsetsType private final int mType; Loading Loading @@ -235,10 +235,6 @@ public class InsetsSourceConsumer { return mId; } void setId(int id) { mId = id; } @InsetsType int getType() { return mType; } Loading