Loading packages/SystemUI/src/com/android/systemui/statusbar/policy/RemoteInputView.java +29 −0 Original line number Diff line number Diff line Loading @@ -112,6 +112,7 @@ public class RemoteInputView extends LinearLayout implements View.OnClickListene private final TextView.OnEditorActionListener mEditorActionHandler; private final NotificationRemoteInputManager mRemoteInputManager; private final List<OnFocusChangeListener> mEditTextFocusChangeListeners = new ArrayList<>(); private final List<OnSendRemoteInputListener> mOnSendListeners = new ArrayList<>(); private RemoteEditText mEditText; private ImageButton mSendButton; private GradientDrawable mContentBackground; Loading Loading @@ -357,6 +358,9 @@ public class RemoteInputView extends LinearLayout implements View.OnClickListene private void sendRemoteInput(Intent intent) { if (mBouncerChecker != null && mBouncerChecker.showBouncerIfNecessary()) { mEditText.hideIme(); for (OnSendRemoteInputListener listener : mOnSendListeners) { listener.onSendRequestBounced(); } return; } Loading @@ -370,6 +374,10 @@ public class RemoteInputView extends LinearLayout implements View.OnClickListene mController.remoteInputSent(mEntry); mEntry.setHasSentReply(); for (OnSendRemoteInputListener listener : mOnSendListeners) { listener.onSendRemoteInput(); } // Tell ShortcutManager that this package has been "activated". ShortcutManager // will reset the throttling for this package. // Strictly speaking, the intent receiver may be different from the notification publisher, Loading Loading @@ -754,6 +762,27 @@ public class RemoteInputView extends LinearLayout implements View.OnClickListene } } /** Registers a listener for send events on this RemoteInputView */ public void addOnSendRemoteInputListener(OnSendRemoteInputListener listener) { mOnSendListeners.add(listener); } /** Removes a previously-added listener for send events on this RemoteInputView */ public void removeOnSendRemoteInputListener(OnSendRemoteInputListener listener) { mOnSendListeners.remove(listener); } /** Listener for send events */ public interface OnSendRemoteInputListener { /** Invoked when the remote input has been sent successfully. */ void onSendRemoteInput(); /** * Invoked when the user had requested to send the remote input, but authentication was * required and the bouncer was shown instead. */ void onSendRequestBounced(); } /** Handler for button click on send action in IME. */ private class EditorActionHandler implements TextView.OnEditorActionListener { Loading Loading
packages/SystemUI/src/com/android/systemui/statusbar/policy/RemoteInputView.java +29 −0 Original line number Diff line number Diff line Loading @@ -112,6 +112,7 @@ public class RemoteInputView extends LinearLayout implements View.OnClickListene private final TextView.OnEditorActionListener mEditorActionHandler; private final NotificationRemoteInputManager mRemoteInputManager; private final List<OnFocusChangeListener> mEditTextFocusChangeListeners = new ArrayList<>(); private final List<OnSendRemoteInputListener> mOnSendListeners = new ArrayList<>(); private RemoteEditText mEditText; private ImageButton mSendButton; private GradientDrawable mContentBackground; Loading Loading @@ -357,6 +358,9 @@ public class RemoteInputView extends LinearLayout implements View.OnClickListene private void sendRemoteInput(Intent intent) { if (mBouncerChecker != null && mBouncerChecker.showBouncerIfNecessary()) { mEditText.hideIme(); for (OnSendRemoteInputListener listener : mOnSendListeners) { listener.onSendRequestBounced(); } return; } Loading @@ -370,6 +374,10 @@ public class RemoteInputView extends LinearLayout implements View.OnClickListene mController.remoteInputSent(mEntry); mEntry.setHasSentReply(); for (OnSendRemoteInputListener listener : mOnSendListeners) { listener.onSendRemoteInput(); } // Tell ShortcutManager that this package has been "activated". ShortcutManager // will reset the throttling for this package. // Strictly speaking, the intent receiver may be different from the notification publisher, Loading Loading @@ -754,6 +762,27 @@ public class RemoteInputView extends LinearLayout implements View.OnClickListene } } /** Registers a listener for send events on this RemoteInputView */ public void addOnSendRemoteInputListener(OnSendRemoteInputListener listener) { mOnSendListeners.add(listener); } /** Removes a previously-added listener for send events on this RemoteInputView */ public void removeOnSendRemoteInputListener(OnSendRemoteInputListener listener) { mOnSendListeners.remove(listener); } /** Listener for send events */ public interface OnSendRemoteInputListener { /** Invoked when the remote input has been sent successfully. */ void onSendRemoteInput(); /** * Invoked when the user had requested to send the remote input, but authentication was * required and the bouncer was shown instead. */ void onSendRequestBounced(); } /** Handler for button click on send action in IME. */ private class EditorActionHandler implements TextView.OnEditorActionListener { Loading