Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -1685,13 +1685,16 @@ private int applyHierarchyOp(WindowContainerTransaction.HierarchyOp hop, int eff
Slog.e(TAG, "No transition to set animation delegate on");
break;
}
// Unfortunately, IApplicationThread.Stub.asInterface will make a random Proxy
// object if the binder isn't the correct interface (instead of returning null),
// so we have to do our own check.
final IBinder binder = hop.getCaller();
android.os.IInterface iin = binder.queryLocalInterface(
IApplicationThread.Stub.DESCRIPTOR);
if (!(iin instanceof IApplicationThread)) {
try {
// queryLocalInterface() always returns null for a valid remote BinderProxy.
// Check the descriptor so both local and cross-process callers are accepted.
if (binder == null || !IApplicationThread.Stub.DESCRIPTOR.equals(
binder.getInterfaceDescriptor())) {
Slog.e(TAG, "Not a valid process token: " + binder);
break;
}
} catch (RemoteException e) {
Slog.e(TAG, "Not a valid process token: " + binder);
break;
}
Expand Down