Loading packages/SystemUI/src/com/android/systemui/statusbar/NotificationContentView.java +5 −3 Original line number Diff line number Diff line Loading @@ -315,8 +315,7 @@ public class NotificationContentView extends FrameLayout { * @return The extra height needed. */ private int getExtraRemoteInputHeight(RemoteInputView remoteInput) { if (remoteInput != null && remoteInput.getVisibility() == VISIBLE && remoteInput.isActive()) { if (remoteInput != null && (remoteInput.isActive() || remoteInput.isSending())) { return getResources().getDimensionPixelSize( com.android.internal.R.dimen.notification_content_margin); } Loading Loading @@ -1705,7 +1704,10 @@ public class NotificationContentView extends FrameLayout { if (mHeadsUpChild == null) { viewType = VISIBLE_TYPE_CONTRACTED; } return getViewHeight(viewType) + getExtraRemoteInputHeight(mHeadsUpRemoteInput); // The headsUp remote input quickly switches to the expanded one, so lets also include that // one return getViewHeight(viewType) + getExtraRemoteInputHeight(mHeadsUpRemoteInput) + getExtraRemoteInputHeight(mExpandedRemoteInput); } public void setRemoteInputVisible(boolean remoteInputVisible) { Loading packages/SystemUI/src/com/android/systemui/statusbar/RemoteInputController.java +10 −0 Original line number Diff line number Diff line Loading @@ -165,6 +165,16 @@ public class RemoteInputController { return mSpinning.containsKey(key); } /** * Same as {@link #isSpinning}, but also verifies that the token is the same * @param key the key that is spinning * @param token the token that needs to be the same * @return if this key with a given token is spinning */ public boolean isSpinning(String key, Object token) { return mSpinning.get(key) == token; } private void apply(NotificationData.Entry entry) { mDelegate.setRemoteInputActive(entry, isRemoteInputActive(entry)); boolean remoteInputActive = isRemoteInputActive(); Loading packages/SystemUI/src/com/android/systemui/statusbar/policy/RemoteInputView.java +5 −1 Original line number Diff line number Diff line Loading @@ -285,12 +285,12 @@ public class RemoteInputView extends LinearLayout implements View.OnClickListene if (mWrapper != null) { mWrapper.setRemoteInputVisible(true); } mController.addRemoteInput(mEntry, mToken); mEditText.setInnerFocusable(true); mEditText.mShowImeOnInputConnection = true; mEditText.setText(mEntry.remoteInputText); mEditText.setSelection(mEditText.getText().length()); mEditText.requestFocus(); mController.addRemoteInput(mEntry, mToken); updateSendButton(); } Loading Loading @@ -466,6 +466,10 @@ public class RemoteInputView extends LinearLayout implements View.OnClickListene } } public boolean isSending() { return getVisibility() == VISIBLE && mController.isSpinning(mEntry.key, mToken); } /** * An EditText that changes appearance based on whether it's focusable and becomes * un-focusable whenever the user navigates away from it or it becomes invisible. Loading Loading
packages/SystemUI/src/com/android/systemui/statusbar/NotificationContentView.java +5 −3 Original line number Diff line number Diff line Loading @@ -315,8 +315,7 @@ public class NotificationContentView extends FrameLayout { * @return The extra height needed. */ private int getExtraRemoteInputHeight(RemoteInputView remoteInput) { if (remoteInput != null && remoteInput.getVisibility() == VISIBLE && remoteInput.isActive()) { if (remoteInput != null && (remoteInput.isActive() || remoteInput.isSending())) { return getResources().getDimensionPixelSize( com.android.internal.R.dimen.notification_content_margin); } Loading Loading @@ -1705,7 +1704,10 @@ public class NotificationContentView extends FrameLayout { if (mHeadsUpChild == null) { viewType = VISIBLE_TYPE_CONTRACTED; } return getViewHeight(viewType) + getExtraRemoteInputHeight(mHeadsUpRemoteInput); // The headsUp remote input quickly switches to the expanded one, so lets also include that // one return getViewHeight(viewType) + getExtraRemoteInputHeight(mHeadsUpRemoteInput) + getExtraRemoteInputHeight(mExpandedRemoteInput); } public void setRemoteInputVisible(boolean remoteInputVisible) { Loading
packages/SystemUI/src/com/android/systemui/statusbar/RemoteInputController.java +10 −0 Original line number Diff line number Diff line Loading @@ -165,6 +165,16 @@ public class RemoteInputController { return mSpinning.containsKey(key); } /** * Same as {@link #isSpinning}, but also verifies that the token is the same * @param key the key that is spinning * @param token the token that needs to be the same * @return if this key with a given token is spinning */ public boolean isSpinning(String key, Object token) { return mSpinning.get(key) == token; } private void apply(NotificationData.Entry entry) { mDelegate.setRemoteInputActive(entry, isRemoteInputActive(entry)); boolean remoteInputActive = isRemoteInputActive(); Loading
packages/SystemUI/src/com/android/systemui/statusbar/policy/RemoteInputView.java +5 −1 Original line number Diff line number Diff line Loading @@ -285,12 +285,12 @@ public class RemoteInputView extends LinearLayout implements View.OnClickListene if (mWrapper != null) { mWrapper.setRemoteInputVisible(true); } mController.addRemoteInput(mEntry, mToken); mEditText.setInnerFocusable(true); mEditText.mShowImeOnInputConnection = true; mEditText.setText(mEntry.remoteInputText); mEditText.setSelection(mEditText.getText().length()); mEditText.requestFocus(); mController.addRemoteInput(mEntry, mToken); updateSendButton(); } Loading Loading @@ -466,6 +466,10 @@ public class RemoteInputView extends LinearLayout implements View.OnClickListene } } public boolean isSending() { return getVisibility() == VISIBLE && mController.isSpinning(mEntry.key, mToken); } /** * An EditText that changes appearance based on whether it's focusable and becomes * un-focusable whenever the user navigates away from it or it becomes invisible. Loading