Move service initialization
Occasionally ILockSettings can fail to be initialized otherwise
Fixes: 232714129
Test: boot (and eventually bootstress/reboot-long)
Change-Id: I2f9f9bdba37f4ebfaea56c1a6662f0474ae8a002
Merged-In: I2f9f9bdba37f4ebfaea56c1a6662f0474ae8a002
(cherry picked from commit 8e278543bd)
This commit is contained in:
committed by
Wenhao Wang
parent
b22a6d7372
commit
38fe45b539
@@ -1507,7 +1507,6 @@ public class NotificationManagerService extends SystemService {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private LockPatternUtils mLockPatternUtils;
|
|
||||||
private StrongAuthTracker mStrongAuthTracker;
|
private StrongAuthTracker mStrongAuthTracker;
|
||||||
|
|
||||||
public NotificationManagerService(Context context) {
|
public NotificationManagerService(Context context) {
|
||||||
@@ -1709,7 +1708,6 @@ public class NotificationManagerService extends SystemService {
|
|||||||
|
|
||||||
mHandler = new WorkerHandler(looper);
|
mHandler = new WorkerHandler(looper);
|
||||||
mRankingThread.start();
|
mRankingThread.start();
|
||||||
mLockPatternUtils = new LockPatternUtils(getContext());
|
|
||||||
mStrongAuthTracker = new StrongAuthTracker(getContext());
|
mStrongAuthTracker = new StrongAuthTracker(getContext());
|
||||||
String[] extractorNames;
|
String[] extractorNames;
|
||||||
try {
|
try {
|
||||||
@@ -2002,7 +2000,7 @@ public class NotificationManagerService extends SystemService {
|
|||||||
mRoleObserver = new RoleObserver(getContext().getSystemService(RoleManager.class),
|
mRoleObserver = new RoleObserver(getContext().getSystemService(RoleManager.class),
|
||||||
mPackageManager, getContext().getMainExecutor());
|
mPackageManager, getContext().getMainExecutor());
|
||||||
mRoleObserver.init();
|
mRoleObserver.init();
|
||||||
mLockPatternUtils.registerStrongAuthTracker(mStrongAuthTracker);
|
new LockPatternUtils(getContext()).registerStrongAuthTracker(mStrongAuthTracker);
|
||||||
} else if (phase == SystemService.PHASE_THIRD_PARTY_APPS_CAN_START) {
|
} else if (phase == SystemService.PHASE_THIRD_PARTY_APPS_CAN_START) {
|
||||||
// This observer will force an update when observe is called, causing us to
|
// This observer will force an update when observe is called, causing us to
|
||||||
// bind to listener services.
|
// bind to listener services.
|
||||||
|
|||||||
Reference in New Issue
Block a user