summaryrefslogtreecommitdiff
path: root/services/java/com
diff options
context:
space:
mode:
author Keun-young Park <keunyoung@google.com> 2017-05-08 14:51:59 -0700
committer Keun-young Park <keunyoung@google.com> 2017-05-19 09:20:28 -0700
commit4136d2d54b986a09b237aee30974d3c00d308338 (patch)
tree5d533560fd58de55b9a4bd983f0f2c9d3439fb0e /services/java/com
parenta239ed1c79a55f5dc650a528a21fb696752c8049 (diff)
Wait for keyguard draw before stopping boot animation
- Add check for keyguard drawn before stopping boot animation. Otherwise blank screen can happen. - Bind to keyguard service when sysui is launched to reduce waiting time later. - Increase keyguard timeout to 5 secs if it is not boot completed. Otherwise (= normal screen on), keep the current 1 sec. This timeout can still lead into blank screen so use bigger timeout during boot-up to prevent such case. bug: 37867510 Test: many reboots Change-Id: Ibfdc42d295bb1d3f5b4ea316fe5aca9ab875e4be
Diffstat (limited to 'services/java/com')
-rw-r--r--services/java/com/android/server/SystemServer.java6
1 files changed, 4 insertions, 2 deletions
diff --git a/services/java/com/android/server/SystemServer.java b/services/java/com/android/server/SystemServer.java
index 0965f03c27e9..b620b3e0e6e9 100644
--- a/services/java/com/android/server/SystemServer.java
+++ b/services/java/com/android/server/SystemServer.java
@@ -1644,6 +1644,7 @@ public final class SystemServer {
final MediaRouterService mediaRouterF = mediaRouter;
final MmsServiceBroker mmsServiceF = mmsService;
final IpSecService ipSecServiceF = ipSecService;
+ final WindowManagerService windowManagerF = wm;
// We now tell the activity manager it is okay to run third party
// code. It will call back into us once it has gotten to the state
@@ -1683,7 +1684,7 @@ public final class SystemServer {
traceBeginAndSlog("StartSystemUI");
try {
- startSystemUi(context);
+ startSystemUi(context, windowManagerF);
} catch (Throwable e) {
reportWtf("starting System UI", e);
}
@@ -1837,13 +1838,14 @@ public final class SystemServer {
}, BOOT_TIMINGS_TRACE_LOG);
}
- static final void startSystemUi(Context context) {
+ static final void startSystemUi(Context context, WindowManagerService windowManager) {
Intent intent = new Intent();
intent.setComponent(new ComponentName("com.android.systemui",
"com.android.systemui.SystemUIService"));
intent.addFlags(Intent.FLAG_DEBUG_TRIAGED_MISSING);
//Slog.d(TAG, "Starting service: " + intent);
context.startServiceAsUser(intent, UserHandle.SYSTEM);
+ windowManager.onSystemUiStarted();
}
private static void traceBeginAndSlog(String name) {