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

Commit 1cafd22a authored by Aaron Liu's avatar Aaron Liu
Browse files

Register receiver on bg thread.

registerReceiver makes a binder call so we should register it on a bg
thread.

Fixes: 317628008
Test: Just ensure that lockscreen shows correctly.
Flag: NONE

Change-Id: I3fd825cb2408e69d1808ef65d14625a29913bd72
parent 442fbea9
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -397,8 +397,10 @@ public class KeyguardSliceProvider extends SliceProvider implements
            IntentFilter filter = new IntentFilter();
            filter.addAction(Intent.ACTION_DATE_CHANGED);
            filter.addAction(Intent.ACTION_LOCALE_CHANGED);
            mBgHandler.post(() -> {
                getContext().registerReceiver(mIntentReceiver, filter, null /* permission*/,
                        null /* scheduler */);
            });
            mKeyguardUpdateMonitor.registerCallback(mKeyguardUpdateMonitorCallback);
            mRegistered = true;
        }