Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit bc2c44fb authored by Yu-Ting Tseng's avatar Yu-Ting Tseng
Browse files

Better exception handling in RemoteCallbackList

Update maybeUnsubscribeFromFrozenCallback to swallow the IAE caused by
kernel not supporting frozen notifications.

Change-Id: I7bd081cb733c49fd4b206d8c28f37f3f964a324d
Test: atest android.app.appops2.cts.AppOpsLoggingTest
Bug: 379658186
parent 2be55aa2
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -214,7 +214,7 @@ public class RemoteCallbackList<E extends IInterface> {
            if (mFrozenCalleePolicy != FROZEN_CALLEE_POLICY_UNSET) {
                try {
                    mBinder.removeFrozenStateChangeCallback(this);
                } catch (UnsupportedOperationException e) {
                } catch (UnsupportedOperationException | IllegalArgumentException e) {
                    // The kernel does not support frozen notifications. Ignore the error and move
                    // on.
                }