Fix IllegalStateException in KeyboardBaclightController
IListener object changes in the binder transaction so need to compare object as binder object instead otherwise will always mismatch and throw exception. Test: manual Bug: 274132086 Change-Id: I265632151e0e877fff88ebd9b5a27cdef7b93b9c
This commit is contained in:
@@ -344,7 +344,7 @@ final class KeyboardBacklightController implements
|
||||
throw new IllegalStateException("The calling process has no registered "
|
||||
+ "KeyboardBacklightListener.");
|
||||
}
|
||||
if (record.mListener != listener) {
|
||||
if (record.mListener.asBinder() != listener.asBinder()) {
|
||||
throw new IllegalStateException("The calling process has a different registered "
|
||||
+ "KeyboardBacklightListener.");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user