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

Commit dbb75248 authored by Amith Yamasani's avatar Amith Yamasani
Browse files

Fix missing observer reply callbacks

This was causing upto 2 seconds in user switching delay.

Bug: 25813588
Change-Id: Icf23b021f134a8ccfa2dae470af02b2da7454acc
parent 73ecaf08
Loading
Loading
Loading
Loading
+6 −0
Original line number Original line Diff line number Diff line
@@ -383,6 +383,12 @@ public class PhoneStatusBarPolicy implements Callback {
                @Override
                @Override
                public void onUserSwitching(int newUserId, IRemoteCallback reply) {
                public void onUserSwitching(int newUserId, IRemoteCallback reply) {
                    mUserInfoController.reloadUserInfo();
                    mUserInfoController.reloadUserInfo();
                    if (reply != null) {
                        try {
                            reply.sendResult(null);
                        } catch (RemoteException e) {
                        }
                    }
                }
                }


                @Override
                @Override
+6 −0
Original line number Original line Diff line number Diff line
@@ -1139,6 +1139,12 @@ public class FingerprintService extends SystemService implements IBinder.DeathRe
                    public void onUserSwitching(int newUserId, IRemoteCallback reply) {
                    public void onUserSwitching(int newUserId, IRemoteCallback reply) {
                        mHandler.obtainMessage(MSG_USER_SWITCHING, newUserId, 0 /* unused */)
                        mHandler.obtainMessage(MSG_USER_SWITCHING, newUserId, 0 /* unused */)
                                .sendToTarget();
                                .sendToTarget();
                        if (reply != null) {
                            try {
                                reply.sendResult(null);
                            } catch (RemoteException e) {
                            }
                        }
                    }
                    }
                    @Override
                    @Override
                    public void onUserSwitchComplete(int newUserId) throws RemoteException {
                    public void onUserSwitchComplete(int newUserId) throws RemoteException {