From 1e24c428efa7b0836154fa909bdcf2d3e7210462 Mon Sep 17 00:00:00 2001 From: Amith Yamasani Date: Fri, 20 Nov 2015 09:44:08 -0800 Subject: Fix missing observer reply callbacks This was causing upto 2 seconds in user switching delay. Bug: 25813588 Change-Id: Icf23b021f134a8ccfa2dae470af02b2da7454acc --- .../com/android/systemui/statusbar/phone/PhoneStatusBarPolicy.java | 6 ++++++ .../java/com/android/server/fingerprint/FingerprintService.java | 6 ++++++ 2 files changed, 12 insertions(+) diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBarPolicy.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBarPolicy.java index fa9c4bb..83edc96 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBarPolicy.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBarPolicy.java @@ -383,6 +383,12 @@ public class PhoneStatusBarPolicy implements Callback { @Override public void onUserSwitching(int newUserId, IRemoteCallback reply) { mUserInfoController.reloadUserInfo(); + if (reply != null) { + try { + reply.sendResult(null); + } catch (RemoteException e) { + } + } } @Override diff --git a/services/core/java/com/android/server/fingerprint/FingerprintService.java b/services/core/java/com/android/server/fingerprint/FingerprintService.java index ec7c1c4..103ed0a 100644 --- a/services/core/java/com/android/server/fingerprint/FingerprintService.java +++ b/services/core/java/com/android/server/fingerprint/FingerprintService.java @@ -1139,6 +1139,12 @@ public class FingerprintService extends SystemService implements IBinder.DeathRe public void onUserSwitching(int newUserId, IRemoteCallback reply) { mHandler.obtainMessage(MSG_USER_SWITCHING, newUserId, 0 /* unused */) .sendToTarget(); + if (reply != null) { + try { + reply.sendResult(null); + } catch (RemoteException e) { + } + } } @Override public void onUserSwitchComplete(int newUserId) throws RemoteException { -- cgit v1.1