Loading core/java/android/widget/TextView.java +6 −9 Original line number Diff line number Diff line Loading @@ -9646,7 +9646,10 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener } boolean canShare() { return canCopy() && isDeviceProvisioned(); if (!getContext().canStartActivityForResult() || !isDeviceProvisioned()) { return false; } return canCopy(); } boolean isDeviceProvisioned() { Loading @@ -9669,16 +9672,10 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener } boolean canProcessText() { if (!getContext().canStartActivityForResult() || getId() == View.NO_ID || hasPasswordTransformationMethod()) { if (getId() == View.NO_ID) { return false; } if (mText.length() > 0 && hasSelection() && mEditor != null) { return true; } return false; return canShare(); } boolean canSelectAllText() { Loading packages/SystemUI/res/layout/remote_input.xml +1 −0 Original line number Diff line number Diff line Loading @@ -43,6 +43,7 @@ android:singleLine="true" android:ellipsize="start" android:inputType="textShortMessage|textAutoCorrect|textCapSentences" android:textIsSelectable="true" android:imeOptions="actionSend|flagNoExtractUi" /> <FrameLayout Loading packages/SystemUI/src/com/android/systemui/statusbar/BaseStatusBar.java +1 −0 Original line number Diff line number Diff line Loading @@ -1107,6 +1107,7 @@ public abstract class BaseStatusBar extends SystemUI implements }); a.start(); guts.setExposed(true); row.closeRemoteInput(); mStackScroller.onHeightChanged(null, true /* needsAnimation */); mNotificationGutsExposed = guts; } Loading packages/SystemUI/src/com/android/systemui/statusbar/ExpandableNotificationRow.java +5 −0 Original line number Diff line number Diff line Loading @@ -579,6 +579,11 @@ public class ExpandableNotificationRow extends ActivatableNotificationView { } } public void closeRemoteInput() { mPrivateLayout.closeRemoteInput(); mPublicLayout.closeRemoteInput(); } public interface ExpansionLogger { public void logNotificationExpansion(String key, boolean userAction, boolean expanded); } Loading packages/SystemUI/src/com/android/systemui/statusbar/NotificationContentView.java +23 −3 Original line number Diff line number Diff line Loading @@ -69,6 +69,9 @@ public class NotificationContentView extends FrameLayout { private View mHeadsUpChild; private HybridNotificationView mSingleLineView; private RemoteInputView mExpandedRemoteInput; private RemoteInputView mHeadsUpRemoteInput; private NotificationViewWrapper mContractedWrapper; private NotificationViewWrapper mExpandedWrapper; private NotificationViewWrapper mHeadsUpWrapper; Loading Loading @@ -743,15 +746,19 @@ public class NotificationContentView extends FrameLayout { View bigContentView = mExpandedChild; if (bigContentView != null) { applyRemoteInput(bigContentView, entry, hasRemoteInput); mExpandedRemoteInput = applyRemoteInput(bigContentView, entry, hasRemoteInput); } else { mExpandedRemoteInput = null; } View headsUpContentView = mHeadsUpChild; if (headsUpContentView != null) { applyRemoteInput(headsUpContentView, entry, hasRemoteInput); mHeadsUpRemoteInput = applyRemoteInput(headsUpContentView, entry, hasRemoteInput); } else { mHeadsUpRemoteInput = null; } } private void applyRemoteInput(View view, NotificationData.Entry entry, boolean hasRemoteInput) { private RemoteInputView applyRemoteInput(View view, NotificationData.Entry entry, boolean hasRemoteInput) { View actionContainerCandidate = view.findViewById( com.android.internal.R.id.actions_container); if (actionContainerCandidate instanceof FrameLayout) { Loading @@ -777,7 +784,20 @@ public class NotificationContentView extends FrameLayout { color = mContext.getColor(R.color.default_remote_input_background); } riv.setBackgroundColor(color); return riv; } return existing; } return null; } public void closeRemoteInput() { if (mHeadsUpRemoteInput != null) { mHeadsUpRemoteInput.close(); } if (mExpandedRemoteInput != null) { mExpandedRemoteInput.close(); } } Loading Loading
core/java/android/widget/TextView.java +6 −9 Original line number Diff line number Diff line Loading @@ -9646,7 +9646,10 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener } boolean canShare() { return canCopy() && isDeviceProvisioned(); if (!getContext().canStartActivityForResult() || !isDeviceProvisioned()) { return false; } return canCopy(); } boolean isDeviceProvisioned() { Loading @@ -9669,16 +9672,10 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener } boolean canProcessText() { if (!getContext().canStartActivityForResult() || getId() == View.NO_ID || hasPasswordTransformationMethod()) { if (getId() == View.NO_ID) { return false; } if (mText.length() > 0 && hasSelection() && mEditor != null) { return true; } return false; return canShare(); } boolean canSelectAllText() { Loading
packages/SystemUI/res/layout/remote_input.xml +1 −0 Original line number Diff line number Diff line Loading @@ -43,6 +43,7 @@ android:singleLine="true" android:ellipsize="start" android:inputType="textShortMessage|textAutoCorrect|textCapSentences" android:textIsSelectable="true" android:imeOptions="actionSend|flagNoExtractUi" /> <FrameLayout Loading
packages/SystemUI/src/com/android/systemui/statusbar/BaseStatusBar.java +1 −0 Original line number Diff line number Diff line Loading @@ -1107,6 +1107,7 @@ public abstract class BaseStatusBar extends SystemUI implements }); a.start(); guts.setExposed(true); row.closeRemoteInput(); mStackScroller.onHeightChanged(null, true /* needsAnimation */); mNotificationGutsExposed = guts; } Loading
packages/SystemUI/src/com/android/systemui/statusbar/ExpandableNotificationRow.java +5 −0 Original line number Diff line number Diff line Loading @@ -579,6 +579,11 @@ public class ExpandableNotificationRow extends ActivatableNotificationView { } } public void closeRemoteInput() { mPrivateLayout.closeRemoteInput(); mPublicLayout.closeRemoteInput(); } public interface ExpansionLogger { public void logNotificationExpansion(String key, boolean userAction, boolean expanded); } Loading
packages/SystemUI/src/com/android/systemui/statusbar/NotificationContentView.java +23 −3 Original line number Diff line number Diff line Loading @@ -69,6 +69,9 @@ public class NotificationContentView extends FrameLayout { private View mHeadsUpChild; private HybridNotificationView mSingleLineView; private RemoteInputView mExpandedRemoteInput; private RemoteInputView mHeadsUpRemoteInput; private NotificationViewWrapper mContractedWrapper; private NotificationViewWrapper mExpandedWrapper; private NotificationViewWrapper mHeadsUpWrapper; Loading Loading @@ -743,15 +746,19 @@ public class NotificationContentView extends FrameLayout { View bigContentView = mExpandedChild; if (bigContentView != null) { applyRemoteInput(bigContentView, entry, hasRemoteInput); mExpandedRemoteInput = applyRemoteInput(bigContentView, entry, hasRemoteInput); } else { mExpandedRemoteInput = null; } View headsUpContentView = mHeadsUpChild; if (headsUpContentView != null) { applyRemoteInput(headsUpContentView, entry, hasRemoteInput); mHeadsUpRemoteInput = applyRemoteInput(headsUpContentView, entry, hasRemoteInput); } else { mHeadsUpRemoteInput = null; } } private void applyRemoteInput(View view, NotificationData.Entry entry, boolean hasRemoteInput) { private RemoteInputView applyRemoteInput(View view, NotificationData.Entry entry, boolean hasRemoteInput) { View actionContainerCandidate = view.findViewById( com.android.internal.R.id.actions_container); if (actionContainerCandidate instanceof FrameLayout) { Loading @@ -777,7 +784,20 @@ public class NotificationContentView extends FrameLayout { color = mContext.getColor(R.color.default_remote_input_background); } riv.setBackgroundColor(color); return riv; } return existing; } return null; } public void closeRemoteInput() { if (mHeadsUpRemoteInput != null) { mHeadsUpRemoteInput.close(); } if (mExpandedRemoteInput != null) { mExpandedRemoteInput.close(); } } Loading