profiles: Don't bind the keyguard until ActivityManager is up

Change-Id: I2f349d00c197cf5c4a492fb0892b3edd71479ea4
This commit is contained in:
Steve Kondik 2015-08-17 03:32:41 -07:00 committed by Steve Kondik
parent 8b5a4d9bed
commit 435e2f3b17

View File

@ -164,12 +164,18 @@ public class ProfileManagerService extends SystemService {
} }
} }
@Override
public void onBootPhase(int phase) {
if (phase == PHASE_ACTIVITY_MANAGER_READY) {
bindKeyguard();
}
}
private void initialize() { private void initialize() {
initialize(false); initialize(false);
} }
private void initialize(boolean skipFile) { private void initialize(boolean skipFile) {
bindKeyguard();
mTriggerHelper = new ProfileTriggerHelper(mContext, mHandler, this); mTriggerHelper = new ProfileTriggerHelper(mContext, mHandler, this);
mProfiles = new HashMap<UUID, Profile>(); mProfiles = new HashMap<UUID, Profile>();
mProfileNames = new HashMap<String, UUID>(); mProfileNames = new HashMap<String, UUID>();