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

Commit 3c2dc289 authored by Pardis Beikzadeh's avatar Pardis Beikzadeh
Browse files

Post cancelAsUser to mHandler.

This is to fix a java.lang.SecurityException: Caller android:1010157 cannot post for pkg android in user 10
that was coming from this line.

Bug: 153016511
Test: Manual - did make, flash, ran a test app to repro the SecurityException to verify it does not.
Change-Id: Icb1bb9982a7fb4b377b0b6773c19a146c5ea8f63
parent 55bd691d
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -379,8 +379,10 @@ public class FaceService extends BiometricServiceBase {
            checkPermission(MANAGE_BIOMETRIC);
            updateActiveGroup(userId, opPackageName);

            mHandler.post(() -> {
                mNotificationManager.cancelAsUser(NOTIFICATION_TAG, NOTIFICATION_ID,
                        UserHandle.CURRENT);
            });

            final boolean restricted = isRestricted();
            final EnrollClientImpl client = new EnrollClientImpl(getContext(), mDaemonWrapper,