Fix too many receivers Exception

Each time window focus changes on rotation,
a separate controller is created which further registers a new
receiver each time.

Bug: 173166718
Change-Id: I500a6ae5cf7058364e43baa44b7161c5dcfbc232
This commit is contained in:
Anita Hemrajani
2020-11-13 11:26:42 +08:00
committed by Denis Hsu
parent b460d47489
commit a865c3af6f

View File

@@ -56,7 +56,7 @@ public class ControllerRendererPool {
final Class<? extends ContextualCardController> clz = final Class<? extends ContextualCardController> clz =
ContextualCardLookupTable.getCardControllerClass(cardType); ContextualCardLookupTable.getCardControllerClass(cardType);
for (ContextualCardController controller : mControllers) { for (ContextualCardController controller : mControllers) {
if (controller.getClass() == clz) { if (controller.getClass().getName().equals(clz.getName())) {
Log.d(TAG, "Controller is already there."); Log.d(TAG, "Controller is already there.");
return (T) controller; return (T) controller;
} }