Merge "Go via FgThread when starting the profiles during system boot." into pi-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
98d4d5002b
@@ -845,10 +845,16 @@ class UserController implements Handler.Callback {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void scheduleStartProfiles() {
|
void scheduleStartProfiles() {
|
||||||
if (!mHandler.hasMessages(START_PROFILES_MSG)) {
|
// Parent user transition to RUNNING_UNLOCKING happens on FgThread, so it is busy, there is
|
||||||
mHandler.sendMessageDelayed(mHandler.obtainMessage(START_PROFILES_MSG),
|
// a chance the profile will reach RUNNING_LOCKED while parent is still locked, so no
|
||||||
DateUtils.SECOND_IN_MILLIS);
|
// attempt will be made to unlock the profile. If we go via FgThread, this will be executed
|
||||||
}
|
// after the parent had chance to unlock fully.
|
||||||
|
FgThread.getHandler().post(() -> {
|
||||||
|
if (!mHandler.hasMessages(START_PROFILES_MSG)) {
|
||||||
|
mHandler.sendMessageDelayed(mHandler.obtainMessage(START_PROFILES_MSG),
|
||||||
|
DateUtils.SECOND_IN_MILLIS);
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
void startProfiles() {
|
void startProfiles() {
|
||||||
|
|||||||
Reference in New Issue
Block a user