summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/RemoteInputController.java7
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/notification/RemoteInputControllerLogger.kt11
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/policy/RemoteInputView.java2
3 files changed, 15 insertions, 5 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/RemoteInputController.java b/packages/SystemUI/src/com/android/systemui/statusbar/RemoteInputController.java
index 63282d2904e8..17da015789ea 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/RemoteInputController.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/RemoteInputController.java
@@ -71,7 +71,8 @@ public class RemoteInputController {
* @param entry the entry for which a remote input is now active.
* @param token a token identifying the view that is managing the remote input
*/
- public void addRemoteInput(NotificationEntry entry, Object token) {
+ public void addRemoteInput(NotificationEntry entry, Object token,
+ @CompileTimeConstant String reason) {
Objects.requireNonNull(entry);
Objects.requireNonNull(token);
boolean isActive = isRemoteInputActive(entry);
@@ -79,7 +80,9 @@ public class RemoteInputController {
entry /* contains */, null /* remove */, token /* removeToken */);
mLogger.logAddRemoteInput(entry.getKey()/* entryKey */,
isActive /* isRemoteInputAlreadyActive */,
- found /* isRemoteInputFound */);
+ found /* isRemoteInputFound */,
+ reason /* reason */,
+ entry.getNotificationStyle()/* notificationStyle */);
if (!found) {
mOpen.add(new Pair<>(new WeakReference<>(entry), token));
}
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/notification/RemoteInputControllerLogger.kt b/packages/SystemUI/src/com/android/systemui/statusbar/notification/RemoteInputControllerLogger.kt
index 97770316442c..ff89c62ab496 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/notification/RemoteInputControllerLogger.kt
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/notification/RemoteInputControllerLogger.kt
@@ -32,17 +32,24 @@ constructor(@NotificationRemoteInputLog private val logBuffer: LogBuffer) {
fun logAddRemoteInput(
entryKey: String,
isRemoteInputAlreadyActive: Boolean,
- isRemoteInputFound: Boolean
+ isRemoteInputFound: Boolean,
+ reason: String,
+ notificationStyle: String
) =
logBuffer.log(
TAG,
DEBUG,
{
str1 = entryKey
+ str2 = reason
+ str3 = notificationStyle
bool1 = isRemoteInputAlreadyActive
bool2 = isRemoteInputFound
},
- { "addRemoteInput entry: $str1, isAlreadyActive: $bool1, isFound:$bool2" }
+ {
+ "addRemoteInput reason:$str2 entry: $str1, style:$str3" +
+ ", isAlreadyActive: $bool1, isFound:$bool2"
+ }
)
/** logs removeRemoteInput invocation of [RemoteInputController] */
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/policy/RemoteInputView.java b/packages/SystemUI/src/com/android/systemui/statusbar/policy/RemoteInputView.java
index 7c96029cfe15..ceed81a182aa 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/policy/RemoteInputView.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/policy/RemoteInputView.java
@@ -657,7 +657,7 @@ public class RemoteInputView extends LinearLayout implements View.OnClickListene
mEditText.setText(mEntry.remoteInputText);
mEditText.setSelection(mEditText.length());
mEditText.requestFocus();
- mController.addRemoteInput(mEntry, mToken);
+ mController.addRemoteInput(mEntry, mToken, "RemoteInputView#focus");
setAttachment(mEntry.remoteInputAttachment);
updateSendButton();