Merge "Break infinite recursion in RemoteInputView" into tm-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
4e08c38184
@@ -114,14 +114,17 @@ public class RemoteInputController {
|
|||||||
public void addRemoteInput(NotificationEntry entry, Object token) {
|
public void addRemoteInput(NotificationEntry entry, Object token) {
|
||||||
Objects.requireNonNull(entry);
|
Objects.requireNonNull(entry);
|
||||||
Objects.requireNonNull(token);
|
Objects.requireNonNull(token);
|
||||||
|
boolean isActive = isRemoteInputActive(entry);
|
||||||
boolean found = pruneWeakThenRemoveAndContains(
|
boolean found = pruneWeakThenRemoveAndContains(
|
||||||
entry /* contains */, null /* remove */, token /* removeToken */);
|
entry /* contains */, null /* remove */, token /* removeToken */);
|
||||||
if (!found) {
|
if (!found) {
|
||||||
mOpen.add(new Pair<>(new WeakReference<>(entry), token));
|
mOpen.add(new Pair<>(new WeakReference<>(entry), token));
|
||||||
}
|
}
|
||||||
|
// If the remote input focus is being transferred between different notification layouts
|
||||||
apply(entry);
|
// (ex: Expanded->Contracted), then we don't want to re-apply.
|
||||||
|
if (!isActive) {
|
||||||
|
apply(entry);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user