Skip to content
Commit b8f53ee8 authored by Svet Ganov's avatar Svet Ganov Committed by Svetoslav Ganov
Browse files

Notification listener and ranker callbacks on binder threads.

The callbacks for the notification listener and notification
ranker were delivered on binder threads which is problematic
becuase: 1) permission checks and app ops checks would fail
unless the app developer knows to clear binder calling id and
restore it after that; 2) developers need to synchronize their
implementation as they get callbacks on different threads (
arguably callbacks should not be concurrent); 3) this doesn't
follow the pattern in the platform;

Also the code delivering callbacks was catching Throwable which
we shouldn't do in general and also masks bugs in the listener
or ranker implementation. Now that the callbacks are offloaded
to the main listener/ranker thread system code should not be
guarding against Throwable to handle exceptions propagated
over binder calls.

bug:26704777

Change-Id: I171fb41bbe25e6105dd05e4166193dbcec594f82
parent a52f6a17
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment