Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c93546ed authored by Adrian Roos's avatar Adrian Roos Committed by Android (Google) Code Review
Browse files

Merge "More inline reply goodness"

parents 230e02ff 777ef568
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -431,6 +431,11 @@ public class NotificationContentView extends FrameLayout {
     */
    private int calculateVisibleType() {
        boolean noExpandedChild = mExpandedChild == null;

        if (!noExpandedChild && mContentHeight == mExpandedChild.getHeight()) {
            return VISIBLE_TYPE_EXPANDED;
        }

        if (mIsHeadsUp && mHeadsUpChild != null) {
            if (mContentHeight <= mHeadsUpChild.getHeight() || noExpandedChild) {
                return VISIBLE_TYPE_HEADSUP;
+1 −0
Original line number Diff line number Diff line
@@ -59,6 +59,7 @@ public class NotificationData {
        public RemoteViews cachedBigContentView;
        public RemoteViews cachedHeadsUpContentView;
        public RemoteViews cachedPublicContentView;
        public CharSequence remoteInputText;

        public Entry(StatusBarNotification n, StatusBarIconView ic) {
            this.key = n.getKey();
+7 −1
Original line number Diff line number Diff line
@@ -148,6 +148,7 @@ public class RemoteInputView extends LinearLayout implements View.OnClickListene

    public void onDefocus() {
        mController.removeRemoteInput(mEntry);
        mEntry.remoteInputText = mEditText.getText();
        setVisibility(INVISIBLE);
    }

@@ -171,6 +172,8 @@ public class RemoteInputView extends LinearLayout implements View.OnClickListene
        mEditText.setInnerFocusable(true);
        mController.addRemoteInput(mEntry);
        mEditText.mShowImeOnInputConnection = true;
        mEditText.setText(mEntry.remoteInputText);
        mEditText.setSelection(mEditText.getText().length());
        mEditText.requestFocus();
    }

@@ -216,8 +219,11 @@ public class RemoteInputView extends LinearLayout implements View.OnClickListene

        @Override
        public boolean onKeyPreIme(int keyCode, KeyEvent event) {
            if (keyCode == KeyEvent.KEYCODE_BACK) {
            if (keyCode == KeyEvent.KEYCODE_BACK && event.getAction() == KeyEvent.ACTION_UP) {
                defocusIfNeeded();
                final InputMethodManager imm = InputMethodManager.getInstance();
                imm.hideSoftInputFromWindow(getWindowToken(), 0);
                return true;
            }
            return super.onKeyPreIme(keyCode, event);
        }
+1 −1
Original line number Diff line number Diff line
@@ -1867,7 +1867,7 @@ public class NotificationStackScrollLayout extends ViewGroup
            }
            mNeedsAnimation = true;
        }
        if (isHeadsUp(child)) {
        if (isHeadsUp(child) && !mChangePositionInProgress) {
            mAddedHeadsUpChildren.add(child);
            mChildrenToAddAnimated.remove(child);
        }